v0.6.1: changes to curse/upgrade mechanics for rings and wands:

- wands and rings now sometimes become uncursed when upgraded
- rings now have an invisible +1 and start 1 level lower
- cursed rings are no longer degraded
- cursed rings now have an invisible -2, and cap at effective +0
This commit is contained in:
Evan Debenham 2017-06-15 01:28:47 -04:00
parent 84b7a6bbb6
commit 30bb83bb6c
9 changed files with 44 additions and 49 deletions

View File

@ -282,7 +282,6 @@ public class Item implements Bundlable {
public Item upgrade() {
cursed = false;
this.level++;
updateQuickslot();

View File

@ -252,6 +252,8 @@ public class Armor extends EquipableItem {
inscribe(null);
}
cursed = false;
if (seal != null && seal.level() == 0)
seal.upgrade();

View File

@ -167,6 +167,17 @@ public class Ring extends KindofMisc {
return desc;
}
@Override
public Item upgrade() {
super.upgrade();
if (Random.Float() > Math.pow(0.8, level())) {
cursed = false;
}
return this;
}
@Override
public boolean isIdentified() {
return super.isIdentified() && isKnown();
@ -180,7 +191,7 @@ public class Ring extends KindofMisc {
@Override
public Item random() {
int n = 1;
int n = 0;
if (Random.Int(3) == 0) {
n++;
if (Random.Int(5) == 0){
@ -188,11 +199,10 @@ public class Ring extends KindofMisc {
}
}
level(n);
if (Random.Float() < 0.3f) {
level(-n);
cursed = true;
} else
level(n);
}
return this;
}
@ -277,7 +287,11 @@ public class Ring extends KindofMisc {
}
public int level(){
return Ring.this.level();
if (Ring.this.cursed){
return Math.min( 0, Ring.this.level()-2 );
} else {
return Ring.this.level()+1;
}
}
}

View File

@ -85,7 +85,7 @@ public class ScrollOfUpgrade extends InventoryScroll {
GLog.w( Messages.get(Armor.class, "incompatible") );
}
} else if (item instanceof Wand) {
} else if (item instanceof Wand || item instanceof Ring) {
boolean wasCursed = item.cursed;
item.upgrade();
@ -94,19 +94,6 @@ public class ScrollOfUpgrade extends InventoryScroll {
removeCurse( Dungeon.hero );
}
} else if (item instanceof Ring) {
boolean wasCursed = item.cursed;
item.upgrade();
if (wasCursed && !item.cursed){
if (item.level() < 1){
weakenCurse( Dungeon.hero );
} else {
removeCurse( Dungeon.hero );
}
}
} else {
item.upgrade();
}

View File

@ -201,8 +201,9 @@ public abstract class Wand extends Item {
super.upgrade();
if (Random.Float() > Math.pow(0.9, level()))
if (Random.Float() > Math.pow(0.8, level())) {
cursed = false;
}
updateLevel();
curCharges = Math.min( curCharges + 1, maxCharges );

View File

@ -194,7 +194,12 @@ abstract public class Weapon extends KindOfWeapon {
public abstract int STRReq(int lvl);
public Item upgrade( boolean enchant ) {
@Override
public Item upgrade() {
return upgrade(false);
}
public Item upgrade(boolean enchant ) {
if (enchant && (enchantment == null || enchantment.curse())){
enchant( Enchantment.random() );
@ -202,6 +207,8 @@ abstract public class Weapon extends KindOfWeapon {
enchant(null);
}
cursed = false;
return super.upgrade();
}

View File

@ -22,7 +22,6 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
@ -42,15 +41,6 @@ public class MeleeWeapon extends Weapon {
lvl*(tier+1); //level scaling
}
@Override
public Item upgrade() {
return upgrade( false );
}
public Item safeUpgrade() {
return upgrade( enchantment != null );
}
public int STRReq(int lvl){
lvl = Math.max(0, lvl);
//strength req decreases at +1,+3,+6,+10,etc.

View File

@ -74,11 +74,6 @@ public class Boomerang extends MissileWeapon {
return true;
}
@Override
public Item upgrade() {
return upgrade( false );
}
@Override
public Item upgrade( boolean enchant ) {
super.upgrade( enchant );

View File

@ -509,39 +509,39 @@ items.rings.ring.cursed_worn=Because this ring is cursed, you are powerless to r
items.rings.ring.curse_known=You can feel a malevolent magic lurking within this ring.
items.rings.ringofaccuracy.name=ring of accuracy
items.rings.ringofaccuracy.desc=This ring increases your focus, reducing your enemy's ability to dodge your attacks. A degraded ring will instead make it easier for enemies to evade your attacks.
items.rings.ringofaccuracy.desc=This ring increases your focus, reducing your enemy's ability to dodge your attacks. A cursed ring will instead make it easier for enemies to evade your attacks.
items.rings.ringofelements.name=ring of elements
items.rings.ringofelements.desc=This ring provides resistance to different elements, such as fire, electricity, gases etc. Also it decreases duration of negative effects.
items.rings.ringofevasion.name=ring of evasion
items.rings.ringofevasion.desc=This ring obfuscates the true position of the wearer, making them harder to detect and attack. A degraded ring will instead make the user easier to detect and strike.
items.rings.ringofevasion.desc=This ring obfuscates the true position of the wearer, making them harder to detect and attack. A cursed ring will instead make the user easier to detect and strike.
items.rings.ringofforce.name=ring of force
items.rings.ringofforce.avg_dmg=When unarmed, at your current strength, this ring will deal _%1$d-%2$d damage._
items.rings.ringofforce.typical_avg_dmg=When unarmed, at your current strength, typically this ring will deal _%1$d-%2$d damage._
items.rings.ringofforce.desc=This ring enhances the force of the wearer's blows. This extra power is fairly weak when wielding weapons, but an unarmed attack will be made much stronger. A degraded ring will instead weaken the wearer's blows.
items.rings.ringofforce.desc=This ring enhances the force of the wearer's blows. This extra power is fairly weak when wielding weapons, but an unarmed attack will be made much stronger. A cursed ring will instead weaken the wearer's blows.
items.rings.ringoffuror.name=ring of furor
items.rings.ringoffuror.desc=This ring grants the wearer an inner fury, allowing them to attack more rapidly. This fury works best in large bursts, so slow weapons benefit far more than fast ones. A degraded ring will instead slow the wearer's speed of attack.
items.rings.ringoffuror.desc=This ring grants the wearer an inner fury, allowing them to attack more rapidly. This fury works best in large bursts, so slow weapons benefit far more than fast ones. A cursed ring will instead slow the wearer's speed of attack.
items.rings.ringofhaste.name=ring of haste
items.rings.ringofhaste.desc=This ring reduces the stress of movement on the wearer, allowing them to run at superhuman speeds. A degraded ring will instead weigh the wearer down.
items.rings.ringofhaste.desc=This ring reduces the stress of movement on the wearer, allowing them to run at superhuman speeds. A cursed ring will instead weigh the wearer down.
items.rings.ringofmagic.name=ring of magic
items.rings.ringofmagic.desc=Your wands will become more powerful in the arcane field that radiates from this ring. Degraded rings of magic will instead weaken your wands.
items.rings.ringofmagic.desc=Your wands will become more powerful in the arcane field that radiates from this ring. Cursed rings of magic will instead weaken your wands.
items.rings.ringofmight.name=ring of might
items.rings.ringofmight.desc=This ring enhances the physical traits of the wearer, granting them greater physical strength and constitution. A degraded ring will weaken the wearer.
items.rings.ringofmight.desc=This ring enhances the physical traits of the wearer, granting them greater physical strength and constitution. A cursed ring will weaken the wearer.
items.rings.ringofsharpshooting.name=ring of sharpshooting
items.rings.ringofsharpshooting.desc=This ring enhances the wearer's precision and aim, which will make all projectile weapons more accurate and durable. A degraded ring will have the opposite effect.
items.rings.ringofsharpshooting.desc=This ring enhances the wearer's precision and aim, which will make all projectile weapons more accurate and durable. A cursed ring will have the opposite effect.
items.rings.ringoftenacity.name=ring of tenacity
items.rings.ringoftenacity.desc=When worn, this ring will allow the wearer to resist normally mortal strikes. The more injured the user is, the more resistant they will be to damage. A degraded ring will instead make it easier for enemies to execute the wearer.
items.rings.ringoftenacity.desc=When worn, this ring will allow the wearer to resist normally mortal strikes. The more injured the user is, the more resistant they will be to damage. A cursed ring will instead make it easier for enemies to execute the wearer.
items.rings.ringofwealth.name=ring of wealth
items.rings.ringofwealth.desc=It's not clear what this ring does exactly, good luck may influence the life of an adventurer in many subtle ways. Naturally a degraded ring would give bad luck.
items.rings.ringofwealth.desc=It's not clear what this ring does exactly, good luck may influence the life of an adventurer in many subtle ways. Naturally a cursed ring would give bad luck.