V0.2.0: Added polish to artifacts
This commit is contained in:
parent
7ef7f1715a
commit
3b1ef686ba
|
@ -15,7 +15,7 @@ import java.util.ArrayList;
|
||||||
* Created by Evan on 24/08/2014.
|
* Created by Evan on 24/08/2014.
|
||||||
*/
|
*/
|
||||||
public class Artifact extends KindofMisc {
|
public class Artifact extends KindofMisc {
|
||||||
//TODO: add artifact transform method and tie it into well of transformation
|
//TODO: add artifact transform method and tie it into well of transformation, potentially delayed to 0.2.1
|
||||||
{
|
{
|
||||||
levelKnown = true;
|
levelKnown = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,8 @@ import com.watabou.utils.Random;
|
||||||
* Created by debenhame on 03/09/2014.
|
* Created by debenhame on 03/09/2014.
|
||||||
*/
|
*/
|
||||||
public class CapeOfThorns extends Artifact {
|
public class CapeOfThorns extends Artifact {
|
||||||
//TODO: add polish, testing, numbers tweaking
|
//TODO: testing, numbers tweaking
|
||||||
|
//TODO: final surface test
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "Cape of Thorns";
|
name = "Cape of Thorns";
|
||||||
|
@ -46,8 +47,20 @@ public class CapeOfThorns extends Artifact {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String desc() {
|
public String desc() {
|
||||||
//TODO: add description
|
String desc = "These collapsed sheets of metal from the DM-300 have formed together into a rigid wearable " +
|
||||||
return "";
|
"cape. The metal is old and coated in thick flakes of rust. It seems to store a deep energy, " +
|
||||||
|
"perhaps it has some of the DM-300's power?";
|
||||||
|
if (isEquipped( Dungeon.hero )) {
|
||||||
|
desc += "\n\n";
|
||||||
|
if (timer == 0)
|
||||||
|
desc += "The cape feels reassuringly heavy on your shoulders. You're not sure if it will directly " +
|
||||||
|
"help you in a fight, but it seems to be gaining energy from the battles you are in.";
|
||||||
|
else
|
||||||
|
desc += "The cape seems to be releasing some stored energy, it is radiating power at all angles. " +
|
||||||
|
"You feel very confident that the cape can protect you right now.";
|
||||||
|
}
|
||||||
|
|
||||||
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -64,8 +77,10 @@ public class CapeOfThorns extends Artifact {
|
||||||
public boolean act(){
|
public boolean act(){
|
||||||
if (timer > 0) {
|
if (timer > 0) {
|
||||||
timer--;
|
timer--;
|
||||||
if (timer == 0)
|
if (timer == 0) {
|
||||||
BuffIndicator.refreshHero();
|
BuffIndicator.refreshHero();
|
||||||
|
GLog.w("Your Cape becomes inert again.");
|
||||||
|
}
|
||||||
QuickSlot.refresh();
|
QuickSlot.refresh();
|
||||||
}
|
}
|
||||||
spend(TICK);
|
spend(TICK);
|
||||||
|
@ -75,9 +90,10 @@ public class CapeOfThorns extends Artifact {
|
||||||
public int proc(int damage, Char attacker){
|
public int proc(int damage, Char attacker){
|
||||||
if (timer == 0){
|
if (timer == 0){
|
||||||
charge += damage*(0.5+level*0.025);
|
charge += damage*(0.5+level*0.025);
|
||||||
if (charge > chargeCap){
|
if (charge >= chargeCap){
|
||||||
charge = 0;
|
charge = 0;
|
||||||
timer = 5+level;
|
timer = 5+level;
|
||||||
|
GLog.p("Your Cape begins radiating energy, you feel protected!");
|
||||||
BuffIndicator.refreshHero();
|
BuffIndicator.refreshHero();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ import java.util.ArrayList;
|
||||||
* Created by debenhame on 27/08/2014.
|
* Created by debenhame on 27/08/2014.
|
||||||
*/
|
*/
|
||||||
public class ChaliceOfBlood extends Artifact {
|
public class ChaliceOfBlood extends Artifact {
|
||||||
//TODO: add polish
|
//TODO: final surface test
|
||||||
|
|
||||||
private static final String TXT_CHALICE = "Chalice of Blood";
|
private static final String TXT_CHALICE = "Chalice of Blood";
|
||||||
private static final String TXT_YES = "Yes, I know what I'm doing";
|
private static final String TXT_YES = "Yes, I know what I'm doing";
|
||||||
|
@ -30,6 +30,7 @@ public class ChaliceOfBlood extends Artifact {
|
||||||
"if you are not careful this draining effect can easily kill you.\n\n"+
|
"if you are not careful this draining effect can easily kill you.\n\n"+
|
||||||
"Are you sure you want to offer it more life energy?";
|
"Are you sure you want to offer it more life energy?";
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "Chalice of Blood";
|
name = "Chalice of Blood";
|
||||||
image = ItemSpriteSheet.ARTIFACT_CHALICE1;
|
image = ItemSpriteSheet.ARTIFACT_CHALICE1;
|
||||||
|
@ -87,7 +88,7 @@ public class ChaliceOfBlood extends Artifact {
|
||||||
|
|
||||||
//TODO: make sure this look good
|
//TODO: make sure this look good
|
||||||
if (damage <= 0){
|
if (damage <= 0){
|
||||||
GLog.i("You prick yourself, that hardly hurt at all!");
|
GLog.i("You prick yourself, and your blood drips into the chalice.");
|
||||||
} else if (damage < 25){
|
} else if (damage < 25){
|
||||||
GLog.w("You prick yourself and the chalice feeds on you.");
|
GLog.w("You prick yourself and the chalice feeds on you.");
|
||||||
Sample.INSTANCE.play(Assets.SND_CURSED);
|
Sample.INSTANCE.play(Assets.SND_CURSED);
|
||||||
|
@ -105,8 +106,6 @@ public class ChaliceOfBlood extends Artifact {
|
||||||
if (damage > 0)
|
if (damage > 0)
|
||||||
hero.damage(damage, this);
|
hero.damage(damage, this);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!hero.isAlive()) {
|
if (!hero.isAlive()) {
|
||||||
Dungeon.fail(Utils.format(ResultDescriptions.ITEM, name, Dungeon.depth));
|
Dungeon.fail(Utils.format(ResultDescriptions.ITEM, name, Dungeon.depth));
|
||||||
GLog.n("The Chalice sucks your life essence dry...");
|
GLog.n("The Chalice sucks your life essence dry...");
|
||||||
|
@ -127,8 +126,33 @@ public class ChaliceOfBlood extends Artifact {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String desc() {
|
public String desc() {
|
||||||
//TODO: add description
|
String desc = "This shining silver chalice is oddly adorned with sharp gems at the rim. ";
|
||||||
return "";
|
if (level < 10)
|
||||||
|
desc += "The chalice is pulling your attention strangely, you feel like it wants something from you.";
|
||||||
|
else
|
||||||
|
desc += "The chalice is full and radiating energy.";
|
||||||
|
|
||||||
|
if (isEquipped (Dungeon.hero)){
|
||||||
|
desc += "\n\n";
|
||||||
|
if (level == 0)
|
||||||
|
desc += "As you hold the chalice, you feel oddly compelled to prick yourself on the sharp gems.";
|
||||||
|
else if (level < 3)
|
||||||
|
desc += "Some of your blood is pooled into the chalice, you can subtly feel the chalice feeding " +
|
||||||
|
"energy into you. You still want to cut yourself on the chalice, even though you know it will hurt.";
|
||||||
|
else if (level < 6)
|
||||||
|
desc += "The chalice is about half full of your blood and the connection you feel to it has grown " +
|
||||||
|
"stronger. you still want to hurt yourself, the chalice needs your energy, it's your friend.";
|
||||||
|
else if (level < 10)
|
||||||
|
desc += "The chalice is getting pretty full, and the life force it's feeding you is stronger than " +
|
||||||
|
"ever. You should give it more energy, you need too, your friend needs your energy, it needs " +
|
||||||
|
"your help. Your friend knows you have limits though, it doesn't want you to die, just bleed.";
|
||||||
|
else
|
||||||
|
desc += "The chalice is filled to the brim with your life essence. Despite how full it is it doesn't " +
|
||||||
|
"seem to be able to spill. It's your best friend. It's happy with you. So happy. " +
|
||||||
|
"You've done well. So well. You're being rewarded. You don't need to touch the sharp gems anymore.";
|
||||||
|
}
|
||||||
|
|
||||||
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class chaliceRegen extends ArtifactBuff {
|
public class chaliceRegen extends ArtifactBuff {
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.artifacts;
|
||||||
|
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
@ -19,7 +20,7 @@ import java.util.ArrayList;
|
||||||
* Created by debenhame on 25/08/2014.
|
* Created by debenhame on 25/08/2014.
|
||||||
*/
|
*/
|
||||||
public class CloakOfShadows extends Artifact {
|
public class CloakOfShadows extends Artifact {
|
||||||
//TODO: final numbers tweaking, add polish
|
//TODO: final surface testing
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "Cloak of Shadows";
|
name = "Cloak of Shadows";
|
||||||
|
@ -28,13 +29,12 @@ public class CloakOfShadows extends Artifact {
|
||||||
levelCap = 15;
|
levelCap = 15;
|
||||||
charge = level+5;
|
charge = level+5;
|
||||||
chargeCap = level+5;
|
chargeCap = level+5;
|
||||||
|
exp = 0;
|
||||||
defaultAction = AC_STEALTH;
|
defaultAction = AC_STEALTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean stealthed = false;
|
private boolean stealthed = false;
|
||||||
|
|
||||||
private int exp = 0;
|
|
||||||
|
|
||||||
public static final String AC_STEALTH = "STEALTH";
|
public static final String AC_STEALTH = "STEALTH";
|
||||||
|
|
||||||
private static final String TXT_CHARGE = "%d/%d";
|
private static final String TXT_CHARGE = "%d/%d";
|
||||||
|
@ -80,7 +80,7 @@ public class CloakOfShadows extends Artifact {
|
||||||
activeBuff.detach();
|
activeBuff.detach();
|
||||||
activeBuff = null;
|
activeBuff = null;
|
||||||
hero.sprite.operate( hero.pos );
|
hero.sprite.operate( hero.pos );
|
||||||
GLog.i("You return from behind your cloak.");
|
GLog.i("You return from underneath your cloak.");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -88,7 +88,7 @@ public class CloakOfShadows extends Artifact {
|
||||||
stealthed = false;
|
stealthed = false;
|
||||||
activeBuff.detach();
|
activeBuff.detach();
|
||||||
activeBuff = null;
|
activeBuff = null;
|
||||||
GLog.i("You return from behind your cloak.");
|
GLog.i("You return from underneath your cloak.");
|
||||||
}
|
}
|
||||||
|
|
||||||
super.execute(hero, action);
|
super.execute(hero, action);
|
||||||
|
@ -116,8 +116,25 @@ public class CloakOfShadows extends Artifact {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String desc() {
|
public String desc() {
|
||||||
//TODO: add description
|
String desc = "This light silken cloak shimmers in and out of your vision as it sways in the air. When worn, " +
|
||||||
return "";
|
"it can be used to hide your presence for a short time. The cloak's magic is finicky, and it will " +
|
||||||
|
"both run out of power quickly, and require a short cooldown between uses.\n\n";
|
||||||
|
|
||||||
|
if (level < 5)
|
||||||
|
desc += "The cloak's magic has faded and it is not very powerful, perhaps it will regan strength though use";
|
||||||
|
else if (level < 10)
|
||||||
|
desc += "The cloak's power has begun to return.";
|
||||||
|
else if (level < 15)
|
||||||
|
desc += "The cloak has almost returned to full strength.";
|
||||||
|
else
|
||||||
|
desc += "The cloak is at full potential and will work for extended durations.";
|
||||||
|
|
||||||
|
|
||||||
|
if ( isEquipped (Dungeon.hero) )
|
||||||
|
desc += "\n\nThe cloak rests around your shoulders, shrouding you from the world.";
|
||||||
|
|
||||||
|
|
||||||
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -128,6 +145,7 @@ public class CloakOfShadows extends Artifact {
|
||||||
return Utils.format(TXT_CD, cooldown);
|
return Utils.format(TXT_CD, cooldown);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Note: cloak needs to bundle chargecap as it is dynamic.
|
||||||
private static final String CHARGECAP = "chargecap";
|
private static final String CHARGECAP = "chargecap";
|
||||||
private static final String STEALTHED = "stealthed";
|
private static final String STEALTHED = "stealthed";
|
||||||
private static final String COOLDOWN = "cooldown";
|
private static final String COOLDOWN = "cooldown";
|
||||||
|
@ -159,7 +177,6 @@ public class CloakOfShadows extends Artifact {
|
||||||
charge++;
|
charge++;
|
||||||
partialCharge -= 1;
|
partialCharge -= 1;
|
||||||
if (charge == chargeCap){
|
if (charge == chargeCap){
|
||||||
GLog.p("Your cloak is fully charged.");
|
|
||||||
partialCharge = 0;
|
partialCharge = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,11 +218,11 @@ public class CloakOfShadows extends Artifact {
|
||||||
if (charge <= 0) {
|
if (charge <= 0) {
|
||||||
detach();
|
detach();
|
||||||
GLog.w("Your cloak has run out of energy.");
|
GLog.w("Your cloak has run out of energy.");
|
||||||
|
((Hero)target).interrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
exp += 10 + ((Hero)target).lvl;
|
exp += 10 + ((Hero)target).lvl;
|
||||||
|
|
||||||
//max level is 15 (20 charges)
|
|
||||||
if (exp >= (level+1)*50 && level < levelCap) {
|
if (exp >= (level+1)*50 && level < levelCap) {
|
||||||
upgrade();
|
upgrade();
|
||||||
chargeCap++;
|
chargeCap++;
|
||||||
|
|
|
@ -26,7 +26,7 @@ import java.util.ArrayList;
|
||||||
*/
|
*/
|
||||||
public class HornOfPlenty extends Artifact {
|
public class HornOfPlenty extends Artifact {
|
||||||
|
|
||||||
//TODO: add polish.
|
//TODO: final surface testing
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "Horn of Plenty";
|
name = "Horn of Plenty";
|
||||||
|
@ -112,8 +112,34 @@ public class HornOfPlenty extends Artifact {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String desc() {
|
public String desc() {
|
||||||
//TODO: add description
|
String desc = "This horn can't be blown into, but instead seems to fill up with food over time.\n\n";
|
||||||
return "";
|
|
||||||
|
if (charge == 0)
|
||||||
|
desc += "The horn is completely empty.";
|
||||||
|
else if (charge < 3)
|
||||||
|
desc += "The horn is almost empty, a few small fruits and berries sit in the back.";
|
||||||
|
else if (charge < 7)
|
||||||
|
desc += "The horn is partially filled, you can see several fruits & vegetables inside.";
|
||||||
|
else if (charge < 10)
|
||||||
|
desc += "The horn is getting quite full, several pieces of fresh produce are poking up towards the front.";
|
||||||
|
else
|
||||||
|
desc += "The horn is overflowing! A delicious array of fruit and veg is filling the horn up to its brim.";
|
||||||
|
|
||||||
|
if ( isEquipped( Dungeon.hero ) ){
|
||||||
|
desc += "\n\nThe horn rests as your side, and is surprisingly lightweight, even with food in it. ";
|
||||||
|
|
||||||
|
if (level < 15)
|
||||||
|
desc += "It seems to have lost most of its power though, filling up very slowly.";
|
||||||
|
else if (level < 30)
|
||||||
|
desc += "It seems to have regained some of it's power, it fills up more quickly now.";
|
||||||
|
else
|
||||||
|
desc += "The horn seems to be at full power, generating food very quickly.";
|
||||||
|
|
||||||
|
if (level < 15)
|
||||||
|
desc += " Perhaps there is a way to regain the horn's power by giving it food energy.";
|
||||||
|
}
|
||||||
|
|
||||||
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -129,6 +155,7 @@ public class HornOfPlenty extends Artifact {
|
||||||
|
|
||||||
//generates 0.2 food value every round, +0.02 value per level
|
//generates 0.2 food value every round, +0.02 value per level
|
||||||
//to a max of 0.8 food value per round (0.2+0.6, at level 30)
|
//to a max of 0.8 food value per round (0.2+0.6, at level 30)
|
||||||
|
//TODO: revert this to proper logic after testing
|
||||||
partialCharge += 18;
|
partialCharge += 18;
|
||||||
|
|
||||||
//charge is in increments of 36 food value.
|
//charge is in increments of 36 food value.
|
||||||
|
@ -146,7 +173,7 @@ public class HornOfPlenty extends Artifact {
|
||||||
image = ItemSpriteSheet.ARTIFACT_HORN1;
|
image = ItemSpriteSheet.ARTIFACT_HORN1;
|
||||||
|
|
||||||
if (charge == chargeCap){
|
if (charge == chargeCap){
|
||||||
GLog.p("Your horn is full of food.");
|
GLog.p("Your horn is full of food!");
|
||||||
partialCharge = 0;
|
partialCharge = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items.artifacts;
|
package com.shatteredpixel.shatteredpixeldungeon.items.artifacts;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Shopkeeper;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Shopkeeper;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
@ -11,7 +12,7 @@ import com.watabou.utils.Random;
|
||||||
* Created by debenhame on 03/09/2014.
|
* Created by debenhame on 03/09/2014.
|
||||||
*/
|
*/
|
||||||
public class MasterThievesArmband extends Artifact {
|
public class MasterThievesArmband extends Artifact {
|
||||||
//TODO: polish, numbers tweaking
|
//TODO: final surface test
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "Master Thieves' Armband";
|
name = "Master Thieves' Armband";
|
||||||
|
@ -39,8 +40,15 @@ public class MasterThievesArmband extends Artifact {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String desc() {
|
public String desc() {
|
||||||
//TODO: add description
|
String desc = "This purple velvet armband bears the mark of a master thief. This doesn't belong to you, but " +
|
||||||
return "";
|
"you doubt it belonged to the person you took it from either.";
|
||||||
|
|
||||||
|
if ( isEquipped (Dungeon.hero) )
|
||||||
|
desc += "\n\nWith the armband around your wrist you feel more dexterous and cunning. Every piece of gold " +
|
||||||
|
"you find makes you desire others property more. " +
|
||||||
|
"You wonder if Pixel Mart accepts the five finger discount...";
|
||||||
|
|
||||||
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Thievery extends ArtifactBuff{
|
public class Thievery extends ArtifactBuff{
|
||||||
|
|
|
@ -26,7 +26,9 @@ 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: polish, tweak the greaves sprite a little, it's too neat/needs to be more messy.
|
//TODO: tweak the greaves sprite a little, it's too neat/needs to be more messy.
|
||||||
|
//TODO: test the description to this one, it's massive =S.
|
||||||
|
//TODO: final surface testing
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "Sandals of Nature";
|
name = "Sandals of Nature";
|
||||||
|
@ -89,8 +91,51 @@ public class SandalsOfNature extends Artifact {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String desc() {
|
public String desc() {
|
||||||
//TODO: add description
|
String desc = "";
|
||||||
return "";
|
if (level == 0)
|
||||||
|
desc += "What initially seem like sandals made of twine are actually two plants! The footwear moves ever " +
|
||||||
|
"so slightly when being held. They seem very weak and pale, perhaps they need to be given nutrients?";
|
||||||
|
else if (level == 1)
|
||||||
|
desc += "The footwear has grown and now more closely resemble two tailored shoes. They seem to match the " +
|
||||||
|
"contours of your feet exactly. Some colour has returned to them, perhaps they can still grow further?";
|
||||||
|
else if (level == 2)
|
||||||
|
desc += "The plants have grown again and now resembles a pair of solid tall boots. They appear to be made" +
|
||||||
|
" of solid bark more than vine now, yet are still very flexible. The plants seem to have " +
|
||||||
|
"regained their strength, but perhaps they can still grow further";
|
||||||
|
else
|
||||||
|
desc += "Now almost tall enough to make full pants, the bark-mesh artifact seems to have reached its " +
|
||||||
|
"maximum size. Perhaps the two plants don't want to merge together? The greaves are a deep brown " +
|
||||||
|
"and resemble a very sturdy tree.";
|
||||||
|
|
||||||
|
if ( isEquipped ( Dungeon.hero ) ){
|
||||||
|
desc += "\n\n";
|
||||||
|
if (level == 0)
|
||||||
|
desc += "The sandals wrap snugly around your feet, they seem happy to be worn.";
|
||||||
|
else if (level == 1)
|
||||||
|
desc += "The shoes fit on loosely but quickly tighten to make a perfect fit.";
|
||||||
|
else if (level == 2)
|
||||||
|
desc += "The boots fit snugly and add a nice heft to your step.";
|
||||||
|
else
|
||||||
|
desc += "The greaves are thick and weighty, but very easy to move in, as if they are moving with you.";
|
||||||
|
|
||||||
|
desc += " You feel more attuned with nature while wearing them.";
|
||||||
|
|
||||||
|
if (level > 0)
|
||||||
|
desc += " The footwear has gained the ability to form up into a sort of immobile armour temporarily, " +
|
||||||
|
"but will need to charge up for it.";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!seeds.isEmpty()){
|
||||||
|
desc += "\n\nYou have recently fed this Artifact the following seeds:";
|
||||||
|
String[] seedsArray = seeds.toArray(new String[seeds.size()]);
|
||||||
|
|
||||||
|
for (int i = 0; i < seedsArray.length-1; i++)
|
||||||
|
desc += " " + seedsArray[i].substring(8) + ",";
|
||||||
|
|
||||||
|
desc += " " + seedsArray[seedsArray.length-1].substring(8) + ".";
|
||||||
|
}
|
||||||
|
|
||||||
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,8 @@ import java.util.ArrayList;
|
||||||
* Created by debenhame on 08/09/2014.
|
* Created by debenhame on 08/09/2014.
|
||||||
*/
|
*/
|
||||||
public class TalismanOfForesight extends Artifact {
|
public class TalismanOfForesight extends Artifact {
|
||||||
//TODO: shade sprite, polish.
|
//TODO: shade sprite.
|
||||||
|
//TODO: final surface test
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "Talisman of Foresight";
|
name = "Talisman of Foresight";
|
||||||
|
@ -60,7 +61,6 @@ public class TalismanOfForesight extends Artifact {
|
||||||
int terr = Dungeon.level.map[i];
|
int terr = Dungeon.level.map[i];
|
||||||
if ((Terrain.flags[terr] & Terrain.SECRET) != 0) {
|
if ((Terrain.flags[terr] & Terrain.SECRET) != 0) {
|
||||||
|
|
||||||
//Level.set( i, Terrain.discover( terr ) );
|
|
||||||
GameScene.updateMap( i );
|
GameScene.updateMap( i );
|
||||||
|
|
||||||
if (Dungeon.visible[i]) {
|
if (Dungeon.visible[i]) {
|
||||||
|
@ -69,6 +69,8 @@ public class TalismanOfForesight extends Artifact {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLog.p ("The Talisman floods your mind with knowledge about the current floor.");
|
||||||
|
|
||||||
Buff.affect(hero, Awareness.class, Awareness.DURATION);
|
Buff.affect(hero, Awareness.class, Awareness.DURATION);
|
||||||
Dungeon.observe();
|
Dungeon.observe();
|
||||||
|
|
||||||
|
@ -87,8 +89,18 @@ public class TalismanOfForesight extends Artifact {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String desc() {
|
public String desc() {
|
||||||
//TODO: add description
|
String desc = "A smooth stone, almost too big for your pocket or hand, with strange markings on it. " +
|
||||||
return "";
|
"The engravings look to be done with a tool and painted to look like an eye. " +
|
||||||
|
"You feel like it's watching you, assessing your every move.";
|
||||||
|
if ( isEquipped( Dungeon.hero ) ){
|
||||||
|
desc += "\n\nWhen you hold the talisman you feel like your senses are heightened. Sometimes there is a " +
|
||||||
|
"seemingly random sense of dread, perhaps the talisman is telling you something when this happens?";
|
||||||
|
if (charge == 100)
|
||||||
|
desc += "\n\nThe talisman is radiating energy, prodding at your mind. You wonder what would " +
|
||||||
|
"happen if you let it in.";
|
||||||
|
}
|
||||||
|
|
||||||
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Foresight extends ArtifactBuff{
|
public class Foresight extends ArtifactBuff{
|
||||||
|
@ -145,14 +157,18 @@ public class TalismanOfForesight extends Artifact {
|
||||||
BuffIndicator.refreshHero();
|
BuffIndicator.refreshHero();
|
||||||
|
|
||||||
//fully charges in 2400 turns at lvl=0, scaling to 800 turns at lvl = 10.
|
//fully charges in 2400 turns at lvl=0, scaling to 800 turns at lvl = 10.
|
||||||
partialCharge += (1f/24) + (((float)level)/80);
|
if (charge < 100) {
|
||||||
|
partialCharge += (1f / 24) + (((float) level) / 80);
|
||||||
|
|
||||||
|
|
||||||
if (partialCharge > 1 && charge < 100){
|
if (partialCharge > 1 && charge < 100) {
|
||||||
partialCharge--;
|
partialCharge--;
|
||||||
charge++;
|
charge++;
|
||||||
} else if (charge >= 100)
|
} else if (charge >= 100) {
|
||||||
partialCharge = 0;
|
partialCharge = 0;
|
||||||
|
GLog.p("Your Talisman is fully charged!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user