v0.7.2: adjusted when enchants/glyphs are lost via upgrades
also adjusted curse loss rate and rebalanced magical infusion
This commit is contained in:
parent
f6c8bd1f54
commit
d356f48c43
|
@ -179,6 +179,8 @@ public abstract class Recipe {
|
|||
new Blandfruit.CookFruit(),
|
||||
new TippedDart.TipDart(),
|
||||
new Bomb.EnhanceBomb(),
|
||||
new AlchemicalCatalyst.Recipe(),
|
||||
new ArcaneCatalyst.Recipe(),
|
||||
new ElixirOfAquaticRejuvenation.Recipe(),
|
||||
new ElixirOfDragonsBlood.Recipe(),
|
||||
new ElixirOfIcyTouch.Recipe(),
|
||||
|
@ -199,8 +201,6 @@ public abstract class Recipe {
|
|||
new PhaseShift.Recipe(),
|
||||
new ReclaimTrap.Recipe(),
|
||||
new Recycle.Recipe(),
|
||||
new AlchemicalCatalyst.Recipe(),
|
||||
new ArcaneCatalyst.Recipe(),
|
||||
new StewedMeat.twoMeat()
|
||||
};
|
||||
|
||||
|
|
|
@ -352,7 +352,7 @@ public class Armor extends EquipableItem {
|
|||
|
||||
if (inscribe && (glyph == null || glyph.curse())){
|
||||
inscribe( Glyph.random() );
|
||||
} else if (!inscribe && Random.Float() > Math.pow(0.9, level())){
|
||||
} else if (!inscribe && level() >= 4 && Random.Float(10) < Math.pow(2, level()-4)){
|
||||
inscribe(null);
|
||||
}
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ public class Ring extends KindofMisc {
|
|||
public Item upgrade() {
|
||||
super.upgrade();
|
||||
|
||||
if (Random.Float() > Math.pow(0.8, level())) {
|
||||
if (Random.Int(3) == 0) {
|
||||
cursed = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,13 +22,11 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.items.spells;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Enchanting;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfEnchantment;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
|
@ -38,21 +36,19 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
|||
public class MagicalInfusion extends InventorySpell {
|
||||
|
||||
{
|
||||
mode = WndBag.Mode.ENCHANTABLE;
|
||||
mode = WndBag.Mode.UPGRADEABLE;
|
||||
image = ItemSpriteSheet.MAGIC_INFUSE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onItemSelected( Item item ) {
|
||||
|
||||
if (item instanceof SpiritBow){
|
||||
if (((SpiritBow) item).enchantment == null){
|
||||
((Weapon)item).enchant();
|
||||
}
|
||||
} else if (item instanceof Weapon) {
|
||||
if (item instanceof Weapon && ((Weapon) item).enchantment != null && !((Weapon) item).hasCurseEnchant()) {
|
||||
((Weapon) item).upgrade(true);
|
||||
} else {
|
||||
} else if (item instanceof Armor && ((Armor) item).glyph != null && !((Armor) item).hasCurseGlyph()) {
|
||||
((Armor) item).upgrade(true);
|
||||
} else {
|
||||
item.upgrade();
|
||||
}
|
||||
|
||||
GLog.p( Messages.get(this, "infuse", item.name()) );
|
||||
|
@ -60,22 +56,22 @@ public class MagicalInfusion extends InventorySpell {
|
|||
Badges.validateItemLevelAquired(item);
|
||||
|
||||
curUser.sprite.emitter().start(Speck.factory(Speck.UP), 0.2f, 3);
|
||||
Enchanting.show(curUser, item);
|
||||
Statistics.upgradesUsed++;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int price() {
|
||||
//prices of ingredients, divided by output quantity
|
||||
return Math.round(quantity * ((50 + 30) / 1f));
|
||||
return Math.round(quantity * ((50 + 40) / 1f));
|
||||
}
|
||||
|
||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
|
||||
|
||||
{
|
||||
inputs = new Class[]{ScrollOfUpgrade.class, StoneOfEnchantment.class};
|
||||
inputs = new Class[]{ScrollOfUpgrade.class, ArcaneCatalyst.class};
|
||||
inQuantity = new int[]{1, 1};
|
||||
|
||||
cost = 3;
|
||||
cost = 4;
|
||||
|
||||
output = MagicalInfusion.class;
|
||||
outQuantity = 1;
|
||||
|
|
|
@ -225,7 +225,7 @@ public abstract class Wand extends Item {
|
|||
|
||||
super.upgrade();
|
||||
|
||||
if (Random.Float() > Math.pow(0.8, level())) {
|
||||
if (Random.Int(3) == 0) {
|
||||
cursed = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -217,10 +217,16 @@ abstract public class Weapon extends KindOfWeapon {
|
|||
|
||||
public Item upgrade(boolean enchant ) {
|
||||
|
||||
if (enchant && (enchantment == null || enchantment.curse())){
|
||||
enchant( Enchantment.random() );
|
||||
} else if (!enchant && Random.Float() > Math.pow(0.9, level())){
|
||||
enchant(null);
|
||||
if (enchant){
|
||||
if (enchantment == null || hasCurseEnchant()){
|
||||
enchant(Enchantment.random());
|
||||
}
|
||||
} else {
|
||||
if (hasCurseEnchant()){
|
||||
if (Random.Int(3) == 0) enchant(null);
|
||||
} else if (level() >= 4 && Random.Float(10) < Math.pow(2, level()-4)){
|
||||
enchant(null);
|
||||
}
|
||||
}
|
||||
|
||||
cursed = false;
|
||||
|
|
|
@ -867,7 +867,7 @@ items.scrolls.scrollofupgrade.name=scroll of upgrade
|
|||
items.scrolls.scrollofupgrade.inv_title=Upgrade an item
|
||||
items.scrolls.scrollofupgrade.weaken_curse=The scroll of upgrade weakens the curse on your item.
|
||||
items.scrolls.scrollofupgrade.remove_curse=The scroll of upgrade cleanses the curse on your item!
|
||||
items.scrolls.scrollofupgrade.desc=This scroll will upgrade a single item, improving its quality. A wand will increase in power and number of charges, weapons and armor will deal and block more damage, and the effects of rings will intensify. This scroll is even able to mitigate or sometimes totally dispel curse effects, though it is not as potent as a scroll of remove curse.
|
||||
items.scrolls.scrollofupgrade.desc=This scroll will upgrade a single item, improving its quality. A wand will increase in power and number of charges, weapons and armor will deal and block more damage, and the effects of rings will intensify.\n\nThis scroll is even able to mitigate or sometimes totally dispel curse effects, though it is not as potent as a scroll of remove curse.\n\nThe magic of the scroll may also interfere with and erase enchantments on weapons and glyphs on armor. The chance for this begins when upgrading from +4, and will be guaranteed at +8 or higher.
|
||||
|
||||
|
||||
|
||||
|
@ -967,7 +967,7 @@ items.spells.spell.no_magic=You can't cast spells while magic immune.
|
|||
items.spells.magicalinfusion.name=magical infusion
|
||||
items.spells.magicalinfusion.inv_title=Infuse an item
|
||||
items.spells.magicalinfusion.infuse=Your %s is infused with arcane energy!
|
||||
items.spells.magicalinfusion.desc=This spell will infuse a weapon or armor with powerful magical energy.\n\nIn addition to being upgraded, a weapon will gain a magical enchantment, or armor will be imbued with a magical glyph.\n\nIf the item already has an enchantment or glyph, it will not be erased by the upgrade.
|
||||
items.spells.magicalinfusion.desc=This spell posses the same magical power as a scroll of upgrade, but in a more stable form.\n\nIn addition to upgrading an item as normal, it will never erase an enchantment on a weapon or a glyph on armor.
|
||||
|
||||
items.spells.magicalporter.name=magical porter
|
||||
items.spells.magicalporter.inv_title=Port an item
|
||||
|
|
Loading…
Reference in New Issue
Block a user