Balancing, tweaks and bugfixes

This commit is contained in:
Anuken
2019-04-02 22:43:20 -04:00
parent 3f6aeac33d
commit efdaf0d986
15 changed files with 63 additions and 30 deletions

View File

@@ -278,6 +278,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
@Override
public void removed(){
super.removed();
Tile tile = world.tile(spawner);
if(tile != null){
tile.block().unitRemoved(tile, this);

View File

@@ -142,10 +142,17 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
@Override
public void removed(){
Tile tile = world.tile(lastWeightTile);
if(lastWeightTile != Pos.invalid){
Tile tile = world.tile(lastWeightTile);
if(tile != null){
tile.weight -= Math.max(lastWeightDelta, tile.weight);
if(tile != null){
int dec = Math.min(lastWeightDelta, wasFlying ? tile.airWeight : tile.weight);
if(!wasFlying){
tile.weight -= dec;
}else{
tile.airWeight -= dec;
}
}
}
}