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:
@@ -518,7 +518,7 @@ public class ElementalStrike extends ArmorAbility {
|
||||
} else if (ench instanceof Explosive){
|
||||
if (Random.Float() < 0.5f*powerMulti){
|
||||
Char exploding = Random.element(affected);
|
||||
if (exploding != null) new Bomb.MagicalBomb().explode(exploding.pos);
|
||||
if (exploding != null) new Bomb.ConjuredBomb().explode(exploding.pos);
|
||||
}
|
||||
|
||||
//*** Sacrificial ***
|
||||
|
||||
@@ -38,7 +38,8 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Shaman;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Warlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.YogFist;
|
||||
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.ScrollOfTeleportation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPsionicBlast;
|
||||
@@ -80,7 +81,8 @@ public class AntiMagic extends Armor.Glyph {
|
||||
RESISTS.add( DisintegrationTrap.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( ScrollOfPsionicBlast.class );
|
||||
RESISTS.add( ScrollOfTeleportation.class );
|
||||
|
||||
@@ -37,7 +37,7 @@ import com.watabou.utils.Random;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ArcaneBomb extends Bomb.MagicalBomb {
|
||||
public class ArcaneBomb extends Bomb {
|
||||
|
||||
{
|
||||
image = ItemSpriteSheet.ARCANE_BOMB;
|
||||
|
||||
@@ -197,7 +197,7 @@ public class Bomb extends Item {
|
||||
}
|
||||
|
||||
if (ch == Dungeon.hero && !ch.isAlive()) {
|
||||
if (this instanceof MagicalBomb){
|
||||
if (this instanceof ConjuredBomb){
|
||||
Badges.validateDeathFromFriendlyMagic();
|
||||
}
|
||||
GLog.n(Messages.get(this, "ondeath"));
|
||||
@@ -264,8 +264,8 @@ public class Bomb extends Item {
|
||||
Actor.add( fuse = ((Fuse)bundle.get(FUSE)).ignite(this) );
|
||||
}
|
||||
|
||||
//used to track the death from friendly magic badge
|
||||
public static class MagicalBomb extends Bomb{};
|
||||
//used to track the death from friendly magic badge, if an explosion was conjured by magic
|
||||
public static class ConjuredBomb extends Bomb{};
|
||||
|
||||
public static class Fuse extends Actor{
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ import com.watabou.utils.Random;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class HolyBomb extends Bomb.MagicalBomb {
|
||||
public class HolyBomb extends Bomb {
|
||||
|
||||
{
|
||||
image = ItemSpriteSheet.HOLY_BOMB;
|
||||
@@ -69,12 +69,14 @@ public class HolyBomb extends Bomb.MagicalBomb {
|
||||
|
||||
//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);
|
||||
ch.damage(damage, this);
|
||||
ch.damage(damage, new HolyDamage());
|
||||
}
|
||||
}
|
||||
|
||||
Sample.INSTANCE.play( Assets.Sounds.READ );
|
||||
}
|
||||
|
||||
public static class HolyDamage{}
|
||||
|
||||
@Override
|
||||
public int value() {
|
||||
|
||||
@@ -32,7 +32,7 @@ public class StoneOfBlast extends Runestone {
|
||||
|
||||
@Override
|
||||
protected void activate(int cell) {
|
||||
new Bomb.MagicalBomb().explode(cell);
|
||||
new Bomb.ConjuredBomb().explode(cell);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ public class CursedWand {
|
||||
|
||||
//Bomb explosion
|
||||
case 2:
|
||||
new Bomb.MagicalBomb().explode(targetPos);
|
||||
new Bomb.ConjuredBomb().explode(targetPos);
|
||||
tryForWandProc(Actor.findChar(targetPos), origin);
|
||||
return true;
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public class Explosive extends Weapon.Enchantment {
|
||||
explosionPos = defender.pos;
|
||||
}
|
||||
|
||||
new Bomb.MagicalBomb().explode(explosionPos);
|
||||
new Bomb.ConjuredBomb().explode(explosionPos);
|
||||
|
||||
durability = 100;
|
||||
Item.updateQuickslot();
|
||||
|
||||
Reference in New Issue
Block a user