v2.5.0: DM-300 will not longer spew gas at inorganic allies
This commit is contained in:
@@ -205,7 +205,7 @@ public class DM300 extends Mob {
|
|||||||
if (turnsSinceLastAbility >= MIN_COOLDOWN){
|
if (turnsSinceLastAbility >= MIN_COOLDOWN){
|
||||||
//use a coneAOE to try and account for trickshotting angles
|
//use a coneAOE to try and account for trickshotting angles
|
||||||
ConeAOE aim = new ConeAOE(new Ballistica(pos, enemy.pos, Ballistica.WONT_STOP), Float.POSITIVE_INFINITY, 30, Ballistica.STOP_SOLID);
|
ConeAOE aim = new ConeAOE(new Ballistica(pos, enemy.pos, Ballistica.WONT_STOP), Float.POSITIVE_INFINITY, 30, Ballistica.STOP_SOLID);
|
||||||
if (aim.cells.contains(enemy.pos)) {
|
if (aim.cells.contains(enemy.pos) && !Char.hasProp(enemy, Property.INORGANIC)) {
|
||||||
lastAbility = GAS;
|
lastAbility = GAS;
|
||||||
turnsSinceLastAbility = 0;
|
turnsSinceLastAbility = 0;
|
||||||
|
|
||||||
@@ -217,7 +217,7 @@ public class DM300 extends Mob {
|
|||||||
Sample.INSTANCE.play(Assets.Sounds.GAS);
|
Sample.INSTANCE.play(Assets.Sounds.GAS);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//if we can't gas, then drop rocks
|
//if we can't gas, or if target is inorganic then drop rocks
|
||||||
//unless enemy is already stunned, we don't want to stunlock them
|
//unless enemy is already stunned, we don't want to stunlock them
|
||||||
} else if (enemy.paralysed <= 0) {
|
} else if (enemy.paralysed <= 0) {
|
||||||
lastAbility = ROCKS;
|
lastAbility = ROCKS;
|
||||||
@@ -248,6 +248,10 @@ public class DM300 extends Mob {
|
|||||||
lastAbility = Random.Int(4) != 0 ? GAS : ROCKS;
|
lastAbility = Random.Int(4) != 0 ? GAS : ROCKS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Char.hasProp(enemy, Property.INORGANIC)){
|
||||||
|
lastAbility = ROCKS;
|
||||||
|
}
|
||||||
|
|
||||||
//doesn't spend a turn if enemy is at a distance
|
//doesn't spend a turn if enemy is at a distance
|
||||||
if (Dungeon.level.adjacent(pos, enemy.pos)){
|
if (Dungeon.level.adjacent(pos, enemy.pos)){
|
||||||
spend(TICK);
|
spend(TICK);
|
||||||
|
|||||||
Reference in New Issue
Block a user