Added final campaign map (WIP, untested)
This commit is contained in:
@@ -124,7 +124,7 @@ public class Damage{
|
||||
|
||||
//try to heal the tile
|
||||
if(collide && hitter.type.collides(hitter, tile)){
|
||||
hitter.type.hitTile(hitter, tile, 0f);
|
||||
hitter.type.hitTile(hitter, tile, 0f, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -161,7 +161,9 @@ public abstract class BulletType extends Content{
|
||||
return healPercent <= 0.001f || tile.team != bullet.team || tile.healthf() < 1f;
|
||||
}
|
||||
|
||||
public void hitTile(Bullet b, Building build, float initialHealth){
|
||||
/** If direct is false, this is an indirect hit and the tile was already damaged.
|
||||
* TODO this is a mess. */
|
||||
public void hitTile(Bullet b, Building build, float initialHealth, boolean direct){
|
||||
if(makeFire && build.team != b.team){
|
||||
Fires.create(build.tile);
|
||||
}
|
||||
@@ -169,8 +171,8 @@ public abstract class BulletType extends Content{
|
||||
if(healPercent > 0f && build.team == b.team && !(build.block instanceof ConstructBlock)){
|
||||
Fx.healBlockFull.at(build.x, build.y, build.block.size, Pal.heal);
|
||||
build.heal(healPercent / 100f * build.maxHealth());
|
||||
}else if(build.team != b.team){
|
||||
hit(b, build.x, build.y);
|
||||
}else if(build.team != b.team && direct){
|
||||
hit(b);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public class RailBulletType extends BulletType{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hitTile(Bullet b, Building build, float initialHealth){
|
||||
public void hitTile(Bullet b, Building build, float initialHealth, boolean direct){
|
||||
handle(b, build, initialHealth);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
|
||||
}
|
||||
}
|
||||
|
||||
type.hitTile(self(), tile, health);
|
||||
type.hitTile(self(), tile, health, true);
|
||||
|
||||
return !type.pierceBuilding;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user