V0.2.0: implemented Sandals of nature sprite, Sandals final form now named greaves (was leggings)

This commit is contained in:
Evan Debenham 2014-09-15 01:34:01 -04:00
parent 61ea02d3d1
commit eb42461b03
3 changed files with 9 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -26,7 +26,7 @@ import java.util.Collections;
* Created by debenhame on 08/09/2014. * Created by debenhame on 08/09/2014.
*/ */
public class SandalsOfNature extends Artifact { public class SandalsOfNature extends Artifact {
//todo: test, add sprite switching, number tweaking. //todo: polish, tweak the greaves sprite a little, it's too neat/needs to be more messy.
{ {
name = "Sandals of Nature"; name = "Sandals of Nature";
@ -38,7 +38,7 @@ public class SandalsOfNature extends Artifact {
} }
public static final String[] NAMES = {"Sandals of Nature", "Shoes of Nature", public static final String[] NAMES = {"Sandals of Nature", "Shoes of Nature",
"Boots of Nature", "Leggings of Nature"}; "Boots of Nature", "Greaves of Nature"};
public static final String AC_FEED = "FEED"; public static final String AC_FEED = "FEED";
public static final String AC_ROOT = "ROOT"; public static final String AC_ROOT = "ROOT";
@ -95,16 +95,19 @@ public class SandalsOfNature extends Artifact {
private static final String SEEDS = "seeds"; private static final String SEEDS = "seeds";
private static final String NAME = "name";
@Override @Override
public void storeInBundle( Bundle bundle ) { public void storeInBundle( Bundle bundle ) {
super.storeInBundle(bundle); super.storeInBundle(bundle);
bundle.put(NAME, name);
bundle.put(SEEDS, seeds.toArray(new String[seeds.size()])); bundle.put(SEEDS, seeds.toArray(new String[seeds.size()]));
} }
@Override @Override
public void restoreFromBundle( Bundle bundle ) { public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle(bundle); super.restoreFromBundle(bundle);
name = bundle.getString( NAME );
if (bundle.contains(SEEDS)) if (bundle.contains(SEEDS))
Collections.addAll(seeds , bundle.getStringArray(SEEDS)); Collections.addAll(seeds , bundle.getStringArray(SEEDS));
} }
@ -131,7 +134,7 @@ public class SandalsOfNature extends Artifact {
hero.sprite.operate( hero.pos ); hero.sprite.operate( hero.pos );
hero.busy(); hero.busy();
hero.spend( 2f ); hero.spend( 2f );
if (seeds.size() >= 5+level){ if (seeds.size() >= 2){
seeds.clear(); seeds.clear();
upgrade(); upgrade();
if (level >= 1 && level <= 3) { if (level >= 1 && level <= 3) {
@ -145,7 +148,7 @@ public class SandalsOfNature extends Artifact {
else if (level == 2) else if (level == 2)
image = ItemSpriteSheet.ARTIFACT_BOOTS; image = ItemSpriteSheet.ARTIFACT_BOOTS;
else if (level >= 3) else if (level >= 3)
image = ItemSpriteSheet.ARTIFACT_LEGGINGS; image = ItemSpriteSheet.ARTIFACT_GREAVES;
} else { } else {
GLog.i("Your " + name + " absorb the seed, they seem healthier."); GLog.i("Your " + name + " absorb the seed, they seem healthier.");
} }

View File

@ -134,7 +134,7 @@ public class ItemSpriteSheet {
public static final int ARTIFACT_CLOAK = ROW8+0; public static final int ARTIFACT_CLOAK = ROW8+0;
public static final int ARTIFACT_ARMBAND = ROW8+1; public static final int ARTIFACT_ARMBAND = ROW8+1;
public static final int ARTIFACT_CAPE = ROW8+2; public static final int ARTIFACT_CAPE = ROW8+2;
public static final int ARTIFACT_TALISMAN = 0; public static final int ARTIFACT_TALISMAN = ROW8+3;
//Row Nine: Artifacts with Dynamic Images //Row Nine: Artifacts with Dynamic Images
@ -148,7 +148,7 @@ public class ItemSpriteSheet {
public static final int ARTIFACT_SANDALS = ROW9+7; public static final int ARTIFACT_SANDALS = ROW9+7;
public static final int ARTIFACT_SHOES = ROW9+8; public static final int ARTIFACT_SHOES = ROW9+8;
public static final int ARTIFACT_BOOTS = ROW9+9; public static final int ARTIFACT_BOOTS = ROW9+9;
public static final int ARTIFACT_LEGGINGS = ROW9+10; public static final int ARTIFACT_GREAVES = ROW9+10;
//Row Ten: Scrolls //Row Ten: Scrolls
public static final int SCROLL_KAUNAN = ROW10+0; public static final int SCROLL_KAUNAN = ROW10+0;