This commit is contained in:
Anuken
2021-03-28 19:56:20 -04:00
17 changed files with 2419 additions and 167 deletions

View File

@@ -21,7 +21,11 @@ public class GroundAI extends AIController{
if(core != null && unit.within(core, unit.range() / 1.1f + core.block.size * tilesize / 2f)){
target = core;
Arrays.fill(targets, core);
for(int i = 0; i < targets.length; i++){
if(unit.mounts[i].weapon.bullet.collidesGround){
targets[i] = core;
}
}
}
if((core == null || !unit.within(core, unit.range() * 0.5f)) && command() == UnitCommand.attack){

View File

@@ -368,7 +368,7 @@ public class Logic implements ApplicationListener{
if(state.isGame()){
if(!net.client()){
state.enemies = Groups.unit.count(u -> u.team() == state.rules.waveTeam && u.type.isCounted);
state.enemies = Groups.unit.count(u -> u.team() == state.rules.waveTeam && u.isCounted());
}
if(!state.isPaused()){

View File

@@ -60,7 +60,7 @@ public class ContinuousLaserBulletType extends BulletType{
@Override
public float range(){
return length;
return Math.max(length, maxRange);
}
@Override

View File

@@ -56,7 +56,7 @@ public class LaserBulletType extends BulletType{
@Override
public float range(){
return length;
return Math.max(length, maxRange);
}
@Override

View File

@@ -50,7 +50,7 @@ public class SapBulletType extends BulletType{
@Override
public float range(){
return length;
return Math.max(length, maxRange);
}
@Override

View File

@@ -47,7 +47,7 @@ public class ShrapnelBulletType extends BulletType{
@Override
public float range(){
return length;
return Math.max(length, maxRange);
}
@Override

View File

@@ -186,6 +186,10 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
return !disarmed && !(type.canBoost && isFlying());
}
public boolean isCounted(){
return type.isCounted;
}
@Override
public int itemCapacity(){
return type.itemCapacity;