the statud effect burning affects tiles
This commit is contained in:
@@ -185,7 +185,7 @@ public class BlockIndexer{
|
|||||||
|
|
||||||
if(other == null) continue;
|
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);
|
cons.get(other);
|
||||||
any = true;
|
any = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -267,6 +267,11 @@ public class Damage{
|
|||||||
}else{
|
}else{
|
||||||
Units.nearby(rect, cons);
|
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. */
|
/** Damages all entities and blocks in a radius that are enemies of the team. */
|
||||||
|
|||||||
@@ -131,6 +131,9 @@ public abstract class BulletType extends Content{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void hitTile(Bullet b, Building tile){
|
public void hitTile(Bullet b, Building tile){
|
||||||
|
if(status == StatusEffects.burning) {
|
||||||
|
Damage.createIncend(b.x, b.y, damage/10f, (int) damage/10);
|
||||||
|
}
|
||||||
hit(b);
|
hit(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user