v0.9.3: improved sprites/vfx/sfx for mask and crown

This commit is contained in:
Evan Debenham 2021-06-04 13:08:12 -04:00
parent 6e685f7fe1
commit a3f449815a
8 changed files with 27 additions and 24 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -51,8 +51,8 @@ public class Speck extends Image {
public static final int DISCOVER = 101;
public static final int EVOKE = 102;
public static final int MASTERY = 103;
public static final int KIT = 104;
public static final int MASK = 103;
public static final int CROWN = 104;
public static final int RATTLE = 105;
public static final int JET = 106;
public static final int TOXIC = 107;
@ -116,8 +116,8 @@ public class Speck extends Image {
frame( film.get( LIGHT ) );
break;
case EVOKE:
case MASTERY:
case KIT:
case MASK:
case CROWN:
case FORGE:
frame( film.get( STAR ) );
break;
@ -184,19 +184,19 @@ public class Speck extends Image {
angularSpeed = Random.Float( -180, +180 );
lifespan = 1f;
break;
case KIT:
case MASK:
speed.polar( index * 3.1415926f / 5, 50 );
acc.set( -speed.x, -speed.y );
angle = index * 36;
angularSpeed = 360;
lifespan = 1f;
break;
case MASTERY:
speed.set( Random.Int( 2 ) == 0 ? Random.Float( -128, -64 ) : Random.Float( +64, +128 ), 0 );
angularSpeed = speed.x < 0 ? -180 : +180;
acc.set( -speed.x, 0 );
case CROWN:
acc.set( index % 2 == 0 ? Random.Float( -512, -256 ) : Random.Float( +256, +512 ), 0 );
angularSpeed = acc.x < 0 ? -180 : +180;
//acc.set( -speed.x, 0 );
lifespan = 0.5f;
break;
@ -402,8 +402,8 @@ public class Speck extends Image {
am = p < 0.2f ? p * 5f : (1 - p) * 1.25f;
break;
case KIT:
case MASTERY:
case MASK:
case CROWN:
am = 1 - p * p;
break;

View File

@ -30,6 +30,7 @@ import com.watabou.noosa.TextureFilm;
import java.util.HashMap;
//FIXME this is seriously underused atm, should add more of these!
public class SpellSprite extends Image {
public static final int FOOD = 0;

View File

@ -88,8 +88,7 @@ public class KingsCrown extends Item {
detach(hero.belongings.backpack);
hero.sprite.centerEmitter().start(Speck.factory(Speck.KIT), 0.05f, 10);
//TODO add a spell icon?
hero.sprite.emitter().burst( Speck.factory( Speck.CROWN), 12 );
hero.spend(Actor.TICK);
hero.busy();

View File

@ -28,13 +28,13 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndChooseSubclass;
import com.watabou.noosa.audio.Sample;
import com.watabou.noosa.particles.Emitter;
import java.util.ArrayList;
@ -99,8 +99,9 @@ public class TengusMask extends Item {
curUser.sprite.operate( curUser.pos );
Sample.INSTANCE.play( Assets.Sounds.MASTERY );
SpellSprite.show( curUser, SpellSprite.MASTERY ); //TODO new spell icon!
curUser.sprite.emitter().burst( Speck.factory( Speck.MASTERY ), 12 );
Emitter e = curUser.sprite.centerEmitter();
e.pos(e.x-2, e.y-6, 4, 4);
e.start(Speck.factory(Speck.MASK), 0.05f, 20);
GLog.p( Messages.get(this, "used"));
}

View File

@ -137,8 +137,8 @@ public class ItemSpriteSheet {
public static final int GOLDEN_KEY = MISC_CONSUMABLE +8;
public static final int CRYSTAL_KEY = MISC_CONSUMABLE +9;
public static final int SKELETON_KEY = MISC_CONSUMABLE +10;
public static final int MASK = MISC_CONSUMABLE +11; //FIXME placeholder sprite
public static final int CROWN = MISC_CONSUMABLE +12; //FIXME placeholder sprite
public static final int MASK = MISC_CONSUMABLE +11;
public static final int CROWN = MISC_CONSUMABLE +12;
public static final int AMULET = MISC_CONSUMABLE +13;
public static final int MASTERY = MISC_CONSUMABLE +14;
public static final int KIT = MISC_CONSUMABLE +15;
@ -156,8 +156,8 @@ public class ItemSpriteSheet {
assignItemRect(GOLDEN_KEY, 8, 14);
assignItemRect(CRYSTAL_KEY, 8, 14);
assignItemRect(SKELETON_KEY, 8, 14);
assignItemRect(MASK, 9, 9);
assignItemRect(CROWN, 13, 6);
assignItemRect(MASK, 11, 9);
assignItemRect(CROWN, 13, 7);
assignItemRect(AMULET, 16, 16);
assignItemRect(MASTERY, 13, 16);
assignItemRect(KIT, 16, 15);

View File

@ -68,7 +68,7 @@ public class WndChooseAbility extends Window {
RedButton abilityButton = new RedButton(ability.shortDesc(), 6){
@Override
protected void onClick() {
GameScene.show(new WndOptions(new Image(hero.heroClass.spritesheet(), 0, 90, 12, 15),
GameScene.show(new WndOptions( new ItemSprite( crown == null ? armor.image() : crown.image(), null ),
Messages.titleCase(ability.name()),
Messages.get(WndChooseAbility.this, "are_you_sure"),
Messages.get(WndChooseAbility.this, "yes"),

View File

@ -4,6 +4,8 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbility;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.ui.TalentsPane;
import com.watabou.noosa.Image;
@ -13,7 +15,7 @@ import java.util.LinkedHashMap;
public class WndInfoArmorAbility extends WndTitledMessage {
public WndInfoArmorAbility(HeroClass cls, ArmorAbility ability){
super( new Image(cls.spritesheet(), 0, 90, 12, 15), Messages.titleCase(ability.name()), ability.desc());
super( new ItemSprite( ItemSpriteSheet.CROWN, null ), Messages.titleCase(ability.name()), ability.desc());
ArrayList<LinkedHashMap<Talent, Integer>> talentList = new ArrayList<>();
Talent.initArmorTalents(ability, talentList);