v0.2.4: ring of force now includes its average damage in its description
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
package com.shatteredpixel.shatteredpixeldungeon.items.rings;
|
package com.shatteredpixel.shatteredpixeldungeon.items.rings;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by debenhame on 10/09/2014.
|
* Created by debenhame on 10/09/2014.
|
||||||
*/
|
*/
|
||||||
@@ -16,12 +18,20 @@ public class RingOfForce extends Ring {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String desc() {
|
public String desc() {
|
||||||
return isKnown() ?
|
if (isKnown()){
|
||||||
"This ring enhances the force of the wearer's blows. " +
|
String desc = "This ring enhances the force of the wearer's blows. " +
|
||||||
"This extra power is largely wasted when wielding weapons, " +
|
"This extra power is largely wasted when wielding weapons, " +
|
||||||
"but an unarmed attack will be made much stronger. " +
|
"but an unarmed attack will be made much stronger. " +
|
||||||
"A degraded ring will instead weaken the wearer's blows." :
|
"A degraded ring will instead weaken the wearer's blows.\n\n" +
|
||||||
super.desc();
|
"When unarmed, at your current strength, ";
|
||||||
|
int str = Dungeon.hero.STR() - 8;
|
||||||
|
desc += levelKnown ?
|
||||||
|
"average damage with this ring is " + (str/2+level + (int)(str*0.5f*level) + str*2)/2 + " points per hit.":
|
||||||
|
"typical average damage with this ring is" + (str/2+1 + (int)(str*0.5f) + str*2)/2 + " points per hit.";
|
||||||
|
desc += " Wearing a second ring of force would enchance this.";
|
||||||
|
return desc;
|
||||||
|
} else
|
||||||
|
return super.desc();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Force extends RingBuff {
|
public class Force extends RingBuff {
|
||||||
|
|||||||
Reference in New Issue
Block a user