Skip to content

Commit

Permalink
Arquebus Rework
Browse files Browse the repository at this point in the history
  • Loading branch information
Eschatologue committed Jun 2, 2023
1 parent 3189bc3 commit 3d265a1
Show file tree
Hide file tree
Showing 40 changed files with 357 additions and 307 deletions.
12 changes: 6 additions & 6 deletions assets/bundles/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -384,13 +384,13 @@ unit.uaw-stratofortress.details = An upgrade to Superfortress B(I).45, designate
# region Unit - Naval

## region Naval - Monitor Warship
unit.uaw-archer.name = Archer
unit.uaw-archer.description = Small, and sluggish. Carries heavy cruise missiles that deals more damage against buildings.
unit.uaw-archer.details = [Lore needed]
unit.uaw-medea.name = Medea
unit.uaw-medea.description = Fires high-velocity shell that shatters into a cone of fragmentation that deals extra damage against structures.
unit.uaw-medea.details = The Medea-class monitor, born out of necessity and resourcefulness.\n\nThough its construction may have been constrained, its resilience and capability remain intact.

unit.uaw-carronade.name = Carronade
unit.uaw-carronade.description = Fires a salvo of shells at enemy defences.
unit.uaw-carronade.details = [Lore needed]
unit.uaw-melpomene.name = Melpomene
unit.uaw-melpomene.description = Fires a salvo of shells at enemy defences.
unit.uaw-melpomene.details = [Lore needed]

