V0.2.0: Implemented further Sandal logic, small tweak to horn logic.
This commit is contained in:
parent
2070bffb0e
commit
b60478233d
Binary file not shown.
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.6 KiB |
|
@ -178,7 +178,7 @@ public class HornOfPlenty extends Artifact {
|
||||||
GLog.p("your horn has consumed all the food it can!");
|
GLog.p("your horn has consumed all the food it can!");
|
||||||
} else
|
} else
|
||||||
GLog.p("the horn consumes your food offering and grows in strength!");
|
GLog.p("the horn consumes your food offering and grows in strength!");
|
||||||
item.detach(Dungeon.hero.belongings.backpack);
|
item.detach(hero.belongings.backpack);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,9 @@ public class SandalsOfNature extends Artifact {
|
||||||
//partialcharge, chargeCap and exp are unused
|
//partialcharge, chargeCap and exp are unused
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final String[] NAMES = {"Sandals of Nature", "Shoes of Nature",
|
||||||
|
"Boots of Nature", "Leggings 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";
|
||||||
|
|
||||||
|
@ -121,12 +124,30 @@ public class SandalsOfNature extends Artifact {
|
||||||
public void onSelect( Item item ) {
|
public void onSelect( Item item ) {
|
||||||
if (item != null && item instanceof Plant.Seed) {
|
if (item != null && item instanceof Plant.Seed) {
|
||||||
if (seeds.contains(item.name())){
|
if (seeds.contains(item.name())){
|
||||||
GLog.w("The plant has already gained nutrients from that seed.");
|
GLog.w("Your " + name + " have already gained nutrients from that seed recently.");
|
||||||
} else {
|
} else {
|
||||||
seeds.add(item.name());
|
seeds.add(item.name());
|
||||||
|
Hero hero = Dungeon.hero;
|
||||||
|
hero.sprite.operate( hero.pos );
|
||||||
|
hero.busy();
|
||||||
|
hero.spend( 2f );
|
||||||
if (seeds.size() >= 5+level){
|
if (seeds.size() >= 5+level){
|
||||||
seeds.clear();
|
seeds.clear();
|
||||||
upgrade();
|
upgrade();
|
||||||
|
if (level >= 1 && level <= 3) {
|
||||||
|
GLog.p("Your " + name + " surge in size, they are now " + NAMES[level] + "!");
|
||||||
|
name = NAMES[level];
|
||||||
|
}
|
||||||
|
if (level <= 0)
|
||||||
|
image = ItemSpriteSheet.ARTIFACT_SANDALS;
|
||||||
|
else if (level == 1)
|
||||||
|
image = ItemSpriteSheet.ARTIFACT_SHOES;
|
||||||
|
else if (level == 2)
|
||||||
|
image = ItemSpriteSheet.ARTIFACT_BOOTS;
|
||||||
|
else if (level >= 3)
|
||||||
|
image = ItemSpriteSheet.ARTIFACT_LEGGINGS;
|
||||||
|
} else {
|
||||||
|
GLog.i("Your " + name + " absorb the seed, they seem healthier.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user