T4 air carrier unit (*unfinished*)
BIN
core/assets-raw/sprites/effects/large-bomb-back.png
Normal file
After Width: | Height: | Size: 459 B |
BIN
core/assets-raw/sprites/effects/large-bomb.png
Normal file
After Width: | Height: | Size: 355 B |
BIN
core/assets-raw/sprites/units/quad-cell.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
core/assets-raw/sprites/units/quad.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
@ -314,3 +314,4 @@
|
||||
63430=omura|unit-omura-medium
|
||||
63429=mud|block-mud-medium
|
||||
63428=sei|unit-sei-medium
|
||||
63427=quad|unit-quad-medium
|
||||
|
Before Width: | Height: | Size: 642 KiB After Width: | Height: | Size: 639 KiB |
Before Width: | Height: | Size: 735 KiB After Width: | Height: | Size: 760 KiB |
Before Width: | Height: | Size: 1020 KiB After Width: | Height: | Size: 1.0 MiB |
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 182 KiB |
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
Before Width: | Height: | Size: 2.6 MiB After Width: | Height: | Size: 2.6 MiB |
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 184 KiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
@ -290,6 +290,22 @@ public class Fx{
|
||||
Lines.spikes(e.x, e.y, 1f + e.fin() * 6f, e.fout() * 4f, 6);
|
||||
}),
|
||||
|
||||
healBomb = new Effect(40f, 100f, e -> {
|
||||
color(Pal.heal);
|
||||
stroke(e.fout() * 2f);
|
||||
Lines.circle(e.x, e.y, 4f + e.finpow() * 65f);
|
||||
|
||||
color(Pal.heal);
|
||||
for(int i = 0; i < 4; i++){
|
||||
Drawf.tri(e.x, e.y, 6f, 100f * e.fout(), i*90);
|
||||
}
|
||||
|
||||
color();
|
||||
for(int i = 0; i < 4; i++){
|
||||
Drawf.tri(e.x, e.y, 3f, 35f * e.fout(), i*90);
|
||||
}
|
||||
}),
|
||||
|
||||
healWave = new Effect(22, e -> {
|
||||
color(Pal.heal);
|
||||
stroke(e.fout() * 2f);
|
||||
|
@ -39,7 +39,7 @@ public class UnitTypes implements ContentList{
|
||||
public static @EntityDef({Unitc.class, Builderc.class, Minerc.class, Payloadc.class}) UnitType mega;
|
||||
|
||||
//air + building + payload TODO implement
|
||||
public static @EntityDef({Unitc.class, Builderc.class, Minerc.class, Payloadc.class}) UnitType quad, oct;
|
||||
public static @EntityDef({Unitc.class, Builderc.class, Payloadc.class}) UnitType quad, oct;
|
||||
|
||||
//air + building + mining
|
||||
public static @EntityDef({Unitc.class, Builderc.class, Minerc.class}) UnitType alpha, beta, gamma;
|
||||
@ -1047,6 +1047,8 @@ public class UnitTypes implements ContentList{
|
||||
|
||||
mineTier = 2;
|
||||
health = 500;
|
||||
armor = 2f;
|
||||
armor = 5f;
|
||||
speed = 1.8f;
|
||||
accel = 0.06f;
|
||||
drag = 0.017f;
|
||||
@ -1076,6 +1078,65 @@ public class UnitTypes implements ContentList{
|
||||
}});
|
||||
}};
|
||||
|
||||
quad = new UnitType("quad"){{
|
||||
mineTier = 2;
|
||||
armor = 4f;
|
||||
health = 7000;
|
||||
speed = 1.2f;
|
||||
rotateSpeed = 2f;
|
||||
accel = 0.05f;
|
||||
drag = 0.017f;
|
||||
lowAltitude = false;
|
||||
flying = true;
|
||||
engineOffset = 12f;
|
||||
engineSize = 6f;
|
||||
rotateShooting = false;
|
||||
hitsize = 32f;
|
||||
payloadCapacity = (3 * 3) * (8 * 8);
|
||||
buildSpeed = 2.5f;
|
||||
range = 140f;
|
||||
|
||||
weapons.add(
|
||||
new Weapon(){{
|
||||
x = y = 0f;
|
||||
mirror = false;
|
||||
reload = 60f;
|
||||
minShootVelocity = 0.01f;
|
||||
|
||||
bullet = new BasicBulletType(){{
|
||||
sprite = "large-bomb";
|
||||
width = height = 120/4f;
|
||||
|
||||
backColor = Pal.heal;
|
||||
frontColor = Color.white;
|
||||
mixColorTo = Color.white;
|
||||
|
||||
shootCone = 180f;
|
||||
ejectEffect = Fx.none;
|
||||
ignoreRotation = true;
|
||||
shootSound = Sounds.none;
|
||||
despawnShake = 4f;
|
||||
|
||||
collidesAir = false;
|
||||
|
||||
lifetime = 70f;
|
||||
|
||||
despawnEffect = Fx.healBomb;
|
||||
hitEffect = Fx.massiveExplosion;
|
||||
keepVelocity = false;
|
||||
spin = 2f;
|
||||
|
||||
shrinkX = shrinkY = 0.7f;
|
||||
|
||||
speed = 0.001f;
|
||||
collides = false;
|
||||
|
||||
splashDamage = 230f;
|
||||
splashDamageRadius = 90f;
|
||||
}};
|
||||
}});
|
||||
}};
|
||||
|
||||
//endregion
|
||||
//region naval attack
|
||||
|
||||
|
@ -40,7 +40,7 @@ public class Effect{
|
||||
}
|
||||
|
||||
public Effect(float life, Cons<EffectContainer> renderer){
|
||||
this(life, 32f, renderer);
|
||||
this(life,50f, renderer);
|
||||
}
|
||||
|
||||
public Effect ground(){
|
||||
|
@ -1,16 +1,17 @@
|
||||
package mindustry.entities.bullet;
|
||||
|
||||
import arc.Core;
|
||||
import arc.graphics.Color;
|
||||
import arc.graphics.g2d.Draw;
|
||||
import arc.graphics.g2d.TextureRegion;
|
||||
import arc.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import arc.util.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.Pal;
|
||||
import mindustry.graphics.*;
|
||||
|
||||
/** An extended BulletType for most ammo-based bullets shot from turrets and units. */
|
||||
public class BasicBulletType extends BulletType{
|
||||
public Color backColor = Pal.bulletYellowBack, frontColor = Pal.bulletYellow;
|
||||
public Color mixColorFrom = new Color(1f, 1f, 1f, 0f), mixColorTo = new Color(1f, 1f, 1f, 0f);
|
||||
public float width = 5f, height = 7f;
|
||||
public float shrinkX = 0f, shrinkY = 0.5f;
|
||||
public float spin = 0;
|
||||
@ -45,10 +46,15 @@ public class BasicBulletType extends BulletType{
|
||||
float width = this.width * ((1f - shrinkX) + shrinkX * b.fout());
|
||||
float offset = -90 + (spin != 0 ? Mathf.randomSeed(b.id, 360f) + b.time * spin : 0f);
|
||||
|
||||
Color mix = Tmp.c1.set(mixColorFrom).lerp(mixColorTo, b.fin());
|
||||
|
||||
Draw.mixcol(mix, mix.a);
|
||||
|
||||
Draw.color(backColor);
|
||||
Draw.rect(backRegion, b.x, b.y, width, height, b.rotation() + offset);
|
||||
Draw.color(frontColor);
|
||||
Draw.rect(frontRegion, b.x, b.y, width, height, b.rotation() + offset);
|
||||
Draw.color();
|
||||
|
||||
Draw.reset();
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ public abstract class BulletType extends Content{
|
||||
|
||||
public float weaveScale = 1f;
|
||||
public float weaveMag = -1f;
|
||||
public float hitShake = 0f;
|
||||
public float hitShake = 0f, despawnShake = 0f;
|
||||
|
||||
public int puddles;
|
||||
public float puddleRange;
|
||||
@ -187,6 +187,8 @@ public abstract class BulletType extends Content{
|
||||
despawnEffect.at(b.x, b.y, b.rotation(), hitColor);
|
||||
hitSound.at(b);
|
||||
|
||||
Effect.shake(despawnShake, despawnShake, b);
|
||||
|
||||
if(fragBullet != null || splashDamageRadius > 0 || lightning > 0){
|
||||
hit(b);
|
||||
}
|
||||
|