v0.7.4: various enchantment and glyph balance changes

This commit is contained in:
Evan Debenham 2019-07-02 17:49:37 -04:00
parent fd4dc11da0
commit b8490b5b29
14 changed files with 83 additions and 92 deletions

View File

@ -31,7 +31,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Thief;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Brimstone;
import com.shatteredpixel.shatteredpixeldungeon.items.food.ChargrilledMeat;
import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
@ -85,43 +84,36 @@ public class Burning extends Buff implements Hero.Doom {
int damage = Random.NormalIntRange( 1, 3 + Dungeon.depth/4 );
Buff.detach( target, Chill.class);
//FIXME doesn't work with the sad ghost
if (target instanceof Hero) {
Hero hero = (Hero)target;
if (hero.belongings.armor != null && hero.belongings.armor.hasGlyph(Brimstone.class, hero)){
Buff.affect(target, Brimstone.BrimstoneShield.class);
hero.damage( damage, this );
burnIncrement++;
} else {
//at 4+ turns, there is a (turns-3)/3 chance an item burns
if (Random.Int(3) < (burnIncrement - 3)){
burnIncrement = 0;
hero.damage( damage, this );
burnIncrement++;
ArrayList<Item> burnable = new ArrayList<>();
//does not reach inside of containers
for (Item i : hero.belongings.backpack.items){
if ((i instanceof Scroll && !(i instanceof ScrollOfUpgrade))
|| i instanceof MysteryMeat){
burnable.add(i);
}
}
//at 4+ turns, there is a (turns-3)/3 chance an item burns
if (Random.Int(3) < (burnIncrement - 3)){
burnIncrement = 0;
ArrayList<Item> burnable = new ArrayList<>();
//does not reach inside of containers
for (Item i : hero.belongings.backpack.items){
if ((i instanceof Scroll && !(i instanceof ScrollOfUpgrade))
|| i instanceof MysteryMeat){
burnable.add(i);
if (!burnable.isEmpty()){
Item toBurn = Random.element(burnable).detach(hero.belongings.backpack);
GLog.w( Messages.get(this, "burnsup", Messages.capitalize(toBurn.toString())) );
if (toBurn instanceof MysteryMeat){
ChargrilledMeat steak = new ChargrilledMeat();
if (!steak.collect( hero.belongings.backpack )) {
Dungeon.level.drop( steak, hero.pos ).sprite.drop();
}
}
if (!burnable.isEmpty()){
Item toBurn = Random.element(burnable).detach(hero.belongings.backpack);
GLog.w( Messages.get(this, "burnsup", Messages.capitalize(toBurn.toString())) );
if (toBurn instanceof MysteryMeat){
ChargrilledMeat steak = new ChargrilledMeat();
if (!steak.collect( hero.belongings.backpack )) {
Dungeon.level.drop( steak, hero.pos ).sprite.drop();
}
}
Heap.burnFX( hero.pos );
}
Heap.burnFX( hero.pos );
}
}
@ -146,10 +138,6 @@ public class Burning extends Buff implements Hero.Doom {
} else {
Brimstone.BrimstoneShield brimShield = target.buff(Brimstone.BrimstoneShield.class);
if (brimShield != null)
brimShield.startDecay();
detach();
}

View File

@ -37,6 +37,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barkskin;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Berserk;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bless;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Combo;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Drowsy;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
@ -64,6 +65,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Heap.Type;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.KindOfWeapon;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.AntiMagic;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Brimstone;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Viscosity;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.AlchemistsToolkit;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CapeOfThorns;
@ -1572,6 +1574,16 @@ public class Hero extends Char {
super.onOperateComplete();
}
@Override
public boolean isImmune(Class effect) {
if (effect == Burning.class
&& belongings.armor != null
&& belongings.armor.hasGlyph(Brimstone.class, this)){
return true;
}
return super.isImmune(effect);
}
public boolean search( boolean intentional ) {
if (!isAlive()) return false;

View File

@ -326,7 +326,7 @@ public class Armor extends EquipableItem {
}
if (!enemyNear) speed *= (1.2f + 0.04f * level());
} else if (hasGlyph(Flow.class, owner) && Dungeon.level.water[owner.pos]){
speed *= (1.5f + 0.1f * level());
speed *= 2f;
}
if (hasGlyph(Bulk.class, owner) &&

View File

@ -61,7 +61,7 @@ public class AntiMagic extends Armor.Glyph {
}
public static int drRoll( int level ){
return Random.NormalIntRange(2+level, 4 + (level*2));
return Random.NormalIntRange(level, 4 + (level*2));
}
@Override

View File

@ -35,7 +35,7 @@ public class Brimstone extends Armor.Glyph {
@Override
public int proc(Armor armor, Char attacker, Char defender, int damage) {
//no proc effect, see Burning.act
//no proc effect, see Hero.isImmune and GhostHero.isImmune
return damage;
}
@ -44,7 +44,7 @@ public class Brimstone extends Armor.Glyph {
return ORANGE;
}
//FIXME doesn't work with sad ghost
//pre-0.7.4 saves
public static class BrimstoneShield extends ShieldBuff {
{
@ -60,40 +60,18 @@ public class Brimstone extends Armor.Glyph {
return true;
}
int level = hero.belongings.armor.level();
if (shielding() > 0){
decShield();
if (hero.buff(Burning.class) != null){
//max shielding equal to the armors level (this does mean no shield at lvl 0)
if (shielding() < level) {
incShield();
//generates 0.2 + 0.1*lvl shield per turn
spend( 10f / (2f + level));
} else {
//if shield is maxed, don't wait longer than 1 turn to try again
spend( Math.min( TICK, 10f / (2f + level)));
}
} else if (hero.buff(Burning.class) == null){
if (shielding() > 0){
decShield();
//shield decays at a rate of 1 per turn.
spend(TICK);
} else {
detach();
}
//shield decays at a rate of 1 per turn.
spend(TICK);
} else {
detach();
}
return true;
}
public void startDecay(){
//sets the buff to start acting next turn. Invoked by Burning when it expires.
spend(-cooldown()+2);
}
@Override
public void restoreFromBundle(Bundle bundle) {
super.restoreFromBundle(bundle);

View File

@ -31,7 +31,7 @@ public class Swiftness extends Armor.Glyph {
@Override
public int proc(Armor armor, Char attacker, Char defender, int damage) {
//no proc effect, see hero.defenseskill and armor.speedfactor for effect.
//no proc effect, see armor.speedfactor for effect.
return damage;
}

View File

@ -37,9 +37,12 @@ public class Thorns extends Armor.Glyph {
int level = Math.max(0, armor.level());
if ( Random.Int( level/2 + 5) >= 4) {
// lvl 0 - 16.7%
// lvl 1 - 28.6%
// lvl 2 - 37.5%
if ( Random.Int( level + 6) >= 5) {
Buff.affect( attacker, Bleeding.class).set( 4 + level*2 );
Buff.affect( attacker, Bleeding.class).set( 4 + level );
}

View File

@ -42,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShaftParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.AntiMagic;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Brimstone;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
@ -657,6 +658,17 @@ public class DriedRose extends Artifact {
target = cell;
}
@Override
public boolean isImmune(Class effect) {
if (effect == Burning.class
&& rose != null
&& rose.armor != null
&& rose.armor.hasGlyph(Brimstone.class, this)){
return true;
}
return super.isImmune(effect);
}
@Override
public boolean interact() {
updateRose();

View File

@ -46,7 +46,8 @@ public class Blazing extends Weapon.Enchantment {
if (defender.buff(Burning.class) != null){
Buff.affect(defender, Burning.class).reignite(defender, 8f);
defender.damage( Random.NormalIntRange( 1, 3 ), this );
int burnDamage = Random.NormalIntRange( 1, 3 + Dungeon.depth/4 );
defender.damage( Math.round(burnDamage * 0.67f), this );
} else {
Buff.affect(defender, Burning.class).reignite(defender, 8f);
}

View File

@ -49,7 +49,7 @@ public class Blooming extends Weapon.Enchantment {
if (Random.Int( level + 3 ) >= 2) {
boolean secondPlant = level > Random.Int(20);
boolean secondPlant = level > Random.Int(10);
if (plantGrass(defender.pos)){
if (secondPlant) secondPlant = false;
else return damage;

View File

@ -47,12 +47,12 @@ public class Corrupting extends Weapon.Enchantment {
int level = Math.max( 0, weapon.level() );
// lvl 0 - 10%
// lvl 1 ~ 13%
// lvl 2 ~ 16%
// lvl 0 - 15%
// lvl 1 ~ 17%
// lvl 2 ~ 19%
if (damage >= defender.HP
&& !defender.isImmune(Corruption.class)
&& Random.Int( level + 30 ) >= 27){
&& Random.Int( level + 40 ) >= 34){
Mob enemy = (Mob) defender;
Hero hero = (attacker instanceof Hero) ? (Hero) attacker : Dungeon.hero;

View File

@ -39,8 +39,11 @@ public class Lucky extends Weapon.Enchantment {
public int proc( Weapon weapon, Char attacker, Char defender, int damage ) {
int level = Math.max( 0, weapon.level() );
//10% chance, + 1% per weapon level
if (defender.HP <= damage && Random.Float() < (0.1f + .01f*level)){
// lvl 0 - 10%
// lvl 1 ~ 12%
// lvl 2 ~ 14%
if (defender.HP <= damage
&& Random.Int( level + 40 ) >= 36){
Buff.affect(defender, LuckProc.class);
}

View File

@ -54,7 +54,7 @@ public class Shocking extends Weapon.Enchantment {
affected.remove(defender); //defender isn't hurt by lightning
for (Char ch : affected) {
ch.damage((int)Math.ceil(damage/3f), this);
ch.damage(Math.round(damage*0.4f), this);
}
attacker.sprite.parent.addToFront( new Lightning( arcs, null ) );

View File

@ -32,7 +32,7 @@ items.armor.glyphs.antimagic.name=%s of anti-magic
items.armor.glyphs.antimagic.desc=This powerful glyph allows armor to defend its wearer against magical attacks as well as physical ones. This magical defence is not affected by the armor's tier.
items.armor.glyphs.brimstone.name=%s of brimstone
items.armor.glyphs.brimstone.desc=This glyph protects the wearer and their belongings from fire, with upgrades it even converts the heat into temporary shielding.
items.armor.glyphs.brimstone.desc=This glyph shields the wearer and their belongings from fire, completely nullifying its damage and negative effects.
items.armor.glyphs.camouflage.name=%s of camouflage
items.armor.glyphs.camouflage.desc=This glyph allows the wearer to blend into tall grass, granting them temporary invisibility.
@ -1250,7 +1250,7 @@ items.weapon.curses.wayward.desc=A wayward weapon has a very hard time finding i
###enchantments
items.weapon.enchantments.blazing.name=blazing %s
items.weapon.enchantments.blazing.desc=This enchantment causes flames to spit forth from a weapon, igniting enemies and terrain alike.
items.weapon.enchantments.blazing.desc=This enchantment causes flames to spit forth from a weapon, igniting enemies and dealing bonus damage to ones that are already aflame.
items.weapon.enchantments.blocking.name=blocking %s
items.weapon.enchantments.blocking.desc=This enchantment will enhance your ability to defend yourself after attacking with this weapon.
@ -1289,12 +1289,6 @@ items.weapon.enchantments.projecting.desc=With this enchantment melee weapons wi
items.weapon.enchantments.shocking.name=shocking %s
items.weapon.enchantments.shocking.desc=Electricity arcs from a shocking weapon, dealing extra damage to all nearby enemies.
items.weapon.enchantments.swift.name=swift %s
items.weapon.enchantments.swift.desc=A swift weapon can allow the wielder to instantly follow up their attack with a second weapon. The two weapons must be of different types however: one ranged, and one melee.
items.weapon.enchantments.swift$swiftattack.name=Swift Attack
items.weapon.enchantments.swift$swiftattack.desc_melee=The swift enchantment on your melee weapon has made your next attack with a ranged weapon instantaneous. The effect will only last briefly though!
items.weapon.enchantments.swift$swiftattack.desc_ranged=The swift enchantment on your ranged weapon has made your next attack with a melee weapon instantaneous. The effect will only last briefly though!
items.weapon.enchantments.unstable.name=unstable %s
items.weapon.enchantments.unstable.desc=This enchantment radiates chaotic energy, acting as a different enchantment with each hit.