v2.3.0: adjusted magic bomb behaviour slightly:
- magically conjured explosions deal physical damage, not magic damage - they still count for the friendly magic death badge however - arcane bombs and the extra effect of holy bombs do deal magic damage
This commit is contained in:
+1
-1
@@ -518,7 +518,7 @@ public class ElementalStrike extends ArmorAbility {
|
|||||||
} else if (ench instanceof Explosive){
|
} else if (ench instanceof Explosive){
|
||||||
if (Random.Float() < 0.5f*powerMulti){
|
if (Random.Float() < 0.5f*powerMulti){
|
||||||
Char exploding = Random.element(affected);
|
Char exploding = Random.element(affected);
|
||||||
if (exploding != null) new Bomb.MagicalBomb().explode(exploding.pos);
|
if (exploding != null) new Bomb.ConjuredBomb().explode(exploding.pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*** Sacrificial ***
|
//*** Sacrificial ***
|
||||||
|
|||||||
+4
-2
@@ -38,7 +38,8 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Shaman;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Warlock;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Warlock;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.YogFist;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.YogFist;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb;
|
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.ArcaneBomb;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.HolyBomb;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPsionicBlast;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPsionicBlast;
|
||||||
@@ -80,7 +81,8 @@ public class AntiMagic extends Armor.Glyph {
|
|||||||
RESISTS.add( DisintegrationTrap.class );
|
RESISTS.add( DisintegrationTrap.class );
|
||||||
RESISTS.add( GrimTrap.class );
|
RESISTS.add( GrimTrap.class );
|
||||||
|
|
||||||
RESISTS.add( Bomb.MagicalBomb.class );
|
RESISTS.add( ArcaneBomb.class );
|
||||||
|
RESISTS.add( HolyBomb.HolyDamage.class );
|
||||||
RESISTS.add( ScrollOfRetribution.class );
|
RESISTS.add( ScrollOfRetribution.class );
|
||||||
RESISTS.add( ScrollOfPsionicBlast.class );
|
RESISTS.add( ScrollOfPsionicBlast.class );
|
||||||
RESISTS.add( ScrollOfTeleportation.class );
|
RESISTS.add( ScrollOfTeleportation.class );
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@ import com.watabou.utils.Random;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class ArcaneBomb extends Bomb.MagicalBomb {
|
public class ArcaneBomb extends Bomb {
|
||||||
|
|
||||||
{
|
{
|
||||||
image = ItemSpriteSheet.ARCANE_BOMB;
|
image = ItemSpriteSheet.ARCANE_BOMB;
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ public class Bomb extends Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ch == Dungeon.hero && !ch.isAlive()) {
|
if (ch == Dungeon.hero && !ch.isAlive()) {
|
||||||
if (this instanceof MagicalBomb){
|
if (this instanceof ConjuredBomb){
|
||||||
Badges.validateDeathFromFriendlyMagic();
|
Badges.validateDeathFromFriendlyMagic();
|
||||||
}
|
}
|
||||||
GLog.n(Messages.get(this, "ondeath"));
|
GLog.n(Messages.get(this, "ondeath"));
|
||||||
@@ -264,8 +264,8 @@ public class Bomb extends Item {
|
|||||||
Actor.add( fuse = ((Fuse)bundle.get(FUSE)).ignite(this) );
|
Actor.add( fuse = ((Fuse)bundle.get(FUSE)).ignite(this) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//used to track the death from friendly magic badge
|
//used to track the death from friendly magic badge, if an explosion was conjured by magic
|
||||||
public static class MagicalBomb extends Bomb{};
|
public static class ConjuredBomb extends Bomb{};
|
||||||
|
|
||||||
public static class Fuse extends Actor{
|
public static class Fuse extends Actor{
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -36,7 +36,7 @@ import com.watabou.utils.Random;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class HolyBomb extends Bomb.MagicalBomb {
|
public class HolyBomb extends Bomb {
|
||||||
|
|
||||||
{
|
{
|
||||||
image = ItemSpriteSheet.HOLY_BOMB;
|
image = ItemSpriteSheet.HOLY_BOMB;
|
||||||
@@ -69,13 +69,15 @@ public class HolyBomb extends Bomb.MagicalBomb {
|
|||||||
|
|
||||||
//bomb deals an additional 50% damage to unholy enemies in a 5x5 range
|
//bomb deals an additional 50% damage to unholy enemies in a 5x5 range
|
||||||
int damage = Math.round(Random.NormalIntRange( Dungeon.scalingDepth()+5, 10 + Dungeon.scalingDepth() * 2 ) * 0.5f);
|
int damage = Math.round(Random.NormalIntRange( Dungeon.scalingDepth()+5, 10 + Dungeon.scalingDepth() * 2 ) * 0.5f);
|
||||||
ch.damage(damage, this);
|
ch.damage(damage, new HolyDamage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Sample.INSTANCE.play( Assets.Sounds.READ );
|
Sample.INSTANCE.play( Assets.Sounds.READ );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class HolyDamage{}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int value() {
|
public int value() {
|
||||||
//prices of ingredients
|
//prices of ingredients
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ public class StoneOfBlast extends Runestone {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void activate(int cell) {
|
protected void activate(int cell) {
|
||||||
new Bomb.MagicalBomb().explode(cell);
|
new Bomb.ConjuredBomb().explode(cell);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -241,7 +241,7 @@ public class CursedWand {
|
|||||||
|
|
||||||
//Bomb explosion
|
//Bomb explosion
|
||||||
case 2:
|
case 2:
|
||||||
new Bomb.MagicalBomb().explode(targetPos);
|
new Bomb.ConjuredBomb().explode(targetPos);
|
||||||
tryForWandProc(Actor.findChar(targetPos), origin);
|
tryForWandProc(Actor.findChar(targetPos), origin);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -76,7 +76,7 @@ public class Explosive extends Weapon.Enchantment {
|
|||||||
explosionPos = defender.pos;
|
explosionPos = defender.pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
new Bomb.MagicalBomb().explode(explosionPos);
|
new Bomb.ConjuredBomb().explode(explosionPos);
|
||||||
|
|
||||||
durability = 100;
|
durability = 100;
|
||||||
Item.updateQuickslot();
|
Item.updateQuickslot();
|
||||||
|
|||||||
Reference in New Issue
Block a user