v0.6.1: toxic gas no longer applies any damage if target is immune, even though that damage will be negated
This commit is contained in:
committed by
Evan Debenham
parent
36f7a7aaa6
commit
9763e7e6e8
+8
-5
@@ -47,12 +47,15 @@ public class ToxicGas extends Blob implements Hero.Doom {
|
||||
for (int j = area.top; j < area.bottom; j++){
|
||||
cell = i + j*Dungeon.level.width();
|
||||
if (cur[cell] > 0 && (ch = Actor.findChar( cell )) != null) {
|
||||
int damage = (ch.HT + levelDamage) / 40;
|
||||
if (Random.Int( 40 ) < (ch.HT + levelDamage) % 40) {
|
||||
damage++;
|
||||
}
|
||||
if (!ch.immunities().contains(this.getClass())) {
|
||||
|
||||
ch.damage( damage, this );
|
||||
int damage = (ch.HT + levelDamage) / 40;
|
||||
if (Random.Int( 40 ) < (ch.HT + levelDamage) % 40) {
|
||||
damage++;
|
||||
}
|
||||
|
||||
ch.damage(damage, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user