unit.uaw-falconet.name = Falconet
unit.uaw-falconet.description = Armed with more point defence weapon along with even more devastating artillery.\n\nThe main artillery causes [white]repeating aftershocks[] in its affected area, [white]denying any building to be built[] while its still in effect.
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprites/units/full/medea-full.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprites/units/full/melpomene-full.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/sprites/units/naval/monitor/archer-cell.png
Binary file not shown.
Binary file removed assets/sprites/units/naval/monitor/archer.png
Binary file not shown.
Binary file removed assets/sprites/units/naval/monitor/carronade.png
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprites/units/naval/monitor/medea.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprites/units/naval/monitor/melpomene.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/units/weapons/Artillery/artillery-medium-red.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/UAW/Vars.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
public class Vars implements Loadable {
// Stuff
public static final float tick = 60f;
/** Used for precise pixel based placements*/
public static final float px = 0.25f;

public static final float steamConversionScl = 3;
Expand Down Expand Up @@ -62,6 +63,7 @@ public class Vars implements Loadable {
public static final String cruisemissile_medium_basic = modName + "cruisemissile-medium-basic";
public static final String cruisemissile_medium_cryo = modName + "cruisemissile-medium-cryo";
public static final String cruisemissile_medium_surge = modName + "cruisemissile-medium-surge";
public static final String cruisemissile_medium_phlog = modName + "cruisemissile-medium-phlog";

// Multicrafter mode
public static final String transform = "transform";
Expand Down
2 changes: 1 addition & 1 deletion src/UAW/audiovisual/Outliner.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static void outlineRegion(MultiPacker packer, TextureRegion[] textures, C
* @param textureRegion
* The texture you want to generate outline with
* @param outlineColor
* The color1 of the outline, default is Pal.darkerMetal
* The color of the outline, default is Pal.darkerMetal
* @param outputName
* The outline name
* @param outlineRadius
Expand Down
61 changes: 27 additions & 34 deletions src/UAW/audiovisual/UAWFx.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class UAWFx {
stroke(3f - e.fin() * 2f);
Lines.square(e.x, e.y, tilesize / 2f * e.rotation + e.fin() * 3f);

randLenVectors(e.id, 3 + (int)(e.rotation * 3), e.rotation * 2f + (tilesize * e.rotation) * e.finpow(), (x, y) -> {
randLenVectors(e.id, 3 + (int) (e.rotation * 3), e.rotation * 2f + (tilesize * e.rotation) * e.finpow(), (x, y) -> {
Fill.square(e.x + x, e.y + y, 1f + e.fout() * (3f + e.rotation));
});
}),
Expand Down Expand Up @@ -297,12 +297,12 @@ public class UAWFx {

// region inst & rail

/** Refer to {@link UAWFx#instShoot(float burstLength, float life, Color color1)} */
/** Refer to {@link UAWFx#instShoot(float burstLength, float life, Color color)} */
public static Effect instShoot(float burstLength) {
return instShoot(burstLength, Pal.bulletYellowBack);
}

/** Refer to {@link UAWFx#instShoot(float burstLength, float life, Color color1)} */
/** Refer to {@link UAWFx#instShoot(float burstLength, float life, Color color)} */
public static Effect instShoot(float burstLength, Color color) {
return instShoot(burstLength, burstLength * 0.28f, color);
}
Expand All @@ -314,7 +314,7 @@ public static Effect instShoot(float burstLength, Color color) {
* @param lifetime
* [24] Adjusts the effect life along with its size etc.
* @param color
* Flame burst color1
* Flame burst color
*/
public static Effect instShoot(float burstLength, float lifetime, Color color) {
float l2 = lifetime * 0.41f;
Expand Down Expand Up @@ -351,7 +351,7 @@ public static Effect railShoot(float burstLength, Color color) {
* @param lifetime
* * [24] Effect Lifetime
* @param color
* The effect color1
* The effect color
*/
public static Effect railShoot(float burstLength, float lifetime, Color color) {
float l2 = lifetime * 0.41f;
Expand All @@ -377,7 +377,7 @@ public static Effect railShoot(float burstLength, float lifetime, Color color) {
* @param width
* How wide is the trail, also adjusts its height, spacing have to be adjusted manually
* @param color
* The color1 of the trail
* The color of the trail
*/
public static Effect railTrail(float width, Color color) {
return new Effect(width * 1.8f, e -> {
Expand Down Expand Up @@ -482,7 +482,7 @@ public static Effect shootSmoke(float lifetime, Color color, boolean muzzleBreak
* @param lifetime
* [18] How long does the smoke lasts, also adjusts amount, spreads, and radius.
* @param color
* The color1 of the beginning of the smoke, will lerp to gray
* The color of the beginning of the smoke, will lerp to gray
* @param muzzleBreak
* [False] Whenever to cause 2 instances of the effect and make it spread horizontally
*/
Expand Down Expand Up @@ -648,9 +648,9 @@ public static Effect hitBulletSmall(float lifetime, float circleSize, int sparkA
* @param particleRadius
* How big is the particle | Default is 0.2
* @param lightColor
* The lightest color1 that will be lerped into darkColor
* The lightest color that will be lerped into darkColor
* @param darkColor
* The darkest color1 that will be lerped from lightColor
* The darkest color that will be lerped from lightColor
*/
public static Effect effectHit(float particleRadius, Color lightColor, Color darkColor) {
return new Effect(particleRadius * 175, e -> {
Expand Down Expand Up @@ -709,7 +709,7 @@ public static Effect sideTrail(float length) {
* How big is the explosion
*/
public static Effect dynamicExplosion(float size) {
return dynamicExplosion(size, Pal.missileYellow, Pal.missileYellowBack);
return dynamicExplosion(size, Pal.missileYellow.cpy(), Pal.missileYellowBack.cpy());
}

/**
Expand All @@ -736,27 +736,20 @@ public static Effect dynamicExplosion(float size, Color frontColor, Color backCo
}));
}

b.scaled((baseLifetime / 1.25f), e -> {
b.scaled(baseLifetime, e -> {
e.scaled(5 + intensity * 2.5f, i -> {
color(frontColor);
stroke((3f + intensity / 3.8f) * i.fout());
stroke((3.1f + intensity/5f) * i.fout());
Lines.circle(e.x, e.y, (3f + i.fin() * 14f) * intensity);
light(e.x, e.y, i.fin() * 14f * 2f * intensity, Color.white, 0.9f * e.fout());
});

Draw.z(Layer.bullet + 0.001f);
randLenVectors(e.id + 1, e.finpow() + 0.001f, (int) (4 * intensity), 20f * intensity, (x, y, in, out) -> {
float fout = e.fout(Interp.pow5Out) * rand.random(0.5f, 1f);
color(frontColor);
Fill.circle(e.x + x, e.y + y, fout * ((2f + intensity) * 1.3f));
Drawf.light(e.x, e.y, i.fin() * 14f * 2f * intensity, Color.white, 0.9f * e.fout());
});

color(frontColor, backColor, Color.gray, e.fin());
stroke((1.7f * e.fout()) * (1f + (intensity - 1f) / 2f));
z(Layer.effect + 0.001f);
randLenVectors(e.id + 1, e.finpow() + 0.001f, (int) (6 * intensity), 35f * intensity, (x, y, in, out) -> {
color(frontColor, backColor, Color.gray, e.fin());
Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + out * 4 * (3f + intensity));
light(e.x + x, e.y + y, (out * 4 * (3f + intensity)) * 3.5f, Draw.getColor(), 0.8f);

Draw.z(Layer.effect + 0.001f);
randLenVectors(e.id + 1, e.finpow() + 0.001f, (int)(9 * intensity), 40f * intensity, (x, y, in, out) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + out * 4 * (3f + intensity));
Drawf.light(e.x + x, e.y + y, (out * 4 * (3f + intensity)) * 3.5f, Draw.getColor(), 0.8f);
});
});
});
Expand Down Expand Up @@ -806,9 +799,9 @@ public static Effect empExplosion(float size, int point, Color frontColor) {
/**
* Based on Fx.blastExplosion
* @param frontColor
* The lighter color1 | Default : Pal.MissileYellow
* The lighter color | Default : Pal.MissileYellow
* @param backColor
* The darker color1 | Default : Pal.MissileYellowBack
* The darker color | Default : Pal.MissileYellowBack
*/
public static Effect blastExplosion(Color frontColor, Color backColor) {
return new Effect(23, e -> {
Expand All @@ -832,9 +825,9 @@ public static Effect blastExplosion(Color frontColor, Color backColor) {
/**
* Based on Fx.massiveExplosion
* @param frontColor
* The lighter color1 | Default : Pal.MissileYellow
* The lighter color | Default : Pal.MissileYellow
* @param backColor
* The darker color1 | Default : Pal.MissileYellowBack
* The darker color | Default : Pal.MissileYellowBack
*/
public static Effect massiveExplosion(Color frontColor, Color backColor) {
return new Effect(30, e -> {
Expand All @@ -856,7 +849,7 @@ public static Effect massiveExplosion(Color frontColor, Color backColor) {
});
}

/** Refer to {@link UAWFx#crossBomb(float size, float rotation, Color color1)} */
/** Refer to {@link UAWFx#crossBomb(float size, float rotation, Color color)} */
public static Effect crossBomb(float size, Color color) {
return crossBomb(size, 90, color);
}
Expand All @@ -868,7 +861,7 @@ public static Effect crossBomb(float size, Color color) {
* @param rotation
* [90]
* @param color
* color1 of the explosion
* color of the explosion
*/
public static Effect crossBomb(float size, float rotation, Color color) {
float lifetime = size * 0.58f;
Expand Down Expand Up @@ -942,7 +935,7 @@ public static Effect burstCloud(float size, float lifetime, int amount, float sp
* @param particleRad
* Particle Size | 2
* @param color
* particle color1
* particle color
*/
public static Effect crucibleSmoke(float lifetime, float particleRad, Color color) {
return new Effect(lifetime, e -> {
Expand All @@ -968,7 +961,7 @@ public static Effect crucibleSmoke(float lifetime, float particleRad, Color colo
* @param smokeSize
* How big is the smoke 'puff' also adjusts the amount of 'puff'
* @param color
* The color1 of the smoke/puff
* The color of the smoke/puff
*/
public static Effect cloudPuff(float smokeSize, Color color) {
float smokeSizeLfMult = 12f;
Expand Down
7 changes: 4 additions & 3 deletions src/UAW/audiovisual/UAWPal.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ public class UAWPal {
stoutSteelMiddle = Color.valueOf("636a78"),
stoutsteelBack = Color.valueOf("444858"),

phlogistonFront = Color.valueOf("82e9de"),
phlogistonMid = Color.valueOf("4db6ac"),
phlogistonBack = Color.valueOf("00867d"),
phlogiston = Color.valueOf("00aea2").cpy(),
phlogistonFront = Color.valueOf("82e9de").cpy(),
phlogistonMid = Color.valueOf("4db6ac").cpy(),
phlogistonBack = Color.valueOf("00867d").cpy(),

coalFront = Color.valueOf("404040"),
coalBack = Color.valueOf("2a2a2a"),
Expand Down
6 changes: 3 additions & 3 deletions src/UAW/audiovisual/effects/StatusHitEffect.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import static arc.math.Angles.randLenVectors;

public class StatusHitEffect extends Effect {
public Color color1 = Pal.bulletYellow;
public Color color = Pal.bulletYellow;
@Nullable
public Color color2;
public Color color1;
public float alpha = 1f;
public float sizeStart = 0.2f, sizeEnd = 1.5f, life = 35, spreadBase = 2f, spreadRad = 7f;
public int amount = 3;
Expand All @@ -34,7 +34,7 @@ public void init() {
@Override
public void render(EffectContainer e) {
Draw.alpha(sizeStart > sizeEnd ? alpha * e.fout() : alpha);
color(color1, color2 == null ? color1 : color2, e.fout());
color(color, color1 == null ? color : color1, e.fout());

randLenVectors(e.id, amount, spreadBase + e.fin() * spreadRad, (x, y) -> {
switch (shapeVariant) {
Expand Down
2 changes: 1 addition & 1 deletion src/UAW/content/UAWLiquids.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class UAWLiquids {

public static void load() {

phlogiston = new Liquid("liquid-phlogiston", UAWPal.phlogistonMid) {{
phlogiston = new Liquid("liquid-phlogiston", UAWPal.phlogiston.cpy()) {{
viscosity = 0.75f;
flammability = 1.4f;
explosiveness = 2.4f;
Expand Down

0 comments on commit 3d265a1

Please sign in to comment.