Revenant
This commit is contained in:
@@ -175,7 +175,6 @@ public class BlockIndexer{
|
||||
int ty = world.toTile(wy);
|
||||
|
||||
int tileRange = (int)(range / tilesize + 1);
|
||||
intSet.clear();
|
||||
boolean any = false;
|
||||
|
||||
for(int x = -tileRange + tx; x <= tileRange + tx; x++){
|
||||
@@ -186,10 +185,9 @@ public class BlockIndexer{
|
||||
|
||||
if(other == null) continue;
|
||||
|
||||
if(other.team() == team && !intSet.contains(other.pos()) && pred.get(other)){
|
||||
if(other.team() == team && pred.get(other) && intSet.add(other.pos())){
|
||||
cons.get(other);
|
||||
any = true;
|
||||
intSet.add(other.pos());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ public class Bullets implements ContentList{
|
||||
flakScrap, flakLead, flakPlastic, flakExplosive, flakSurge, flakGlass, glassFrag,
|
||||
|
||||
//missiles
|
||||
missileExplosive, missileIncendiary, missileSurge, missileJavelin, missileSwarm, missileRevenant,
|
||||
missileExplosive, missileIncendiary, missileSurge, missileJavelin, missileSwarm,
|
||||
|
||||
//standard
|
||||
standardCopper, standardDense, standardThorium, standardHoming, standardIncendiary, standardMechSmall,
|
||||
@@ -291,25 +291,6 @@ public class Bullets implements ContentList{
|
||||
weaveMag = 2f;
|
||||
}};
|
||||
|
||||
missileRevenant = new MissileBulletType(2.7f, 12, "missile"){{
|
||||
bulletWidth = 8f;
|
||||
bulletHeight = 8f;
|
||||
bulletShrink = 0f;
|
||||
drag = -0.003f;
|
||||
homingRange = 60f;
|
||||
keepVelocity = false;
|
||||
splashDamageRadius = 25f;
|
||||
splashDamage = 10f;
|
||||
lifetime = 60f;
|
||||
trailColor = Pal.unitBack;
|
||||
backColor = Pal.unitBack;
|
||||
frontColor = Pal.unitFront;
|
||||
hitEffect = Fx.blastExplosion;
|
||||
despawnEffect = Fx.blastExplosion;
|
||||
weaveScale = 6f;
|
||||
weaveMag = 1f;
|
||||
}};
|
||||
|
||||
standardCopper = new BasicBulletType(2.5f, 9, "bullet"){{
|
||||
bulletWidth = 7f;
|
||||
bulletHeight = 9f;
|
||||
|
||||
@@ -285,6 +285,55 @@ public class UnitTypes implements ContentList{
|
||||
}});
|
||||
}};
|
||||
|
||||
revenant = new UnitType("revenant"){{
|
||||
ghoul.upgrade = this;
|
||||
tier = 3;
|
||||
|
||||
health = 220;
|
||||
speed = 1.9f;
|
||||
accel = 0.04f;
|
||||
drag = 0.016f;
|
||||
flying = true;
|
||||
range = 140f;
|
||||
//rotateShooting = false;
|
||||
hitsize = 18f;
|
||||
lowAltitude = true;
|
||||
|
||||
engineOffset = 12f;
|
||||
engineSize = 3f;
|
||||
|
||||
for(boolean b : Mathf.booleans){
|
||||
weapons.add(
|
||||
new Weapon("revenant-missiles"){{
|
||||
reload = 70f;
|
||||
x = 7f * Mathf.sign(b);
|
||||
rotate = true;
|
||||
mirror = false;
|
||||
flipSprite = !b;
|
||||
shake = 1f;
|
||||
|
||||
bullet = new MissileBulletType(2.7f, 12, "missile"){{
|
||||
bulletWidth = 8f;
|
||||
bulletHeight = 8f;
|
||||
bulletShrink = 0f;
|
||||
drag = -0.003f;
|
||||
homingRange = 60f;
|
||||
keepVelocity = false;
|
||||
splashDamageRadius = 25f;
|
||||
splashDamage = 10f;
|
||||
lifetime = 60f;
|
||||
trailColor = Pal.unitBack;
|
||||
backColor = Pal.unitBack;
|
||||
frontColor = Pal.unitFront;
|
||||
hitEffect = Fx.blastExplosion;
|
||||
despawnEffect = Fx.blastExplosion;
|
||||
weaveScale = 6f;
|
||||
weaveMag = 1f;
|
||||
}};
|
||||
}});
|
||||
}
|
||||
}};
|
||||
|
||||
reaper = new UnitType("reaper"){{
|
||||
speed = 1.1f;
|
||||
accel = 0.02f;
|
||||
|
||||
@@ -87,7 +87,6 @@ public abstract class BulletType extends Content{
|
||||
|
||||
public float weaveScale = 1f;
|
||||
public float weaveMag = -1f;
|
||||
|
||||
public float hitShake = 0f;
|
||||
|
||||
public BulletType(float speed, float damage){
|
||||
|
||||
@@ -1,9 +1,24 @@
|
||||
package mindustry.entities.comp;
|
||||
|
||||
import arc.math.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.type.*;
|
||||
|
||||
@Component
|
||||
abstract class TrailComp{
|
||||
abstract class TrailComp implements Unitc{
|
||||
@Import UnitType type;
|
||||
@Import float x, y, rotation;
|
||||
|
||||
transient Trail trail = new Trail();
|
||||
|
||||
@Override
|
||||
public void update(){
|
||||
float scale = elevation();
|
||||
float offset = type.engineOffset/2f + type.engineOffset/2f*scale;
|
||||
|
||||
float cx = x + Angles.trnsx(rotation + 180, offset), cy = y + Angles.trnsy(rotation + 180, offset);
|
||||
trail.update(cx, cy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,10 +264,6 @@ public class UnitType extends UnlockableContent{
|
||||
|
||||
if(unit instanceof Trailc){
|
||||
Trail trail = ((Trailc)unit).trail();
|
||||
|
||||
float cx = unit.x() + Angles.trnsx(unit.rotation() + 180, offset),
|
||||
cy = unit.y() + Angles.trnsy(unit.rotation() + 180, offset);
|
||||
trail.update(cx, cy);
|
||||
trail.draw(unit.team().color, (engineSize + Mathf.absin(Time.time(), 2f, engineSize / 4f) * scale));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user