Revenant
@ -0,0 +1 @@
|
||||
{fields:[{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Array<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
Before Width: | Height: | Size: 965 B After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 820 B After Width: | Height: | Size: 950 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 470 B After Width: | Height: | Size: 467 B |
Before Width: | Height: | Size: 724 B After Width: | Height: | Size: 724 B |
Before Width: | Height: | Size: 822 KiB After Width: | Height: | Size: 826 KiB |
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 125 KiB |
Before Width: | Height: | Size: 239 KiB After Width: | Height: | Size: 239 KiB |
Before Width: | Height: | Size: 876 KiB After Width: | Height: | Size: 876 KiB |
@ -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));
|
||||
}
|
||||
|
||||
|