Removed core bullet shield / Drill ore-count
This commit is contained in:
@@ -8,14 +8,12 @@ import com.badlogic.gdx.utils.Pool.Poolable;
|
||||
import io.anuke.annotations.Annotations.Loc;
|
||||
import io.anuke.annotations.Annotations.Remote;
|
||||
import io.anuke.mindustry.content.StatusEffects;
|
||||
import io.anuke.mindustry.content.fx.BulletFx;
|
||||
import io.anuke.mindustry.entities.Units;
|
||||
import io.anuke.mindustry.entities.traits.SyncTrait;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
import io.anuke.mindustry.gen.Call;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.blocks.storage.CoreBlock.CoreEntity;
|
||||
import io.anuke.ucore.core.Effects;
|
||||
import io.anuke.ucore.core.Effects.Effect;
|
||||
import io.anuke.ucore.entities.EntityGroup;
|
||||
@@ -33,7 +31,8 @@ import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
import java.io.IOException;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
import static io.anuke.mindustry.Vars.bulletGroup;
|
||||
import static io.anuke.mindustry.Vars.world;
|
||||
|
||||
public class Lightning extends TimedEntity implements Poolable, DrawTrait, SyncTrait{
|
||||
private static Array<SolidTrait> entities = new Array<>();
|
||||
@@ -61,9 +60,6 @@ public class Lightning extends TimedEntity implements Poolable, DrawTrait, SyncT
|
||||
public static void createLighting(int seed, Team team, Effect effect, Color color, float damage, float x, float y, float targetAngle, int length){
|
||||
Lightning l = Pooling.obtain(Lightning.class, Lightning::new);
|
||||
|
||||
//TODO hacky workaround
|
||||
if(checkShield(team, x, y)) return;
|
||||
|
||||
l.x = x;
|
||||
l.y = y;
|
||||
l.random.setSeed(seed);
|
||||
@@ -84,7 +80,6 @@ public class Lightning extends TimedEntity implements Poolable, DrawTrait, SyncT
|
||||
float fx = x, fy = y;
|
||||
float x2 = x + Angles.trnsx(angle, step);
|
||||
float y2 = y + Angles.trnsy(angle, step);
|
||||
if(checkShield(team, x2, y2)) break;
|
||||
float fangle = angle;
|
||||
|
||||
angle += Mathf.range(15f);
|
||||
@@ -131,21 +126,6 @@ public class Lightning extends TimedEntity implements Poolable, DrawTrait, SyncT
|
||||
l.add();
|
||||
}
|
||||
|
||||
private static boolean checkShield(Team team, float x, float y){
|
||||
if(team != Team.none){
|
||||
for(Team enemy : state.teams.enemiesOf(team)) {
|
||||
for (Tile core : state.teams.get(enemy).cores) {
|
||||
if(core.distanceTo(x, y) <= state.mode.enemyCoreShieldRadius){
|
||||
core.<CoreEntity>entity().shieldHeat = 1f;
|
||||
Effects.effect(BulletFx.absorb, x, y);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSyncing(){
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user