Final mech boss unit (unfinished)

This commit is contained in:
Anuken
2020-09-04 22:05:15 -04:00
parent 3127bb54b2
commit 739c4f2de2
31 changed files with 4314 additions and 4126 deletions

View File

@@ -199,7 +199,7 @@ public class Bullets implements ContentList{
hitEffect = Fx.flakExplosion;
splashDamage = 18f;
splashDamageRadius = 16f;
fragBullet = flakGlassFrag;
fragBullet = fragGlassFrag;
fragBullets = 3;
explodeRange = 20f;
collidesGround = true;

View File

@@ -121,13 +121,14 @@ public class StatusEffects implements ContentList{
boss = new StatusEffect("boss"){{
permanent = true;
damageMultiplier = 1.5f;
armorMultiplier = 1.5f;
}};
shocked = new StatusEffect("shocked");
blasted = new StatusEffect("blasted");
//no effects, just small amounts of damage.
corroded = new StatusEffect("corroded"){{
damage = 0.1f;
}};

View File

@@ -15,7 +15,7 @@ public class UnitTypes implements ContentList{
//region definitions
//ground
public static @EntityDef({Unitc.class, Mechc.class}) UnitType mace, dagger, crawler, fortress, vestige, cataclyst;
public static @EntityDef({Unitc.class, Mechc.class}) UnitType mace, dagger, crawler, fortress, scepter, reign;
//ground + builder
public static @EntityDef({Unitc.class, Mechc.class, Builderc.class}) UnitType nova;
@@ -130,16 +130,17 @@ public class UnitTypes implements ContentList{
}});
}};
vestige = new UnitType("vestige"){{
scepter = new UnitType("scepter"){{
speed = 0.35f;
hitsize = 20f;
rotateSpeed = 1.9f;
rotateSpeed = 2.1f;
targetAir = false;
health = 9000;
armor = 14f;
armor = 11f;
mechLegMoveScl = 1.3f;
weapons.add(
new Weapon("chaos"){{
new Weapon("scepter-weapon"){{
y = 1f;
x = 16f;
shootY = 8f;
@@ -185,6 +186,58 @@ public class UnitTypes implements ContentList{
);
}};
reign = new UnitType("reign"){{
speed = 0.35f;
hitsize = 26f;
rotateSpeed = 1.65f;
targetAir = false;
health = 24000;
armor = 14f;
mechLegMoveScl = 1.75f;
weapons.add(
new Weapon("reign-weapon"){{
y = 1f;
x = 21.5f;
shootY = 11f;
reload = 18f;
recoil = 5f;
shake = 4f;
ejectEffect = Fx.shellEjectBig;
shootSound = Sounds.artillery;
bullet = new BasicBulletType(13f, 80){{
pierce = true;
width = 11f;
height = 30f;
lifetime = 15f;
shootEffect = Fx.shootBig;
fragVelocityMin = 0.4f;
hitEffect = Fx.blastExplosion;
splashDamage = 25f;
splashDamageRadius = 30f;
fragBullets = 2;
fragLifeMin = 0f;
fragCone = 30f;
fragBullet = new BasicBulletType(9f, 10){{
width = 10f;
height = 10f;
pierce = true;
lifetime = 20f;
hitEffect = Fx.flakExplosion;
splashDamage = 23f;
splashDamageRadius = 15f;
}};
}};
}}
);
}};
//endregion
//region ground support

View File

@@ -163,14 +163,14 @@ public class DefaultWaves{
spacing = 3;
}},
new SpawnGroup(UnitTypes.vestige){{
new SpawnGroup(UnitTypes.scepter){{
begin = 41;
unitAmount = 1;
unitScaling = 1;
spacing = 30;
}},
new SpawnGroup(UnitTypes.cataclyst){{
new SpawnGroup(UnitTypes.reign){{
begin = 81;
unitAmount = 1;
unitScaling = 1;

View File

@@ -34,7 +34,8 @@ public abstract class SaveFileReader{
"titan-factory", "legacy-unit-factory",
"fortress-factory", "legacy-unit-factory",
"mass-conveyor", "payload-conveyor"
"mass-conveyor", "payload-conveyor",
"vestige", "scepter"
);
protected int lastRegionLength;

View File

@@ -92,7 +92,7 @@ public class Administration{
}else{
if(rate.occurences > Config.interactRateKick.num()){
action.player.kick("You are interacting with too many blocks.", 1000 * 30);
}else{
}else if(action.player.getInfo().messageTimer.get(60f * 2f)){
action.player.sendMessage("[scarlet]You are interacting with blocks too quickly.");
}
@@ -660,6 +660,7 @@ public class Administration{
public transient String lastSentMessage;
public transient int messageInfractions;
public transient Ratekeeper rate = new Ratekeeper();
public transient Interval messageTimer = new Interval();
PlayerInfo(String id){
this.id = id;

View File

@@ -62,6 +62,7 @@ public class UnitType extends UnlockableContent{
public float legLength = 10f, legSpeed = 0.1f, legTrns = 1f, legBaseOffset = 0f, legMoveSpace = 1f, legExtension = 0, legPairOffset = 0, legLengthScl = 1f, kinematicScl = 1f, maxStretch = 1.75f;
public float legSplashDamage = 0f, legSplashRange = 5;
public boolean flipBackLegs = true;
public float mechLegMoveScl = 1f;
public int itemCapacity = 30;
public int ammoCapacity = 220;
@@ -254,8 +255,8 @@ public class UnitType extends UnlockableContent{
//region drawing
public void draw(Unit unit){
Mechc legs = unit instanceof Mechc ? (Mechc)unit : null;
float z = unit.elevation > 0.5f ? (lowAltitude ? Layer.flyingUnitLow : Layer.flyingUnit) : groundLayer;
Mechc mech = unit instanceof Mechc ? (Mechc)unit : null;
float z = unit.elevation > 0.5f ? (lowAltitude ? Layer.flyingUnitLow : Layer.flyingUnit) : groundLayer + Mathf.clamp(hitsize/4000f, 0, 0.01f);
if(unit.controller().isBeingControlled(player.unit())){
drawControl(unit);
@@ -268,11 +269,11 @@ public class UnitType extends UnlockableContent{
Draw.z(z - 0.02f);
if(legs != null){
drawMech((Unit & Mechc)legs);
if(mech != null){
drawMech((Unit & Mechc)mech);
float ft = Mathf.sin(legs.walkTime(), 3f, 3f);
legOffset.trns(legs.baseRotation(), 0f, Mathf.lerp(ft * 0.18f * sway, 0f, unit.elevation));
float ft = Mathf.sin(mech.walkTime(), 3f * mechLegMoveScl, 3f);
legOffset.trns(mech.baseRotation(), 0f, Mathf.lerp(ft * 0.18f * sway, 0f, unit.elevation));
unit.trns(legOffset.x, legOffset.y);
}
@@ -300,7 +301,7 @@ public class UnitType extends UnlockableContent{
drawShield(unit);
}
if(legs != null){
if(mech != null){
unit.trns(-legOffset.x, -legOffset.y);
}
@@ -540,7 +541,7 @@ public class UnitType extends UnlockableContent{
Draw.mixcol(Color.white, unit.hitTime);
float e = unit.elevation;
float sin = Mathf.lerp(Mathf.sin(unit.walkTime(), 3f, 1f), 0f, e);
float sin = Mathf.lerp(Mathf.sin(unit.walkTime(), 3f * mechLegMoveScl, 1f), 0f, e);
float ft = sin*(2.5f + (unit.hitSize-8f)/2f);
float boostTrns = e * 2f;

View File

@@ -133,7 +133,7 @@ public class ForceProjector extends Block{
if(buildup >= breakage && !broken){
broken = true;
buildup = breakage;
Fx.shieldBreak.at(x, y, radius, team.color);
Fx.shieldBreak.at(x, y, realRadius(), team.color);
}
if(hit > 0f){