diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java index 552a8801b..4c945e2f5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java @@ -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); - - } else { - - hero.damage( damage, this ); - burnIncrement++; - - //at 4+ turns, there is a (turns-3)/3 chance an item burns - if (Random.Int(3) < (burnIncrement - 3)){ - burnIncrement = 0; - - ArrayList 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); + + hero.damage( damage, this ); + burnIncrement++; + + //at 4+ turns, there is a (turns-3)/3 chance an item burns + if (Random.Int(3) < (burnIncrement - 3)){ + burnIncrement = 0; + + ArrayList 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(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index cf8052bec..ded1fd802 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -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; @@ -1571,7 +1573,17 @@ 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; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java index 673514bdc..4b42cbd10 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java @@ -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) && diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java index 38dcf0c2a..a7df694dd 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/AntiMagic.java @@ -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 diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Brimstone.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Brimstone.java index a67a3e020..c5dbde609 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Brimstone.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Brimstone.java @@ -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); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Swiftness.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Swiftness.java index dc8f32196..c5edd20c8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Swiftness.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Swiftness.java @@ -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; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Thorns.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Thorns.java index 5477a46b3..5774fcbfd 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Thorns.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Thorns.java @@ -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 ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java index fff44658b..6d47c9a0c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java @@ -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; @@ -656,7 +657,18 @@ public class DriedRose extends Artifact { private void setTarget(int cell) { 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(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blazing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blazing.java index 0da66fd77..b2129ec37 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blazing.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blazing.java @@ -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); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blooming.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blooming.java index 47ab8c6ae..aea6fbe59 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blooming.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blooming.java @@ -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; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Corrupting.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Corrupting.java index faa071a59..7290fbe60 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Corrupting.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Corrupting.java @@ -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; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Lucky.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Lucky.java index e6fbb77b4..32e55522a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Lucky.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Lucky.java @@ -38,9 +38,12 @@ public class Lucky extends Weapon.Enchantment { @Override 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); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Shocking.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Shocking.java index f7f4fecb0..6b0bd5d08 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Shocking.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Shocking.java @@ -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 ) ); diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties index 9dc3d0d47..f23cfcd00 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties @@ -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.