the statud effect burning affects tiles

This commit is contained in:
Leonwang4234
2020-08-02 13:31:16 -07:00
parent f97d1eedee
commit d2bc2b07a9
3 changed files with 9 additions and 1 deletions

View File

@@ -185,7 +185,7 @@ public class BlockIndexer{
if(other == null) continue;
if(other.team() == team && pred.get(other) && intSet.add(other.pos())){
if((other.team() == team || team == null) && pred.get(other) && intSet.add(other.pos())){
cons.get(other);
any = true;
}

View File

@@ -267,6 +267,11 @@ public class Damage{
}else{
Units.nearby(rect, cons);
}
if(effect == StatusEffects.burning) {
indexer.eachBlock(null, x, y, radius, other -> other.team != team, other -> {
Damage.createIncend(x, y, 1f, (int) duration/50);
});
}
}
/** Damages all entities and blocks in a radius that are enemies of the team. */

View File

@@ -131,6 +131,9 @@ public abstract class BulletType extends Content{
}
public void hitTile(Bullet b, Building tile){
if(status == StatusEffects.burning) {
Damage.createIncend(b.x, b.y, damage/10f, (int) damage/10);
}
hit(b);
}