mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-20 12:47:37 +07:00
Unit tweaks
This commit is contained in:
BIN
core/assets-raw/sprites/weapons/missiles.png
Normal file
BIN
core/assets-raw/sprites/weapons/missiles.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 503 B |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 737 KiB After Width: | Height: | Size: 739 KiB |
Binary file not shown.
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 127 KiB |
@ -67,6 +67,7 @@ public class UnitTypes implements ContentList{
|
|||||||
hitsize = 8f;
|
hitsize = 8f;
|
||||||
mass = 1.75f;
|
mass = 1.75f;
|
||||||
health = 120;
|
health = 120;
|
||||||
|
sway = 0.25f;
|
||||||
weapons.add(new Weapon(){{
|
weapons.add(new Weapon(){{
|
||||||
reload = 12f;
|
reload = 12f;
|
||||||
shootCone = 180f;
|
shootCone = 180f;
|
||||||
@ -136,7 +137,7 @@ public class UnitTypes implements ContentList{
|
|||||||
range = 140f;
|
range = 140f;
|
||||||
weapons.add(new Weapon(){{
|
weapons.add(new Weapon(){{
|
||||||
y = 1.5f;
|
y = 1.5f;
|
||||||
reload = 28f;
|
reload = 15f;
|
||||||
alternate = true;
|
alternate = true;
|
||||||
ejectEffect = Fx.shellEjectSmall;
|
ejectEffect = Fx.shellEjectSmall;
|
||||||
bullet = Bullets.standardCopper;
|
bullet = Bullets.standardCopper;
|
||||||
@ -144,6 +145,31 @@ public class UnitTypes implements ContentList{
|
|||||||
}});
|
}});
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
ghoul = new UnitType("ghoul"){{
|
||||||
|
health = 220;
|
||||||
|
speed = 2f;
|
||||||
|
mass = 3f;
|
||||||
|
accel = 0.08f;
|
||||||
|
drag = 0.016f;
|
||||||
|
flying = true;
|
||||||
|
targetAir = false;
|
||||||
|
engineOffset = 7.8f;
|
||||||
|
range = 140f;
|
||||||
|
faceTarget = false;
|
||||||
|
weapons.add(new Weapon(){{
|
||||||
|
shootY = 0f;
|
||||||
|
shootX = 0f;
|
||||||
|
reload = 6f;
|
||||||
|
shootCone = 180f;
|
||||||
|
alternate = true;
|
||||||
|
ejectEffect = Fx.none;
|
||||||
|
inaccuracy = 40f;
|
||||||
|
ignoreRotation = true;
|
||||||
|
bullet = Bullets.bombExplosive;
|
||||||
|
shootSound = Sounds.none;
|
||||||
|
}});
|
||||||
|
}};
|
||||||
|
|
||||||
reaper = new UnitType("reaper"){{
|
reaper = new UnitType("reaper"){{
|
||||||
speed = 1.1f;
|
speed = 1.1f;
|
||||||
accel = 0.08f;
|
accel = 0.08f;
|
||||||
@ -235,50 +261,6 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
fortress = new UnitType("fortress", GroundUnit::new){{
|
|
||||||
maxVelocity = 0.78f;
|
|
||||||
speed = 0.15f;
|
|
||||||
drag = 0.4f;
|
|
||||||
mass = 5f;
|
|
||||||
hitsize = 10f;
|
|
||||||
rotatespeed = 0.06f;
|
|
||||||
targetAir = false;
|
|
||||||
health = 750;
|
|
||||||
weapons.add(new Weapon("artillery"){{
|
|
||||||
length = 1f;
|
|
||||||
reload = 60f;
|
|
||||||
width = 10f;
|
|
||||||
alternate = true;
|
|
||||||
recoil = 4f;
|
|
||||||
shake = 2f;
|
|
||||||
ejectEffect = Fx.shellEjectMedium;
|
|
||||||
bullet = Bullets.artilleryUnit;
|
|
||||||
shootSound = Sounds.artillery;
|
|
||||||
}});
|
|
||||||
}};
|
|
||||||
|
|
||||||
eruptor = new UnitType("eruptor", GroundUnit::new){{
|
|
||||||
maxVelocity = 0.81f;
|
|
||||||
speed = 0.16f;
|
|
||||||
drag = 0.4f;
|
|
||||||
mass = 5f;
|
|
||||||
hitsize = 9f;
|
|
||||||
rotatespeed = 0.05f;
|
|
||||||
targetAir = false;
|
|
||||||
health = 600;
|
|
||||||
immunities = ObjectSet.with(StatusEffects.burning, StatusEffects.melting);
|
|
||||||
weapons.add(new Weapon("eruption"){{
|
|
||||||
length = 3f;
|
|
||||||
reload = 10f;
|
|
||||||
alternate = true;
|
|
||||||
ejectEffect = Fx.none;
|
|
||||||
bullet = Bullets.eruptorShot;
|
|
||||||
recoil = 1f;
|
|
||||||
width = 7f;
|
|
||||||
shootSound = Sounds.flame;
|
|
||||||
}});
|
|
||||||
}};
|
|
||||||
|
|
||||||
chaosArray = new UnitType("chaos-array", GroundUnit::new){{
|
chaosArray = new UnitType("chaos-array", GroundUnit::new){{
|
||||||
maxVelocity = 0.68f;
|
maxVelocity = 0.68f;
|
||||||
speed = 0.12f;
|
speed = 0.12f;
|
||||||
@ -328,49 +310,6 @@ public class UnitTypes implements ContentList{
|
|||||||
}});
|
}});
|
||||||
}};
|
}};
|
||||||
|
|
||||||
wraith = new UnitType("wraith", FlyingUnit::new){{
|
|
||||||
speed = 0.3f;
|
|
||||||
maxVelocity = 1.9f;
|
|
||||||
drag = 0.01f;
|
|
||||||
mass = 1.5f;
|
|
||||||
flying = true;
|
|
||||||
health = 75;
|
|
||||||
engineOffset = 5.5f;
|
|
||||||
range = 140f;
|
|
||||||
weapons.add(new Weapon(){{
|
|
||||||
length = 1.5f;
|
|
||||||
reload = 28f;
|
|
||||||
alternate = true;
|
|
||||||
ejectEffect = Fx.shellEjectSmall;
|
|
||||||
bullet = Bullets.standardCopper;
|
|
||||||
shootSound = Sounds.shoot;
|
|
||||||
}});
|
|
||||||
}};
|
|
||||||
|
|
||||||
ghoul = new UnitType("ghoul", FlyingUnit::new){{
|
|
||||||
health = 220;
|
|
||||||
speed = 0.2f;
|
|
||||||
maxVelocity = 1.4f;
|
|
||||||
mass = 3f;
|
|
||||||
drag = 0.01f;
|
|
||||||
flying = true;
|
|
||||||
targetAir = false;
|
|
||||||
engineOffset = 7.8f;
|
|
||||||
range = 140f;
|
|
||||||
weapons.add(new Weapon(){{
|
|
||||||
length = 0f;
|
|
||||||
width = 2f;
|
|
||||||
reload = 12f;
|
|
||||||
alternate = true;
|
|
||||||
ejectEffect = Fx.none;
|
|
||||||
velocityRnd = 1f;
|
|
||||||
inaccuracy = 40f;
|
|
||||||
ignoreRotation = true;
|
|
||||||
bullet = Bullets.bombExplosive;
|
|
||||||
shootSound = Sounds.none;
|
|
||||||
}});
|
|
||||||
}};
|
|
||||||
|
|
||||||
revenant = new UnitType("revenant", HoverUnit::new){{
|
revenant = new UnitType("revenant", HoverUnit::new){{
|
||||||
health = 1000;
|
health = 1000;
|
||||||
mass = 5f;
|
mass = 5f;
|
||||||
|
@ -564,7 +564,7 @@ public class DesktopInput extends InputHandler{
|
|||||||
|
|
||||||
movement.set(xa, ya).nor().scl(speed);
|
movement.set(xa, ya).nor().scl(speed);
|
||||||
float mouseAngle = Angles.mouseAngle(unit.x(), unit.y());
|
float mouseAngle = Angles.mouseAngle(unit.x(), unit.y());
|
||||||
boolean aimCursor = omni && isShooting && unit.type().hasWeapons();
|
boolean aimCursor = omni && isShooting && unit.type().hasWeapons() && unit.type().faceTarget;
|
||||||
|
|
||||||
if(aimCursor){
|
if(aimCursor){
|
||||||
unit.lookAt(mouseAngle);
|
unit.lookAt(mouseAngle);
|
||||||
|
@ -35,6 +35,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
public float health = 200f, range = -1;
|
public float health = 200f, range = -1;
|
||||||
public boolean targetAir = true, targetGround = true;
|
public boolean targetAir = true, targetGround = true;
|
||||||
public boolean faceTarget = true, isCounted = true;
|
public boolean faceTarget = true, isCounted = true;
|
||||||
|
public float sway = 1f;
|
||||||
|
|
||||||
public int itemCapacity = 30;
|
public int itemCapacity = 30;
|
||||||
public int drillTier = -1;
|
public int drillTier = -1;
|
||||||
@ -136,7 +137,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
drawLegs(legs);
|
drawLegs(legs);
|
||||||
|
|
||||||
float ft = Mathf.sin(legs.walkTime(), 3f, 3f);
|
float ft = Mathf.sin(legs.walkTime(), 3f, 3f);
|
||||||
legOffset.trns(legs.baseRotation(), 0f, ft * 0.18f);
|
legOffset.trns(legs.baseRotation(), 0f, ft * 0.18f * sway);
|
||||||
unit.trns(legOffset.x, legOffset.y);
|
unit.trns(legOffset.x, legOffset.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user