v0.7.0: added a curse effect to armband, and made cursed cloak unusable
This commit is contained in:
+2
-1
@@ -66,7 +66,7 @@ public class CloakOfShadows extends Artifact {
|
|||||||
@Override
|
@Override
|
||||||
public ArrayList<String> actions( Hero hero ) {
|
public ArrayList<String> actions( Hero hero ) {
|
||||||
ArrayList<String> actions = super.actions( hero );
|
ArrayList<String> actions = super.actions( hero );
|
||||||
if (isEquipped( hero ) && charge > 1)
|
if (isEquipped( hero ) && !cursed && charge > 1)
|
||||||
actions.add(AC_STEALTH);
|
actions.add(AC_STEALTH);
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
@@ -80,6 +80,7 @@ public class CloakOfShadows extends Artifact {
|
|||||||
|
|
||||||
if (!stealthed){
|
if (!stealthed){
|
||||||
if (!isEquipped(hero)) GLog.i( Messages.get(Artifact.class, "need_to_equip") );
|
if (!isEquipped(hero)) GLog.i( Messages.get(Artifact.class, "need_to_equip") );
|
||||||
|
else if (cursed) GLog.i( Messages.get(this, "cursed") );
|
||||||
else if (charge <= 0) GLog.i( Messages.get(this, "no_charge") );
|
else if (charge <= 0) GLog.i( Messages.get(this, "no_charge") );
|
||||||
else {
|
else {
|
||||||
stealthed = true;
|
stealthed = true;
|
||||||
|
|||||||
+26
-3
@@ -55,15 +55,23 @@ public class MasterThievesArmband extends Artifact {
|
|||||||
public String desc() {
|
public String desc() {
|
||||||
String desc = super.desc();
|
String desc = super.desc();
|
||||||
|
|
||||||
if ( isEquipped (Dungeon.hero) )
|
if ( isEquipped (Dungeon.hero) ){
|
||||||
desc += "\n\n" + Messages.get(this, "desc_worn");
|
if (cursed){
|
||||||
|
desc += "\n\n" + Messages.get(this, "desc_cursed");
|
||||||
|
} else {
|
||||||
|
desc += "\n\n" + Messages.get(this, "desc_worn");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Thievery extends ArtifactBuff{
|
public class Thievery extends ArtifactBuff{
|
||||||
public void collect(int gold){
|
public void collect(int gold){
|
||||||
charge += gold/2;
|
if (!cursed) {
|
||||||
|
charge += gold/2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -72,6 +80,21 @@ public class MasterThievesArmband extends Artifact {
|
|||||||
super.detach();
|
super.detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean act() {
|
||||||
|
if (cursed) {
|
||||||
|
|
||||||
|
if (Dungeon.gold > 0 && Random.Int(6) == 0){
|
||||||
|
Dungeon.gold--;
|
||||||
|
}
|
||||||
|
|
||||||
|
spend(TICK);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return super.act();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public boolean steal(int value){
|
public boolean steal(int value){
|
||||||
if (value <= charge){
|
if (value <= charge){
|
||||||
charge -= value;
|
charge -= value;
|
||||||
|
|||||||
+1
-1
@@ -137,7 +137,7 @@ public class WndTradeItem extends Window {
|
|||||||
};
|
};
|
||||||
|
|
||||||
final MasterThievesArmband.Thievery thievery = Dungeon.hero.buff(MasterThievesArmband.Thievery.class);
|
final MasterThievesArmband.Thievery thievery = Dungeon.hero.buff(MasterThievesArmband.Thievery.class);
|
||||||
if (thievery != null) {
|
if (thievery != null && !thievery.isCursed()) {
|
||||||
final float chance = thievery.stealChance(price);
|
final float chance = thievery.stealChance(price);
|
||||||
RedButton btnSteal = new RedButton( Messages.get(this, "steal", Math.min(100, (int)(chance*100)))) {
|
RedButton btnSteal = new RedButton( Messages.get(this, "steal", Math.min(100, (int)(chance*100)))) {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+2
@@ -176,6 +176,7 @@ items.artifacts.chaliceofblood.desc_3=The chalice is filled to the brim with you
|
|||||||
items.artifacts.cloakofshadows.name=cloak of shadows
|
items.artifacts.cloakofshadows.name=cloak of shadows
|
||||||
items.artifacts.cloakofshadows.ac_stealth=STEALTH
|
items.artifacts.cloakofshadows.ac_stealth=STEALTH
|
||||||
items.artifacts.cloakofshadows.cooldown=Your cloak needs %d more rounds to re-energize.
|
items.artifacts.cloakofshadows.cooldown=Your cloak needs %d more rounds to re-energize.
|
||||||
|
items.artifacts.cloakofshadows.cursed=You cannot use a cursed cloak.
|
||||||
items.artifacts.cloakofshadows.no_charge=Your cloak hasn't recharged enough to be usable yet.
|
items.artifacts.cloakofshadows.no_charge=Your cloak hasn't recharged enough to be usable yet.
|
||||||
items.artifacts.cloakofshadows.desc=A priceless magical cloak, stolen from the royal armory many years ago by the Rogue. When worn, it can be used to turn completely invisible for a short time.\n\nThe more the cloak is used, the stronger it will become, allowing the Rogue to become invisible more frequently and for longer durations.
|
items.artifacts.cloakofshadows.desc=A priceless magical cloak, stolen from the royal armory many years ago by the Rogue. When worn, it can be used to turn completely invisible for a short time.\n\nThe more the cloak is used, the stronger it will become, allowing the Rogue to become invisible more frequently and for longer durations.
|
||||||
items.artifacts.cloakofshadows$cloakstealth.no_charge=Your cloak has run out of energy.
|
items.artifacts.cloakofshadows$cloakstealth.no_charge=Your cloak has run out of energy.
|
||||||
@@ -261,6 +262,7 @@ items.artifacts.lloydsbeacon.desc_set=This beacon was set somewhere on the level
|
|||||||
|
|
||||||
items.artifacts.masterthievesarmband.name=master thieves' armband
|
items.artifacts.masterthievesarmband.name=master thieves' armband
|
||||||
items.artifacts.masterthievesarmband.desc=This purple velvet armband bears the mark of a master thief. This doesn't belong to you, but it probably didn't belong to its last user either.
|
items.artifacts.masterthievesarmband.desc=This purple velvet armband bears the mark of a master thief. This doesn't belong to you, but it probably didn't belong to its last user either.
|
||||||
|
items.artifacts.masterthievesarmband.desc_cursed=The cursed armband is bound to your wrist, and somehow your pouch of gold seems to be slowly getting lighter...
|
||||||
items.artifacts.masterthievesarmband.desc_worn=With the armband around your wrist, every piece of gold you find makes you desire other people's property more. Perhaps it wouldn't be too hard to steal from a shop...
|
items.artifacts.masterthievesarmband.desc_worn=With the armband around your wrist, every piece of gold you find makes you desire other people's property more. Perhaps it wouldn't be too hard to steal from a shop...
|
||||||
|
|
||||||
items.artifacts.sandalsofnature.name=sandals of nature
|
items.artifacts.sandalsofnature.name=sandals of nature
|
||||||
|
|||||||
Reference in New Issue
Block a user