v0.8.0: fixed .class instead of reference when damaging in some cases
This commit is contained in:
parent
ac8d44c6fd
commit
0277224f7e
|
@ -415,7 +415,7 @@ public abstract class Char extends Actor {
|
|||
return;
|
||||
}
|
||||
|
||||
if (src != LifeLink.class && buff(LifeLink.class) != null){
|
||||
if (!(src instanceof LifeLink) && buff(LifeLink.class) != null){
|
||||
HashSet<LifeLink> links = buffs(LifeLink.class);
|
||||
for (LifeLink link : links.toArray(new LifeLink[0])){
|
||||
if (Actor.findById(link.object) == null){
|
||||
|
@ -426,7 +426,7 @@ public abstract class Char extends Actor {
|
|||
dmg = (int)Math.ceil(dmg / (float)(links.size()+1));
|
||||
for (LifeLink link : links){
|
||||
Char ch = (Char)Actor.findById(link.object);
|
||||
ch.damage(dmg, LifeLink.class);
|
||||
ch.damage(dmg, link);
|
||||
if (!ch.isAlive()){
|
||||
link.detach();
|
||||
}
|
||||
|
|
|
@ -1005,7 +1005,7 @@ public class NewTengu extends Mob {
|
|||
|
||||
Char ch = Actor.findChar(cell);
|
||||
if (ch != null && !(ch instanceof NewTengu)){
|
||||
ch.damage(2 + Dungeon.depth, Electricity.class);
|
||||
ch.damage(2 + Dungeon.depth, new Electricity());
|
||||
|
||||
if (ch == Dungeon.hero && !ch.isAlive()) {
|
||||
Dungeon.fail(NewTengu.class);
|
||||
|
|
|
@ -108,7 +108,7 @@ public class Pylon extends Mob {
|
|||
private void shockChar( Char ch ){
|
||||
if (ch != null && !(ch instanceof NewDM300)){
|
||||
ch.sprite.flash();
|
||||
ch.damage(Random.NormalIntRange(10, 20), Electricity.class);
|
||||
ch.damage(Random.NormalIntRange(10, 20), new Electricity());
|
||||
|
||||
if (ch == Dungeon.hero && !ch.isAlive()){
|
||||
Dungeon.fail(NewDM300.class);
|
||||
|
|
|
@ -53,7 +53,7 @@ public class MageArmor extends ClassArmor {
|
|||
&& mob.alignment != Char.Alignment.ALLY) {
|
||||
Buff.affect( mob, Burning.class ).reignite( mob );
|
||||
Buff.prolong( mob, Roots.class, 5 );
|
||||
mob.damage(Random.NormalIntRange(4, 16 + Dungeon.depth), Burning.class);
|
||||
mob.damage(Random.NormalIntRange(4, 16 + Dungeon.depth), new Burning());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user