Unit tweaks
|
Before Width: | Height: | Size: 792 B |
|
Before Width: | Height: | Size: 430 B |
|
Before Width: | Height: | Size: 899 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 662 B After Width: | Height: | Size: 592 B |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 331 B |
|
Before Width: | Height: | Size: 663 B After Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 729 B After Width: | Height: | Size: 415 B |
|
Before Width: | Height: | Size: 991 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 361 B |
|
Before Width: | Height: | Size: 181 B |
|
Before Width: | Height: | Size: 415 B |
|
Before Width: | Height: | Size: 200 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 607 B |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 794 B |
|
Before Width: | Height: | Size: 709 B |
|
Before Width: | Height: | Size: 927 B |
|
Before Width: | Height: | Size: 524 B |
|
Before Width: | Height: | Size: 455 B |
|
Before Width: | Height: | Size: 604 B |
|
Before Width: | Height: | Size: 296 B |
|
Before Width: | Height: | Size: 362 B |
|
Before Width: | Height: | Size: 490 B |
|
Before Width: | Height: | Size: 448 B |
|
Before Width: | Height: | Size: 443 B |
|
Before Width: | Height: | Size: 503 B |
|
Before Width: | Height: | Size: 313 B |
|
Before Width: | Height: | Size: 465 B |
|
Before Width: | Height: | Size: 467 B |
|
Before Width: | Height: | Size: 663 B |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 445 B |
@@ -242,3 +242,4 @@
|
|||||||
63502=segment|block-segment-medium
|
63502=segment|block-segment-medium
|
||||||
63501=large-overdrive-projector|block-large-overdrive-projector-medium
|
63501=large-overdrive-projector|block-large-overdrive-projector-medium
|
||||||
63500=disassembler|block-disassembler-medium
|
63500=disassembler|block-disassembler-medium
|
||||||
|
63499=advanced-reconstructor|block-advanced-reconstructor-medium
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 761 B After Width: | Height: | Size: 763 B |
|
Before Width: | Height: | Size: 856 KiB After Width: | Height: | Size: 851 KiB |
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 124 KiB |
@@ -77,7 +77,7 @@ public class Blocks implements ContentList{
|
|||||||
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown, segment,
|
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown, segment,
|
||||||
|
|
||||||
//units
|
//units
|
||||||
groundFactory, airFactory, navalFactory, basicReconstructor, repairPoint,
|
groundFactory, airFactory, navalFactory, basicReconstructor, advancedReconstructor, repairPoint,
|
||||||
|
|
||||||
//campaign
|
//campaign
|
||||||
launchPad, launchPadLarge, coreSilo, dataProcessor,
|
launchPad, launchPadLarge, coreSilo, dataProcessor,
|
||||||
@@ -1722,8 +1722,6 @@ public class Blocks implements ContentList{
|
|||||||
//endregion
|
//endregion
|
||||||
//region units
|
//region units
|
||||||
|
|
||||||
//for testing only.
|
|
||||||
|
|
||||||
groundFactory = new UnitFactory("ground-factory"){{
|
groundFactory = new UnitFactory("ground-factory"){{
|
||||||
requirements(Category.units, ItemStack.with(Items.copper, 30, Items.lead, 70));
|
requirements(Category.units, ItemStack.with(Items.copper, 30, Items.lead, 70));
|
||||||
plans = new UnitPlan[]{
|
plans = new UnitPlan[]{
|
||||||
@@ -1768,12 +1766,29 @@ public class Blocks implements ContentList{
|
|||||||
constructTime = 60f * 5f;
|
constructTime = 60f * 5f;
|
||||||
|
|
||||||
upgrades = new UnitType[][]{
|
upgrades = new UnitType[][]{
|
||||||
|
{UnitTypes.tau, UnitTypes.oculon},
|
||||||
{UnitTypes.dagger, UnitTypes.titan},
|
{UnitTypes.dagger, UnitTypes.titan},
|
||||||
{UnitTypes.crawler, UnitTypes.eruptor},
|
{UnitTypes.crawler, UnitTypes.eruptor},
|
||||||
{UnitTypes.wraith, UnitTypes.ghoul},
|
{UnitTypes.wraith, UnitTypes.ghoul},
|
||||||
};
|
};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
advancedReconstructor = new Reconstructor("advanced-reconstructor"){{
|
||||||
|
requirements(Category.units, ItemStack.with(Items.copper, 50, Items.lead, 120, Items.silicon, 230));
|
||||||
|
|
||||||
|
size = 5;
|
||||||
|
consumes.power(6f);
|
||||||
|
consumes.items(ItemStack.with(Items.silicon, 60, Items.titanium, 60));
|
||||||
|
itemCapacity = 80;
|
||||||
|
|
||||||
|
constructTime = 60f * 15f;
|
||||||
|
|
||||||
|
upgrades = new UnitType[][]{
|
||||||
|
{UnitTypes.ghoul, UnitTypes.revenant},
|
||||||
|
{UnitTypes.titan, UnitTypes.fortress},
|
||||||
|
};
|
||||||
|
}};
|
||||||
|
|
||||||
repairPoint = new RepairPoint("repair-point"){{
|
repairPoint = new RepairPoint("repair-point"){{
|
||||||
requirements(Category.units, ItemStack.with(Items.lead, 15, Items.copper, 15, Items.silicon, 15));
|
requirements(Category.units, ItemStack.with(Items.lead, 15, Items.copper, 15, Items.silicon, 15));
|
||||||
repairSpeed = 0.5f;
|
repairSpeed = 0.5f;
|
||||||
|
|||||||
@@ -96,26 +96,26 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
tau = new UnitType("tau"){{
|
tau = new UnitType("tau"){{
|
||||||
itemCapacity = 60;
|
itemCapacity = 60;
|
||||||
canBoost = true;
|
canBoost = true;
|
||||||
boostMultiplier = 1.5f;
|
boostMultiplier = 1.5f;
|
||||||
speed = 0.5f;
|
speed = 0.5f;
|
||||||
hitsize = 8f;
|
hitsize = 8f;
|
||||||
health = 100f;
|
health = 100f;
|
||||||
buildSpeed = 0.8f;
|
buildSpeed = 0.8f;
|
||||||
|
|
||||||
weapons.add(new Weapon("heal-weapon"){{
|
weapons.add(new Weapon("heal-weapon"){{
|
||||||
shootY = 1.5f;
|
shootY = 1.5f;
|
||||||
reload = 24f;
|
reload = 24f;
|
||||||
x = 1f;
|
x = 1f;
|
||||||
shootX = 3.5f;
|
shootX = 3.5f;
|
||||||
alternate = false;
|
alternate = false;
|
||||||
ejectEffect = Fx.none;
|
ejectEffect = Fx.none;
|
||||||
recoil = 2f;
|
recoil = 2f;
|
||||||
bullet = Bullets.healBullet;
|
bullet = Bullets.healBullet;
|
||||||
shootSound = Sounds.pew;
|
shootSound = Sounds.pew;
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
@@ -145,6 +145,39 @@ public class UnitTypes implements ContentList{
|
|||||||
}*/
|
}*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
oculon = new UnitType("oculon"){{
|
||||||
|
drillTier = 1;
|
||||||
|
hitsize = 9f;
|
||||||
|
boostMultiplier = 2f;
|
||||||
|
itemCapacity = 20;
|
||||||
|
health = 230f;
|
||||||
|
buildSpeed = 1.5f;
|
||||||
|
canBoost = true;
|
||||||
|
|
||||||
|
speed = 0.4f;
|
||||||
|
hitsize = 10f;
|
||||||
|
|
||||||
|
weapons.add(new Weapon("beam-weapon"){{
|
||||||
|
shake = 2f;
|
||||||
|
shootY = 4f;
|
||||||
|
shootX = 6f;
|
||||||
|
x = 0.25f;
|
||||||
|
reload = 50f;
|
||||||
|
alternate = true;
|
||||||
|
recoil = 4f;
|
||||||
|
shootSound = Sounds.laser;
|
||||||
|
|
||||||
|
bullet = new LaserBulletType(){{
|
||||||
|
damage = 20f;
|
||||||
|
recoil = 1f;
|
||||||
|
sideAngle = 45f;
|
||||||
|
sideWidth = 1f;
|
||||||
|
sideLength = 70f;
|
||||||
|
colors = new Color[]{Pal.heal.cpy().a(0.4f), Pal.heal, Color.white};
|
||||||
|
}};
|
||||||
|
}});
|
||||||
|
}};
|
||||||
|
|
||||||
fortress = new UnitType("fortress"){{
|
fortress = new UnitType("fortress"){{
|
||||||
speed = 0.38f;
|
speed = 0.38f;
|
||||||
hitsize = 13f;
|
hitsize = 13f;
|
||||||
@@ -252,6 +285,8 @@ public class UnitTypes implements ContentList{
|
|||||||
legLengthScl = 1f;
|
legLengthScl = 1f;
|
||||||
rippleScale = 2f;
|
rippleScale = 2f;
|
||||||
legSpeed = 0.2f;
|
legSpeed = 0.2f;
|
||||||
|
legSplashDamage = 32;
|
||||||
|
legSplashRange = 30;
|
||||||
|
|
||||||
for(boolean b : Mathf.booleans){
|
for(boolean b : Mathf.booleans){
|
||||||
weapons.add(
|
weapons.add(
|
||||||
@@ -479,37 +514,6 @@ public class UnitTypes implements ContentList{
|
|||||||
hitsize = 8f;
|
hitsize = 8f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
oculon = new UnitType("oculon"){{
|
|
||||||
drillTier = -1;
|
|
||||||
speed = 0.6f;
|
|
||||||
hitsize = 9f;
|
|
||||||
boostMultiplier = 2f;
|
|
||||||
itemCapacity = 15;
|
|
||||||
health = 160f;
|
|
||||||
buildSpeed = 0.9f;
|
|
||||||
canBoost = true;
|
|
||||||
|
|
||||||
weapons.add(new Weapon("beam-weapon"){{
|
|
||||||
shake = 2f;
|
|
||||||
shootY = 1f;
|
|
||||||
x = 1f;
|
|
||||||
shootX = 3f;
|
|
||||||
reload = 50f;
|
|
||||||
alternate = true;
|
|
||||||
recoil = 4f;
|
|
||||||
shootSound = Sounds.laser;
|
|
||||||
|
|
||||||
bullet = new LaserBulletType(){{
|
|
||||||
damage = 20f;
|
|
||||||
recoil = 1f;
|
|
||||||
sideAngle = 45f;
|
|
||||||
sideWidth = 1f;
|
|
||||||
sideLength = 70f;
|
|
||||||
colors = new Color[]{Pal.heal.cpy().a(0.4f), Pal.heal, Color.white};
|
|
||||||
}};
|
|
||||||
}});
|
|
||||||
}};
|
|
||||||
|
|
||||||
trident = new UnitType("trident"){{
|
trident = new UnitType("trident"){{
|
||||||
|
|
||||||
health = 500;
|
health = 500;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ public class LaserBulletType extends BulletType{
|
|||||||
despawnEffect = Fx.none;
|
despawnEffect = Fx.none;
|
||||||
shootEffect = Fx.hitLancer;
|
shootEffect = Fx.hitLancer;
|
||||||
smokeEffect = Fx.none;
|
smokeEffect = Fx.none;
|
||||||
|
collides = false;
|
||||||
hitSize = 4;
|
hitSize = 4;
|
||||||
lifetime = 16f;
|
lifetime = 16f;
|
||||||
pierce = true;
|
pierce = true;
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
|
|||||||
public void update(){
|
public void update(){
|
||||||
type.update(this);
|
type.update(this);
|
||||||
|
|
||||||
if(type.collidesTiles){
|
if(type.collidesTiles && type.collides){
|
||||||
world.raycastEach(world.toTile(lastX()), world.toTile(lastY()), tileX(), tileY(), (x, y) -> {
|
world.raycastEach(world.toTile(lastX()), world.toTile(lastY()), tileX(), tileY(), (x, y) -> {
|
||||||
|
|
||||||
Tilec tile = world.ent(x, y);
|
Tilec tile = world.ent(x, y);
|
||||||
|
|||||||
@@ -90,6 +90,10 @@ abstract class LegsComp implements Posc, Rotc, Hitboxc, Flyingc, Unitc, Elevatio
|
|||||||
if(type.landShake > 0){
|
if(type.landShake > 0){
|
||||||
Effects.shake(type.landShake, type.landShake, l.base);
|
Effects.shake(type.landShake, type.landShake, l.base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(type.legSplashDamage > 0){
|
||||||
|
Damage.damage(team(), l.base.x, l.base.y, type.legSplashRange, type.legSplashDamage, false, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
l.group = group;
|
l.group = group;
|
||||||
|
|||||||
@@ -20,8 +20,7 @@ public class InverseKinematics{
|
|||||||
result.set(mat2[0].dot(end), mat2[1].dot(end));
|
result.set(mat2[0].dot(end), mat2[1].dot(end));
|
||||||
float len = result.len();
|
float len = result.len();
|
||||||
float dist = Math.max(0, Math.min(lengthA, (len + (lengthA * lengthA - lengthB * lengthB) / len) / 2));
|
float dist = Math.max(0, Math.min(lengthA, (len + (lengthA * lengthA - lengthB * lengthB) / len) / 2));
|
||||||
float e = Mathf.sqrt(lengthA * lengthA - dist * dist);
|
Vec2 src = temp.set(dist, Mathf.sqrt(lengthA * lengthA - dist * dist));
|
||||||
Vec2 src = temp.set(dist, e);
|
|
||||||
result.set(mat1[0].dot(src), mat1[1].dot(src));
|
result.set(mat1[0].dot(src), mat1[1].dot(src));
|
||||||
|
|
||||||
return dist > 0 && dist < lengthA;
|
return dist > 0 && dist < lengthA;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import arc.util.*;
|
|||||||
import arc.util.ArcAnnotate.*;
|
import arc.util.ArcAnnotate.*;
|
||||||
import mindustry.ai.types.*;
|
import mindustry.ai.types.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
|
import mindustry.content.*;
|
||||||
import mindustry.ctype.*;
|
import mindustry.ctype.*;
|
||||||
import mindustry.entities.*;
|
import mindustry.entities.*;
|
||||||
import mindustry.entities.units.*;
|
import mindustry.entities.units.*;
|
||||||
@@ -47,6 +48,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
//TODO document
|
//TODO document
|
||||||
public int legCount = 4, legGroupSize = 2;
|
public int legCount = 4, legGroupSize = 2;
|
||||||
public float legLength = 10f, legSpeed = 0.1f, legTrns = 1f, legBaseOffset = 0f, legMoveSpace = 1f, legExtension = 0, legPairOffset = 0, legLengthScl = 1f, kinematicScl = 1f;
|
public float legLength = 10f, legSpeed = 0.1f, legTrns = 1f, legBaseOffset = 0f, legMoveSpace = 1f, legExtension = 0, legPairOffset = 0, legLengthScl = 1f, kinematicScl = 1f;
|
||||||
|
public float legSplashDamage = 0f, legSplashRange = 5;
|
||||||
public boolean flipBackLegs = true;
|
public boolean flipBackLegs = true;
|
||||||
|
|
||||||
public int itemCapacity = 30;
|
public int itemCapacity = 30;
|
||||||
@@ -413,7 +415,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
float ft = sin*(2.5f + (unit.hitSize()-8f)/2f);
|
float ft = sin*(2.5f + (unit.hitSize()-8f)/2f);
|
||||||
float boostTrns = e * 2f;
|
float boostTrns = e * 2f;
|
||||||
|
|
||||||
Floor floor = unit.floorOn();
|
Floor floor = unit.isFlying() ? Blocks.air.asFloor() : unit.floorOn();
|
||||||
|
|
||||||
if(floor.isLiquid){
|
if(floor.isLiquid){
|
||||||
Draw.color(Color.white, floor.mapColor, 0.5f);
|
Draw.color(Color.white, floor.mapColor, 0.5f);
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=ea6aad4ca7f67aa74c60dd77442197ee32fa756c
|
archash=ceaaf0c6e4ec6659053112d1de712874c5b9c789
|
||||||
|
|||||||