v2.5.0: added wndUpgrade info for wands
This commit is contained in:
@@ -1366,6 +1366,8 @@ items.wands.cursedwand.fire=You smell burning...
|
||||
items.wands.cursedwand.transmogrify_wand=Your wand transmogrifies into a different item!
|
||||
items.wands.cursedwand.transmogrify_other=Your item transmogrifies into something different!
|
||||
|
||||
items.wands.damagewand.upgrade_stat_name_1=Magic Damage
|
||||
|
||||
items.wands.wand.ac_zap=ZAP
|
||||
items.wands.wand.fizzles=Your wand fizzles; it must not have enough charge.
|
||||
items.wands.wand.no_magic=Your wand fizzles; you cannot use wands while magic immune.
|
||||
@@ -1385,6 +1387,7 @@ items.wands.wandofblastwave.ondeath=You killed yourself with your own Wand of Bl
|
||||
items.wands.wandofblastwave.desc=This wand is made of a sort of marbled stone, with gold trim and a round black gem at the tip. It feels very weighty in your hand.
|
||||
items.wands.wandofblastwave.typical_stats_desc=This wand shoots a bolt which violently detonates at a target location. The force of this blast typically deals _%1$d-%2$d damage_ and is strong enough to send most enemies flying.
|
||||
items.wands.wandofblastwave.stats_desc=This wand shoots a bolt which violently detonates at a target location. The force of this blast deals _%1$d-%2$d damage_ and is strong enough to send most enemies flying.
|
||||
items.wands.wandofblastwave.upgrade_stat_name_2=Knockback
|
||||
items.wands.wandofblastwave.bmage_desc=When _the Battlemage_ strikes an enemy with a staff of blast wave, the enemy has a chance to be knocked back, as if the staff had an elastic enchantment.
|
||||
items.wands.wandofblastwave.eleblast_desc=An elemental blast with a staff of blast wave deals 67% damage and knocks all enemies outside of the blast area.
|
||||
|
||||
@@ -1392,6 +1395,8 @@ items.wands.wandofcorrosion.name=wand of corrosion
|
||||
items.wands.wandofcorrosion.staff_name=staff of corrosion
|
||||
items.wands.wandofcorrosion.desc=This wand has an ashen body which opens to a brilliant orange gem.
|
||||
items.wands.wandofcorrosion.stats_desc=This wand shoots a bolt which explodes into a cloud of highly corrosive gas at a targeted location. Anything caught inside this cloud will take increasing damage over time, starting at _%d damage._
|
||||
items.wands.wandofcorrosion.upgrade_stat_name_1=Corrosion Damage
|
||||
items.wands.wandofcorrosion.upgrade_stat_name_2=Gas Volume
|
||||
items.wands.wandofcorrosion.bmage_desc=When _the Battlemage_ strikes an enemy with a staff of corrosion, the enemy has a chance to become oozed.
|
||||
items.wands.wandofcorrosion.eleblast_desc=An elemental blast with a staff of corrosion inflicts enemies with 4 turns of corrosion, starting at 6 damage.
|
||||
|
||||
@@ -1400,6 +1405,8 @@ items.wands.wandofcorruption.staff_name=staff of corruption
|
||||
items.wands.wandofcorruption.already_corrupted=That character cannot be influenced further.
|
||||
items.wands.wandofcorruption.desc=This wand radiates chaotic dark energy, if that weren't already obvious from the small decorative skull shaped onto its tip.
|
||||
items.wands.wandofcorruption.stats_desc=This wand will release a blast of corrupting energy which will debuff enemies and eventually bend them to your will. Enemies are able to resist the corruption, but weakened enemies are much easier to corrupt than healthy ones.
|
||||
items.wands.wandofcorruption.upgrade_stat_name_1=Corrupting Power
|
||||
items.wands.wandofcorruption.upgrade_stat_name_2=Debuff Duration
|
||||
items.wands.wandofcorruption.bmage_desc=When _the Battlemage_ strikes an enemy with a staff of corruption, the enemy has a chance to become amoked.
|
||||
items.wands.wandofcorruption.eleblast_desc=An elemental blast with a staff of corruption inflicts enemies with 5 turns of amok.
|
||||
|
||||
@@ -1407,6 +1414,7 @@ items.wands.wandofdisintegration.name=wand of disintegration
|
||||
items.wands.wandofdisintegration.staff_name=staff of disintegration
|
||||
items.wands.wandofdisintegration.desc=This wand is made from a solid smooth chunk of obsidian, with a deep purple light running up its side, ending at the tip. It glows with destructive energy, waiting to shoot forward.
|
||||
items.wands.wandofdisintegration.stats_desc=This wand shoots a beam that pierces any obstacle, and will go farther the more it is upgraded. The beam deals _%1$d-%2$d damage,_ and will also deal bonus damage for each enemy and wall it penetrates.
|
||||
items.wands.wandofdisintegration.upgrade_stat_name_2=Max Range
|
||||
items.wands.wandofdisintegration.bmage_desc=When wielded by _the Battlemage_, a staff of disintegration has increased attack range, as if it had a projecting enchantment.
|
||||
items.wands.wandofdisintegration.eleblast_desc=An elemental blast with a staff of disintegration deals 100% damage and pierces through walls.
|
||||
|
||||
@@ -1414,6 +1422,9 @@ items.wands.wandoffireblast.name=wand of fireblast
|
||||
items.wands.wandoffireblast.staff_name=staff of fireblast
|
||||
items.wands.wandoffireblast.desc=This wand is made from red-lacquered wood with golden leaf used liberally to make it look quite regal. It crackles and hisses at the tip, eager to unleash its powerful magic.
|
||||
items.wands.wandoffireblast.stats_desc=This wand blasts out a cone of fire when used. Its next attack will consume _%1$d charges_ and deal _%2$d-%3$d damage._ The more charges the wand uses, the larger and stronger the effect.
|
||||
items.wands.wandoffireblast.upgrade_stat_name_1=1 Charge Damage
|
||||
items.wands.wandoffireblast.upgrade_stat_name_2=2 Charge Damage
|
||||
items.wands.wandoffireblast.upgrade_stat_name_3=3 Charge Damage
|
||||
items.wands.wandoffireblast.bmage_desc=When _the Battlemage_ strikes an enemy with a staff of fireblast, the enemy has a chance to burst into flames, as if the staff had a blazing enchantment.
|
||||
items.wands.wandoffireblast.eleblast_desc=An elemental blast with a staff of fireblast deals 100% damage, bursts open doors, and sets enemies and terrain on fire.
|
||||
|
||||
@@ -1421,6 +1432,7 @@ items.wands.wandoffrost.name=wand of frost
|
||||
items.wands.wandoffrost.staff_name=staff of frost
|
||||
items.wands.wandoffrost.desc=This wand seems to be made out of some kind of magical ice. It grows brighter towards its rounded tip. It feels very cold when held, but somehow your hand stays warm.
|
||||
items.wands.wandoffrost.stats_desc=This wand shoots blasts of icy energy toward your foes, dealing _%1$d-%2$d damage_ and chilling. The effect seems stronger in water. Enemies that are already chilled or frozen take less damage from this wand.
|
||||
items.wands.wandoffrost.upgrade_stat_name_2=Chill Duration
|
||||
items.wands.wandoffrost.bmage_desc=When _the Battlemage_ strikes a chilled enemy with a staff of frost, they have a chance to instantly freeze. This chance becomes greater the more chilled they are.
|
||||
items.wands.wandoffrost.eleblast_desc=An elemental blast with a staff of frost deals 100% damage, freezes enemies, and puts out fires.
|
||||
|
||||
@@ -1436,6 +1448,8 @@ items.wands.wandoflivingearth.name=wand of living earth
|
||||
items.wands.wandoflivingearth.staff_name=staff of living earth
|
||||
items.wands.wandoflivingearth.desc=This wand is made from a curious rock, with bands of glowing yellow energy. The rocks seem to shift slightly as you grip the wand, as if they can feel your hand.
|
||||
items.wands.wandoflivingearth.stats_desc=This wand sends bolts of magical rock at enemies, dealing _%1$d-%2$d damage._ The rocks will then re-form around the user, granting them armor in proportion to the damage dealt. If enough armor is built, it will form into a rock guardian when the wand is next zapped.
|
||||
items.wands.wandoflivingearth.upgrade_stat_name_2=Guardian Max HP
|
||||
items.wands.wandoflivingearth.upgrade_stat_name_3=Guardian Blocking
|
||||
items.wands.wandoflivingearth.bmage_desc=When _the Battlemage_ strikes an enemy with a staff of living earth, some of the damage dealt is returned as rock armor.
|
||||
items.wands.wandoflivingearth.eleblast_desc=An elemental blast with a staff of living earth deals 50% damage, and heals an active earthen guardian for each enemy hit.
|
||||
items.wands.wandoflivingearth$rockarmor.name=rock armor
|
||||
@@ -1457,6 +1471,8 @@ items.wands.wandofprismaticlight.name=wand of prismatic light
|
||||
items.wands.wandofprismaticlight.staff_name=staff of prismatic light
|
||||
items.wands.wandofprismaticlight.desc=This wand is made of a solid piece of translucent crystal, like a long chunk of smooth glass. Small bits of colorful light dance around the tip of the wand, eager to burst forth.
|
||||
items.wands.wandofprismaticlight.stats_desc=This wand shoots rays of light which cut through the darkness of the dungeon, revealing hidden areas and traps. The beam can blind enemies, and deals _%1$d-%2$d damage._ Demonic and undead foes will burn in the bright light of the wand, taking bonus damage.
|
||||
items.wands.wandofprismaticlight.upgrade_stat_name_2=Blind Chance
|
||||
items.wands.wandofprismaticlight.upgrade_stat_name_3=Light Duration
|
||||
items.wands.wandofprismaticlight.bmage_desc=When _the Battlemage_ strikes an enemy with a staff of prismatic light, they will be crippled for a duration that scales with staff level.
|
||||
items.wands.wandofprismaticlight.eleblast_desc=An elemental blast with a staff of prismatic light deals 67% damage, reveals all terrain in the blast, and blinds enemies for 5 turns.
|
||||
|
||||
@@ -1465,6 +1481,8 @@ items.wands.wandofregrowth.staff_name=staff of regrowth
|
||||
items.wands.wandofregrowth.desc=This wand is made from a thin shaft of expertly carved wood. Somehow it is still alive and vibrant, bright green like a young tree's core. "When life ceases new life always begins to grow... The eternal cycle always remains!"
|
||||
items.wands.wandofregrowth.stats_desc=When used, this wand will blast magical regrowth energy outward in a cone, causing grass, roots, and rare plants to spring to life. Its next zap will consume _%1$d charges_. The more charges the wand uses, the larger and stronger the effect.
|
||||
items.wands.wandofregrowth.degradation=After another _%d charges_ this wand will start failing to produce plants and fresh grass. This limit is increased by leveling up or upgrading the wand.
|
||||
items.wands.wandofregrowth.upgrade_stat_name_1=Grass Per Charge
|
||||
items.wands.wandofregrowth.upgrade_stat_name_2=Total Grass Limit
|
||||
items.wands.wandofregrowth.bmage_desc=When _the Battlemage_ strikes an enemy with a staff of regrowth, and either are standing on grass, he will gain herbal healing in proportion with the damage dealt.
|
||||
items.wands.wandofregrowth.eleblast_desc=An elemental blast with a staff of regrowth roots enemies and grows grass randomly over the blasts area.
|
||||
items.wands.wandofregrowth$dewcatcher.name=Dewcatcher
|
||||
@@ -1481,6 +1499,9 @@ items.wands.wandoftransfusion.ondeath=You killed yourself with your own Wand of
|
||||
items.wands.wandoftransfusion.charged=Your staff is charged with the life energy of your enemy!
|
||||
items.wands.wandoftransfusion.desc=A fairly plainly shaped wand, it stands out due to its magenta hue and pitch black gem at the tip.
|
||||
items.wands.wandoftransfusion.stats_desc=When used on allies or charmed enemies, this wand will sap _%1$d of the user's health_ to heal or shield the ally for _%2$d health._ When used on enemies, the wand briefly charms them while applying _%3$d shielding_ to the user. Hostile undead will take _%4$d-%5$d damage_ instead of being charmed.
|
||||
items.wands.wandoftransfusion.upgrade_stat_name_1=Ally Healing
|
||||
items.wands.wandoftransfusion.upgrade_stat_name_2=Self-Shielding
|
||||
items.wands.wandoftransfusion.upgrade_stat_name_3=Undead Damage
|
||||
items.wands.wandoftransfusion.bmage_desc=When _the Battlemage_ strikes a charmed enemy with a staff of transfusion, he will gain shielding and his next zap with the staff will not cost any health.
|
||||
items.wands.wandoftransfusion.eleblast_desc=An elemental blast with a staff of transfusion charms enemies, heals allies, and deals 100% damage to undead enemies.
|
||||
|
||||
@@ -1490,6 +1511,8 @@ items.wands.wandofwarding.no_more_wards=Your wand can't sustain any more wards.
|
||||
items.wands.wandofwarding.bad_location=You can't place a ward there.
|
||||
items.wands.wandofwarding.desc=This short metal wand has a bright purple gem floating above its tip.
|
||||
items.wands.wandofwarding.stats_desc=Rather than directly damaging an enemy, this wand will summon stationary wards and sentries. Wards can be summoned anywhere, even through walls if you have vision. This wand can sustain _%d energy_ worth of wards at a time.
|
||||
items.wands.wandofwarding.upgrade_stat_name_1=Ward Damage
|
||||
items.wands.wandofwarding.upgrade_stat_name_2=Ward Energy
|
||||
items.wands.wandofwarding.bmage_desc=When _the Battlemage_ strikes an enemy with a staff of warding, all active sentries have a chance to be healed.
|
||||
items.wands.wandofwarding.eleblast_desc=An elemental blast with a staff of warding heals all sentries in the blast area.
|
||||
items.wands.wandofwarding$ward.desc_generic_ward=This ward will automatically zap any enemy which comes into its range of vision.\n\nZapping this ward with your wand of warding will upgrade it.\n\nWards have a limited number of zaps before dissipating.
|
||||
|
||||
@@ -347,10 +347,10 @@ windows.wndtradeitem.sell_1=Sell 1 for %dg
|
||||
windows.wndtradeitem.sell_all=Sell all for %dg
|
||||
|
||||
windows.wndupgrade.title=Upgrade an Item
|
||||
windows.wndupgrade.desc=Upgrading an item permanently boosts its power:
|
||||
windows.wndupgrade.unided=You don't know the properties of this unidentified item, its un-upgraded state is shown here.
|
||||
windows.wndupgrade.desc=Upgrading an item permanently improves it:
|
||||
windows.wndupgrade.unided=You don't know the properties of this item, its un-upgraded state is shown here.
|
||||
windows.wndupgrade.cursed=Upgrading this item also has a 33% chance to cleanse its curse.
|
||||
windows.wndupgrade.cursed_weaken=Upgrading this item will also weaken its curse, and has a 33% chance to cleanse the curse entirely.
|
||||
windows.wndupgrade.cursed_weaken=Upgrading this item will also weaken its curse, and has a 33% chance to cleanse it entirely.
|
||||
windows.wndupgrade.curse_infusion=If the curse is cleansed, the item will no longer benefit from curse infusion!
|
||||
windows.wndupgrade.enchant=Upgrading this item also has a %d%% chance to destroy its enchantment!
|
||||
windows.wndupgrade.glyph=Upgrading this item also has a %d%% chance to destroy its glyph!
|
||||
|
||||
@@ -69,4 +69,9 @@ public abstract class DamageWand extends Wand{
|
||||
else
|
||||
return Messages.get(this, "stats_desc", min(0), max(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat1(int level) {
|
||||
return min(level) + "-" + max(level);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,6 +275,18 @@ public abstract class Wand extends Item {
|
||||
public String statsDesc(){
|
||||
return Messages.get(this, "stats_desc");
|
||||
}
|
||||
|
||||
public String upgradeStat1(int level){
|
||||
return null;
|
||||
}
|
||||
|
||||
public String upgradeStat2(int level){
|
||||
return null;
|
||||
}
|
||||
|
||||
public String upgradeStat3(int level){
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isIdentified() {
|
||||
|
||||
@@ -219,6 +219,11 @@ public class WandOfBlastWave extends DamageWand {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat2(int level) {
|
||||
return Integer.toString(3 + level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fx(Ballistica bolt, Callback callback) {
|
||||
MagicMissile.boltFromChar( curUser.sprite.parent,
|
||||
|
||||
@@ -125,4 +125,13 @@ public class WandOfCorrosion extends Wand {
|
||||
return Messages.get(this, "stats_desc", 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat1(int level) {
|
||||
return Integer.toString(level+2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat2(int level) {
|
||||
return (1+.2f*level) + "x";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,6 +251,16 @@ public class WandOfCorruption extends Wand {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat1(int level) {
|
||||
return Messages.decimalFormat("#.##", 3f + level/3f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat2(int level) {
|
||||
return Integer.toString(6 + 3*level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fx(Ballistica bolt, Callback callback) {
|
||||
MagicMissile.boltFromChar( curUser.sprite.parent,
|
||||
|
||||
@@ -131,7 +131,12 @@ public class WandOfDisintegration extends DamageWand {
|
||||
private int distance() {
|
||||
return buffedLvl()*2 + 6;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String upgradeStat2(int level) {
|
||||
return Integer.toString(6 + level*2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fx(Ballistica beam, Callback callback) {
|
||||
|
||||
|
||||
@@ -215,6 +215,21 @@ public class WandOfFireblast extends DamageWand {
|
||||
return Messages.get(this, "stats_desc", chargesPerCast(), min(0), max(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat1(int level) {
|
||||
return (1+level) + "-" + (2+2*level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat2(int level) {
|
||||
return (2+2*level) + "-" + 2*(4+2*level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat3(int level) {
|
||||
return (3+3*level) + "-" + 3*(6+2*level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void staffFx(MagesStaff.StaffParticle particle) {
|
||||
particle.color( 0xEE7722 );
|
||||
|
||||
@@ -109,6 +109,11 @@ public class WandOfFrost extends DamageWand {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat2(int level) {
|
||||
return Integer.toString(2 + level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fx(Ballistica bolt, Callback callback) {
|
||||
MagicMissile.boltFromChar(curUser.sprite.parent,
|
||||
|
||||
@@ -184,7 +184,21 @@ public class WandOfLivingEarth extends DamageWand {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String upgradeStat2(int level) {
|
||||
return Integer.toString(16 + 8*level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat3(int level) {
|
||||
if (Dungeon.isChallenged(Challenges.NO_ARMOR)){
|
||||
return level + "-" + (2+level);
|
||||
} else {
|
||||
return level + "-" + (3+(3*level));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fx(Ballistica bolt, Callback callback) {
|
||||
MagicMissile.boltFromChar(curUser.sprite.parent,
|
||||
|
||||
@@ -39,6 +39,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMappi
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
|
||||
@@ -137,6 +138,20 @@ public class WandOfPrismaticLight extends DamageWand {
|
||||
GameScene.updateFog();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat2(int level) {
|
||||
return Messages.decimalFormat("#", 100*(1-(3/(float)(5+level)))) + "%";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat3(int level) {
|
||||
if (Dungeon.isChallenged(Challenges.DARKNESS)){
|
||||
return Integer.toString(2 + level);
|
||||
} else {
|
||||
return Integer.toString(10 + 5*level);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fx(Ballistica beam, Callback callback) {
|
||||
curUser.sprite.parent.add(
|
||||
|
||||
@@ -199,16 +199,19 @@ public class WandOfRegrowth extends Wand {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private int chargeLimit( int heroLvl ){
|
||||
if (level() >= 10){
|
||||
return chargeLimit( heroLvl, level() );
|
||||
}
|
||||
|
||||
private int chargeLimit( int heroLvl, int wndLvl ){
|
||||
if (wndLvl >= 10){
|
||||
return Integer.MAX_VALUE;
|
||||
} else {
|
||||
//20 charges at base, plus:
|
||||
//2/3.1/4.2/5.5/6.8/8.4/10.4/13.2/18.0/30.8/inf. charges per hero level, at wand level:
|
||||
//0/1 /2 /3 /4 /5 /6 /7 /8 /9 /10
|
||||
float lvl = level();
|
||||
return Math.round(20 + heroLvl * (2+lvl) * (1f + (lvl/(50 - 5*lvl))));
|
||||
return Math.round(20 + heroLvl * (2+wndLvl) * (1f + (wndLvl/(50 - 5*wndLvl))));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,6 +293,20 @@ public class WandOfRegrowth extends Wand {
|
||||
return desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat1(int level) {
|
||||
return Messages.decimalFormat("#.##", 3 + (2+level)/3f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat2(int level) {
|
||||
if (level >= 10){
|
||||
return "∞";
|
||||
} else {
|
||||
return Integer.toString(chargeLimit(Dungeon.hero.lvl, level));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void staffFx(MagesStaff.StaffParticle particle) {
|
||||
particle.color( ColorMath.random(0x004400, 0x88CC44) );
|
||||
|
||||
@@ -196,6 +196,22 @@ public class WandOfTransfusion extends DamageWand {
|
||||
return Messages.get(this, "stats_desc", selfDMG, selfDMG, 5, min(0), max(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat1(int level) {
|
||||
int selfDMG = Dungeon.hero != null ? Math.round(Dungeon.hero.HT*0.05f): 1;
|
||||
return Integer.toString(selfDMG + 3*level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat2(int level) {
|
||||
return Integer.toString(5 + level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat3(int level) {
|
||||
return super.upgradeStat1(level); //damage
|
||||
}
|
||||
|
||||
private static final String FREECHARGE = "freecharge";
|
||||
|
||||
@Override
|
||||
|
||||
@@ -203,6 +203,16 @@ public class WandOfWarding extends Wand {
|
||||
return Messages.get(this, "stats_desc", 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat1(int level) {
|
||||
return 2+level + "-" + (8+4*level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upgradeStat2(int level) {
|
||||
return Integer.toString(level+2);
|
||||
}
|
||||
|
||||
public static class Ward extends NPC {
|
||||
|
||||
public int tier = 1;
|
||||
|
||||
@@ -29,10 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.InventoryScroll;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.spells.MagicalInfusion;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.DamageWand;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfCorrosion;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfWarding;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Greatshield;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||
@@ -155,33 +152,31 @@ public class WndUpgrade extends Window {
|
||||
|
||||
float bottom = i1.y + 16 + GAP;
|
||||
|
||||
final String LINE = Messages.lang() == Languages.CHINESE ? "~" : "-";
|
||||
|
||||
// *** Various lines for stats, highlighting differences between current level and +1 ***
|
||||
|
||||
//physical damage
|
||||
if (toUpgrade instanceof Weapon){
|
||||
bottom = fillFields(Messages.get(this, "damage"),
|
||||
((Weapon) toUpgrade).min(levelFrom) + LINE + ((Weapon) toUpgrade).max(levelFrom),
|
||||
((Weapon) toUpgrade).min(levelTo) + LINE + ((Weapon) toUpgrade).max(levelTo),
|
||||
((Weapon) toUpgrade).min(levelFrom) + "-" + ((Weapon) toUpgrade).max(levelFrom),
|
||||
((Weapon) toUpgrade).min(levelTo) + "-" + ((Weapon) toUpgrade).max(levelTo),
|
||||
bottom);
|
||||
}
|
||||
|
||||
//blocking (armor and shields)
|
||||
if (toUpgrade instanceof Armor){
|
||||
bottom = fillFields(Messages.get(this, "blocking"),
|
||||
((Armor) toUpgrade).DRMin(levelFrom) + LINE + ((Armor) toUpgrade).DRMax(levelFrom),
|
||||
((Armor) toUpgrade).DRMin(levelTo) + LINE + ((Armor) toUpgrade).DRMax(levelTo),
|
||||
((Armor) toUpgrade).DRMin(levelFrom) + "-" + ((Armor) toUpgrade).DRMax(levelFrom),
|
||||
((Armor) toUpgrade).DRMin(levelTo) + "-" + ((Armor) toUpgrade).DRMax(levelTo),
|
||||
bottom);
|
||||
} else if (toUpgrade instanceof RoundShield){
|
||||
bottom = fillFields(Messages.get(this, "blocking"),
|
||||
0 + LINE + ((RoundShield) toUpgrade).DRMax(levelFrom),
|
||||
0 + LINE + ((RoundShield) toUpgrade).DRMax(levelTo),
|
||||
0 + "-" + ((RoundShield) toUpgrade).DRMax(levelFrom),
|
||||
0 + "-" + ((RoundShield) toUpgrade).DRMax(levelTo),
|
||||
bottom);
|
||||
} else if (toUpgrade instanceof Greatshield){
|
||||
bottom = fillFields(Messages.get(this, "blocking"),
|
||||
0 + LINE + ((Greatshield) toUpgrade).DRMax(levelFrom),
|
||||
0 + LINE + ((Greatshield) toUpgrade).DRMax(levelTo),
|
||||
0 + "-" + ((Greatshield) toUpgrade).DRMax(levelFrom),
|
||||
0 + "-" + ((Greatshield) toUpgrade).DRMax(levelTo),
|
||||
bottom);
|
||||
}
|
||||
|
||||
@@ -198,6 +193,8 @@ public class WndUpgrade extends Window {
|
||||
bottom);
|
||||
}
|
||||
|
||||
//TODO Duelist weapon abilities
|
||||
|
||||
//durability
|
||||
if (toUpgrade instanceof MissileWeapon){
|
||||
//missile weapons are always IDed currently, so we always use true level
|
||||
@@ -215,38 +212,28 @@ public class WndUpgrade extends Window {
|
||||
wand = Reflection.newInstance(((MagesStaff) toUpgrade).wandClass());
|
||||
}
|
||||
|
||||
//direct damage and damage-adjacent effects
|
||||
if (wand instanceof DamageWand) {
|
||||
bottom = fillFields(Messages.get(this, "zap_damage"),
|
||||
((DamageWand) wand).min(levelFrom) + LINE + ((DamageWand) wand).max(levelFrom),
|
||||
((DamageWand) wand).min(levelTo) + LINE + ((DamageWand) wand).max(levelTo),
|
||||
bottom);
|
||||
} else if (wand instanceof WandOfCorrosion){
|
||||
//TODO externalize!
|
||||
bottom = fillFields(Messages.get(this, "corrosion_damage"),
|
||||
Integer.toString(2+levelFrom),
|
||||
Integer.toString(2+levelTo),
|
||||
bottom);
|
||||
} else if (wand instanceof WandOfWarding){
|
||||
//TODO externalize!
|
||||
bottom = fillFields(Messages.get(this, "ward_damage"),
|
||||
(2 + levelFrom) + LINE + (8 + 4*levelFrom),
|
||||
(2 + levelTo) + LINE + (8 + 4*levelTo),
|
||||
bottom);
|
||||
//Various wand stats (varies by wand)
|
||||
if (wand instanceof Wand){
|
||||
if (((Wand) wand).upgradeStat1(levelFrom) != null){
|
||||
bottom = fillFields(Messages.get(wand, "upgrade_stat_name_1"),
|
||||
((Wand) wand).upgradeStat1(levelFrom),
|
||||
((Wand) wand).upgradeStat1(levelTo),
|
||||
bottom);
|
||||
}
|
||||
if (((Wand) wand).upgradeStat2(levelFrom) != null){
|
||||
bottom = fillFields(Messages.get(wand, "upgrade_stat_name_2"),
|
||||
((Wand) wand).upgradeStat2(levelFrom),
|
||||
((Wand) wand).upgradeStat2(levelTo),
|
||||
bottom);
|
||||
}
|
||||
if (((Wand) wand).upgradeStat3(levelFrom) != null){
|
||||
bottom = fillFields(Messages.get(wand, "upgrade_stat_name_3"),
|
||||
((Wand) wand).upgradeStat3(levelFrom),
|
||||
((Wand) wand).upgradeStat3(levelTo),
|
||||
bottom);
|
||||
}
|
||||
}
|
||||
|
||||
//TODO various extra wand effects
|
||||
//disintegration range?
|
||||
//corrosion AOE?
|
||||
//blast wave knockback?
|
||||
//rock guardian powers?
|
||||
//frost chill duration?
|
||||
//prismatic light blinding/lighting?
|
||||
//warding max energy
|
||||
//transfusion stats? and also de-emphasize damage?
|
||||
//corruption power?
|
||||
//regrowth power?
|
||||
|
||||
//max charges
|
||||
if (wand instanceof Wand){
|
||||
int chargeboost = levelFrom + (toUpgrade instanceof MagesStaff ? 1 : 0);
|
||||
@@ -256,7 +243,7 @@ public class WndUpgrade extends Window {
|
||||
bottom);
|
||||
}
|
||||
|
||||
//TODO ring stats
|
||||
//TODO Various ring stats (varies by ring)
|
||||
if (toUpgrade instanceof Ring){
|
||||
|
||||
}
|
||||
@@ -265,13 +252,13 @@ public class WndUpgrade extends Window {
|
||||
ColorBlock sep = new ColorBlock(1, 1, 0xFF222222);
|
||||
sep.size(1, bottom - message.bottom());
|
||||
sep.x = WIDTH/2f;
|
||||
sep.y = message.bottom();
|
||||
sep.y = message.bottom() + GAP;
|
||||
add(sep);
|
||||
|
||||
sep = new ColorBlock(1, 1, 0xFF222222);
|
||||
sep.size(1, bottom - message.bottom());
|
||||
sep.x = 3*WIDTH/4f;
|
||||
sep.y = message.bottom();
|
||||
sep.y = message.bottom() + GAP;
|
||||
add(sep);
|
||||
|
||||
// *** Various extra info texts that can appear underneath stats ***
|
||||
@@ -415,12 +402,22 @@ public class WndUpgrade extends Window {
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
//don't let this window be closed if
|
||||
if (!force) super.onBackPressed();
|
||||
//TODO currently never closes, as the Sou/magic infusion is consumed as it is shown
|
||||
//we might want to only have it be pre-consumed when force = true
|
||||
//as atm quitting the game with the window open will eat the scroll/infuse when force=false
|
||||
}
|
||||
|
||||
private float fillFields(String title, String msg1, String msg2, float bottom){
|
||||
|
||||
RenderedTextBlock ttl = PixelScene.renderTextBlock( title , 6);
|
||||
//the ~ symbol is more commonly used in Chinese
|
||||
if (Messages.lang() == Languages.CHINESE){
|
||||
msg1 = msg1.replace('-', '~');
|
||||
msg2 = msg2.replace('-', '~');
|
||||
}
|
||||
|
||||
RenderedTextBlock ttl = PixelScene.renderTextBlock(6);
|
||||
ttl.align(RenderedTextBlock.CENTER_ALIGN);
|
||||
ttl.text(title, WIDTH/2);
|
||||
ttl.setPos(COL_1 - ttl.width() / 2f, bottom + GAP);
|
||||
PixelScene.align(ttl);
|
||||
add(ttl);
|
||||
@@ -435,7 +432,7 @@ public class WndUpgrade extends Window {
|
||||
PixelScene.align(m2);
|
||||
add(m2);
|
||||
|
||||
return m2.bottom() + GAP + 1;
|
||||
return ttl.bottom() + GAP;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user