v0.7.0: lots of visual implementation

This commit is contained in:
Evan Debenham 2018-06-07 01:16:07 -04:00
parent 6128c05acc
commit 4984061659
33 changed files with 128 additions and 116 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -31,8 +31,7 @@ public class Adrenaline extends FlavourBuff {
@Override
public int icon() {
//TODO
return BuffIndicator.IMMUNITY;
return BuffIndicator.AMOK;
}
@Override

View File

@ -31,13 +31,13 @@ public class Haste extends FlavourBuff {
@Override
public int icon() {
//TODO
return BuffIndicator.IMMUNITY;
return BuffIndicator.MOMENTUM;
}
@Override
public void tintIcon(Image icon) {
greyIcon(icon, 5f, cooldown());
icon.tint(1, 1, 0, 0.5f);
if (cooldown() < 5f) greyIcon(icon, 5f, cooldown());
}
@Override

View File

@ -65,6 +65,7 @@ public class Speck extends Image {
public static final int FORGE = 112;
public static final int CONFUSION = 113;
public static final int RED_LIGHT = 114;
public static final int CALM = 115;
private static final int SIZE = 7;
@ -114,6 +115,9 @@ public class Speck extends Image {
case DUST:
frame( film.get( STEAM ) );
break;
case CALM:
frame( film.get( SCREAM ) );
break;
default:
frame( film.get( type ) );
}
@ -198,6 +202,8 @@ public class Speck extends Image {
lifespan = 1f;
break;
case CALM:
color(0, 1, 1);
case SCREAM:
lifespan = 0.9f;
break;
@ -376,6 +382,7 @@ public class Speck extends Image {
scale.set( (float)(Math.sqrt( p < 0.5f ? p : 1 - p ) * 2) );
break;
case CALM:
case SCREAM:
am = (float)Math.sqrt( (p < 0.5f ? p : 1 - p) * 2f );
scale.set( p * 7 );

View File

@ -71,6 +71,7 @@ public class ScrollOfTeleportation extends Scroll {
//time isn't spent
((HeroSprite)curUser.sprite).read();
teleportToLocation(curUser, target);
GLog.i( Messages.get(ScrollOfTeleportation.class, "tele") );
}
}
@ -95,7 +96,6 @@ public class ScrollOfTeleportation extends Scroll {
Dungeon.observe();
GameScene.updateFog();
//GLog.i( Messages.get(ScrollOfTeleportation.class, "tele") );
}
public static void teleportHero(Hero hero ) {

View File

@ -46,7 +46,6 @@ import com.watabou.utils.Random;
public class ScrollOfTransmutation extends InventoryScroll {
{
//TODO
initials = 10;
mode = WndBag.Mode.TRANMSUTABLE;
}

View File

@ -21,29 +21,33 @@
package com.shatteredpixel.shatteredpixeldungeon.items.stones;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
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.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle;
import com.watabou.utils.PathFinder;
public class StoneOfAggression extends Runestone {
{
//TODO
image = ItemSpriteSheet.STONE_TIWAZ;
image = ItemSpriteSheet.STONE_KAUNAN;
}
@Override
protected void activate(int cell) {
CellEmitter.center(cell).start( Speck.factory( Speck.SCREAM ), 0.3f, 3 );
Sample.INSTANCE.play( Assets.SND_READ );
for (int i : PathFinder.NEIGHBOURS9){
//TODO visuals
Char ch = Actor.findChar( cell + i );
if (ch != null && ch.alignment == Char.Alignment.ENEMY){

View File

@ -21,29 +21,33 @@
package com.shatteredpixel.shatteredpixeldungeon.items.stones;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
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.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle;
import com.watabou.utils.PathFinder;
public class StoneOfAvoidance extends Runestone {
{
//TODO
image = ItemSpriteSheet.STONE_TIWAZ;
image = ItemSpriteSheet.STONE_LAGUZ;
}
@Override
protected void activate(int cell) {
CellEmitter.center(cell).start( Speck.factory( Speck.CALM ), 0.3f, 3 );
Sample.INSTANCE.play( Assets.SND_READ );
for (int i : PathFinder.NEIGHBOURS9){
//TODO visuals
Char ch = Actor.findChar( cell + i );
if (ch != null && ch.alignment == Char.Alignment.ENEMY){

View File

@ -27,8 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class StoneOfBlast extends Runestone {
{
//TODO
image = ItemSpriteSheet.STONE_TIWAZ;
image = ItemSpriteSheet.STONE_GYFU;
}
@Override

View File

@ -27,8 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class StoneOfBlink extends Runestone {
{
//TODO
image = ItemSpriteSheet.STONE_TIWAZ;
image = ItemSpriteSheet.STONE_SOWILO;
}
@Override

View File

@ -21,12 +21,14 @@
package com.shatteredpixel.shatteredpixeldungeon.items.stones;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.effects.CheckedCell;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.ShadowCaster;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Point;
public class StoneOfClairvoyance extends Runestone {
@ -34,8 +36,7 @@ public class StoneOfClairvoyance extends Runestone {
private static final int DIST = 8;
{
//TODO
image = ItemSpriteSheet.STONE_TIWAZ;
image = ItemSpriteSheet.STONE_RAIDO;
}
@Override
@ -50,6 +51,7 @@ public class StoneOfClairvoyance extends Runestone {
int sY = Math.max(0, c.y - DIST);
int eY = Math.min(Dungeon.level.height()-1, c.y + DIST);
boolean noticed = false;
for (int y = sY; y <= eY; y++){
int curr = y*Dungeon.level.width() + sX;
for ( int x = sX; x <= eX; x++){
@ -62,12 +64,18 @@ public class StoneOfClairvoyance extends Runestone {
if (Dungeon.level.heroFOV[curr]) {
GameScene.discoverTile( curr, Dungeon.level.map[curr] );
ScrollOfMagicMapping.discover( curr );
noticed = true;
}
}
curr++;
}
}
if (noticed) {
Sample.INSTANCE.play( Assets.SND_SECRET );
}
Sample.INSTANCE.play( Assets.SND_READ );
}
}

View File

@ -36,8 +36,7 @@ import com.watabou.utils.PathFinder;
public class StoneOfDeepenedSleep extends Runestone {
{
//TODO
image = ItemSpriteSheet.STONE_TIWAZ;
image = ItemSpriteSheet.STONE_NAUDIZ;
}
@Override
@ -45,7 +44,7 @@ public class StoneOfDeepenedSleep extends Runestone {
for (int i : PathFinder.NEIGHBOURS9){
CellEmitter.get(cell + i).start( Speck.factory( Speck.NOTE ), 0.3f, 5 );
CellEmitter.get(cell + i).start( Speck.factory( Speck.NOTE ), 0.1f, 2 );
if (Actor.findChar(cell + i) != null) {

View File

@ -28,20 +28,18 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
public class StoneOfDetectCurse extends InventoryStone {
//TODO there should be a 'cursed known' visible status for items
{
mode = WndBag.Mode.EQUIPMENT;
//TODO
image = ItemSpriteSheet.STONE_TIWAZ;
image = ItemSpriteSheet.STONE_ODAL;
}
@Override
protected void onItemSelected(Item item) {
item.cursedKnown = true;
useAnimation();
//TODO visuals
if (item.cursed){
GLog.w( Messages.get(this, "cursed") );
} else {

View File

@ -35,8 +35,7 @@ import com.watabou.utils.PathFinder;
public class StoneOfFlock extends Runestone {
{
//TODO
image = ItemSpriteSheet.STONE_TIWAZ;
image = ItemSpriteSheet.STONE_BERKANAN;
}
@Override

View File

@ -22,6 +22,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.stones;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.effects.Identification;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience;
@ -72,7 +73,6 @@ public class StoneOfIntuition extends InventoryStone {
{
mode = WndBag.Mode.UNIDED_POTION_OR_SCROLL;
//TODO
image = ItemSpriteSheet.STONE_ISAZ;
}
@ -83,47 +83,46 @@ public class StoneOfIntuition extends InventoryStone {
}
//in order of their consumable icon
public static Class[] potions = new Class[]{
PotionOfExperience.class,
PotionOfFrost.class,
PotionOfHaste.class,
PotionOfHealing.class,
PotionOfInvisibility.class,
PotionOfLevitation.class,
PotionOfLiquidFlame.class,
PotionOfMindVision.class,
PotionOfParalyticGas.class,
PotionOfPurity.class,
PotionOfStrength.class,
PotionOfToxicGas.class,
PotionOfMight.class
};
public static class WndGuess extends Window {
public static Class[] scrolls = new Class[]{
ScrollOfIdentify.class,
ScrollOfLullaby.class,
ScrollOfMagicMapping.class,
ScrollOfMirrorImage.class,
ScrollOfPsionicBlast.class,
ScrollOfRage.class,
ScrollOfRecharging.class,
ScrollOfRemoveCurse.class,
ScrollOfTeleportation.class,
ScrollOfTerror.class,
ScrollOfTransmutation.class,
ScrollOfUpgrade.class,
ScrollOfMagicalInfusion.class
};
static Class curGuess = null;
public class WndGuess extends Window {
private static final int WIDTH = 120;
private static final int BTN_SIZE = 20;
//in order of their consumable icon
public static Class[] potions = new Class[]{
PotionOfExperience.class,
PotionOfFrost.class,
PotionOfHaste.class,
PotionOfHealing.class,
PotionOfInvisibility.class,
PotionOfLevitation.class,
PotionOfLiquidFlame.class,
PotionOfMindVision.class,
PotionOfParalyticGas.class,
PotionOfPurity.class,
PotionOfStrength.class,
PotionOfToxicGas.class,
PotionOfMight.class
};
public static Class[] scrolls = new Class[]{
ScrollOfIdentify.class,
ScrollOfLullaby.class,
ScrollOfMagicMapping.class,
ScrollOfMirrorImage.class,
ScrollOfPsionicBlast.class,
ScrollOfRage.class,
ScrollOfRecharging.class,
ScrollOfRemoveCurse.class,
ScrollOfTeleportation.class,
ScrollOfTerror.class,
ScrollOfTransmutation.class,
ScrollOfUpgrade.class,
ScrollOfMagicalInfusion.class
};
static Class curGuess = null;
public WndGuess(final Item item){
IconTitle titlebar = new IconTitle();
@ -138,14 +137,15 @@ public class StoneOfIntuition extends InventoryStone {
text.maxWidth( WIDTH );
add(text);
//TODO visuals
final RedButton guess = new RedButton(""){
@Override
protected void onClick() {
super.onClick();
useAnimation();
if (item.getClass() == curGuess){
item.identify();
GLog.p( Messages.get(WndGuess.class, "correct") );
curUser.sprite.parent.add( new Identification( curUser.sprite.center().offset( 0, -16 ) ) );
} else {
GLog.n( Messages.get(WndGuess.class, "incorrect") );
}

View File

@ -33,8 +33,7 @@ import com.watabou.utils.PathFinder;
public class StoneOfShock extends Runestone {
{
//TODO
image = ItemSpriteSheet.STONE_TIWAZ;
image = ItemSpriteSheet.STONE_MANNAZ;
}
@Override

View File

@ -256,7 +256,7 @@ public class WandOfRegrowth extends Wand {
public static class Dewcatcher extends Plant{
{
image = 12;
image = 13;
}
@Override
@ -290,7 +290,7 @@ public class WandOfRegrowth extends Wand {
public static class Seedpod extends Plant{
{
image = 13;
image = 14;
}
@Override

View File

@ -29,8 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class AdrenalineDart extends TippedDart {
{
//TODO
image = ItemSpriteSheet.BLINDING_DART;
image = ItemSpriteSheet.ADRENALINE_DART;
}
@Override

View File

@ -28,7 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class BlandfruitBush extends Plant {
{
image = 8;
image = 12;
}
@Override
@ -36,9 +36,10 @@ public class BlandfruitBush extends Plant {
Dungeon.level.drop( new Blandfruit(), pos ).sprite.drop();
}
//This seed no longer drops, but has a sprite as it did drop prior to 0.7.0
public static class Seed extends Plant.Seed {
{
image = ItemSpriteSheet.SEED_BLANDFRUIT;
image = ItemSpriteSheet.SEED_FADELEAF;
plantClass = BlandfruitBush.class;
}

View File

@ -36,7 +36,7 @@ import com.watabou.utils.Random;
public class Blindweed extends Plant {
{
image = 3;
image = 11;
}
@Override

View File

@ -41,7 +41,7 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
public class Dreamfoil extends Plant {
{
image = 10;
image = 7;
}
@Override

View File

@ -38,7 +38,7 @@ import com.watabou.utils.Bundle;
public class Earthroot extends Plant {
{
image = 5;
image = 8;
}
@Override

View File

@ -34,7 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Fadeleaf extends Plant {
{
image = 6;
image = 10;
}
@Override

View File

@ -32,7 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Firebloom extends Plant {
{
image = 0;
image = 1;
}
@Override

View File

@ -31,7 +31,7 @@ import com.watabou.utils.PathFinder;
public class Icecap extends Plant {
{
image = 1;
image = 4;
}
@Override

View File

@ -29,7 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Rotberry extends Plant {
{
image = 7;
image = 0;
}
@Override

View File

@ -33,7 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Sorrowmoss extends Plant {
{
image = 2;
image = 6;
}
@Override

View File

@ -32,7 +32,7 @@ import com.watabou.utils.Random;
public class Starflower extends Plant {
{
image = 11;
image = 9;
}
@Override

View File

@ -30,7 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Stormvine extends Plant {
{
image = 9;
image = 5;
}
@Override

View File

@ -39,7 +39,7 @@ import com.watabou.utils.Bundle;
public class Sungrass extends Plant {
{
image = 4;
image = 3;
}
@Override

View File

@ -35,8 +35,7 @@ import com.watabou.utils.Bundle;
public class Swiftthistle extends Plant {
{
//TODO
image = 1;
image = 2;
}
@Override
@ -49,8 +48,7 @@ public class Swiftthistle extends Plant {
public static class Seed extends Plant.Seed {
{
//TODO
image = ItemSpriteSheet.SEED_FADELEAF;
image = ItemSpriteSheet.SEED_SWIFTTHISTLE;
plantClass = Swiftthistle.class;
}
@ -63,13 +61,12 @@ public class Swiftthistle extends Plant {
@Override
public int icon() {
//TODO
return BuffIndicator.IMMUNITY;
return BuffIndicator.SLOW;
}
@Override
public void tintIcon(Image icon) {
FlavourBuff.greyIcon(icon, 4f, left);
if (left < 4) FlavourBuff.greyIcon(icon, 4f, left);
}
@Override

View File

@ -252,15 +252,16 @@ public class ItemSpriteSheet {
public static final int TIPPED_DARTS = xy(1, 11); //16 slots
public static final int ROT_DART = TIPPED_DARTS+0;
public static final int INCENDIARY_DART = TIPPED_DARTS+1;
public static final int HOLY_DART = TIPPED_DARTS+2;
public static final int BLINDING_DART = TIPPED_DARTS+3;
public static final int HEALING_DART = TIPPED_DARTS+4;
public static final int CHILLING_DART = TIPPED_DARTS+5;
public static final int SHOCKING_DART = TIPPED_DARTS+6;
public static final int POISON_DART = TIPPED_DARTS+7;
public static final int SLEEP_DART = TIPPED_DARTS+8;
public static final int PARALYTIC_DART = TIPPED_DARTS+9;
public static final int ADRENALINE_DART = TIPPED_DARTS+2;
public static final int HEALING_DART = TIPPED_DARTS+3;
public static final int CHILLING_DART = TIPPED_DARTS+4;
public static final int SHOCKING_DART = TIPPED_DARTS+5;
public static final int POISON_DART = TIPPED_DARTS+6;
public static final int SLEEP_DART = TIPPED_DARTS+7;
public static final int PARALYTIC_DART = TIPPED_DARTS+8;
public static final int HOLY_DART = TIPPED_DARTS+9;
public static final int DISPLACING_DART = TIPPED_DARTS+10;
public static final int BLINDING_DART = TIPPED_DARTS+11;
static {
for (int i = TIPPED_DARTS; i < TIPPED_DARTS+16; i++)
assignItemRect(i, 15, 15);
@ -433,19 +434,19 @@ public class ItemSpriteSheet {
assignItemRect(i, 10, 14);
}
private static final int SEEDS = xy(1, 23); //16 slots
public static final int SEED_ROTBERRY = SEEDS+0;
public static final int SEED_FIREBLOOM = SEEDS+1;
public static final int SEED_STARFLOWER = SEEDS+2;
public static final int SEED_BLINDWEED = SEEDS+3;
public static final int SEED_SUNGRASS = SEEDS+4;
public static final int SEED_ICECAP = SEEDS+5;
public static final int SEED_STORMVINE = SEEDS+6;
public static final int SEED_SORROWMOSS = SEEDS+7;
public static final int SEED_DREAMFOIL = SEEDS+8;
public static final int SEED_EARTHROOT = SEEDS+9;
public static final int SEED_FADELEAF = SEEDS+10;
public static final int SEED_BLANDFRUIT = SEEDS+11;
private static final int SEEDS = xy(1, 23); //16 slots
public static final int SEED_ROTBERRY = SEEDS+0;
public static final int SEED_FIREBLOOM = SEEDS+1;
public static final int SEED_SWIFTTHISTLE = SEEDS+2;
public static final int SEED_SUNGRASS = SEEDS+3;
public static final int SEED_ICECAP = SEEDS+4;
public static final int SEED_STORMVINE = SEEDS+5;
public static final int SEED_SORROWMOSS = SEEDS+6;
public static final int SEED_DREAMFOIL = SEEDS+7;
public static final int SEED_EARTHROOT = SEEDS+8;
public static final int SEED_STARFLOWER = SEEDS+9;
public static final int SEED_FADELEAF = SEEDS+10;
public static final int SEED_BLINDWEED = SEEDS+11;
static{
for (int i = SEEDS; i < SEEDS+16; i++)
assignItemRect(i, 10, 10);