Skip to content

Commit

Permalink
Effects rework
Browse files Browse the repository at this point in the history
  • Loading branch information
Eschatologue committed Oct 23, 2022
1 parent 29d3a6c commit 86f1fce
Show file tree
Hide file tree
Showing 12 changed files with 231 additions and 72 deletions.
33 changes: 22 additions & 11 deletions assets/bundles/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ block.uaw-composite-heat-node.description = Durable heat node that transfers pow
## endregion Heat

## region Liquid
block.uaw-pressurized-conduit.name = Pressurized Conduit
block.uaw-pressurized-conduit.name = Stoutsteel Conduit
block.uaw-pressurized-conduit.description = Rapidly moves liquid forward, has a very high flow rate and can handle high-temperature liquid. Does not leak.\n\nCan be deployed on [blue]water[]

block.uaw-plated-pressurized-conduit.name = Plated Pressurized Conduit
block.uaw-plated-pressurized-conduit.name = Plated Stoutsteel Conduit
block.uaw-plated-pressurized-conduit.description = Rapidly moves liquid forward, has a very high flow rate and can handle high-temperature liquid.\nDoes not accept input from the sides. Does not leak.\n\nCan be deployed on [blue]water[]

block.uaw-pressurized-liquid-router.name = Pressurized Liquid Router
block.uaw-pressurized-liquid-router.name = Stoutsteel Liquid Router
block.uaw-pressurized-liquid-router.description = Accepts liquids from one direction and outputs them equally to up to 3 other directions. It can keep up with Pressurized Conduit output. Heavily Armoured.

block.uaw-pressurized-liquid-junction.name = Pressurized Liquid Junction
block.uaw-pressurized-liquid-junction.name = Stoutsteel Liquid Junction
block.uaw-pressurized-liquid-junction.description = Rapidly moves liquids forward. Used in conjunction with pumps and other conduits. Heavily Armoured.

block.uaw-pressurized-liquid-bridge.name = Pressurized Liquid Bridge
block.uaw-pressurized-liquid-bridge.name = Stoutsteel Liquid Bridge
block.uaw-pressurized-liquid-bridge.description = Transports liquids over terrain or buildings faster and farther than a standard Liquid Bridge. Heavily Armoured.
## endregion Liquid

Expand All @@ -82,10 +82,10 @@ block.uaw-petroleum-generator.name = Petroleum Generator
block.uaw-petroleum-generator.description = Generate lots of power from burning oil. Explodes when destroyed. \nRequires a bit of power to kickstart the process.

block.uaw-steam-turbine.name = Steam Turbine
block.uaw-steam-turbine.description = Uses steam to generate power. Requires time to warm up.
block.uaw-steam-turbine.description = Uses steam to generate power. The steam is then condensed back into water.

block.uaw-advanced-steam-turbine.name = Advanced Steam Turbine
block.uaw-advanced-steam-turbine.description = Uses steam to generate lots of power. Requires time to warm up.
block.uaw-advanced-steam-turbine.description = Uses steam to generate lots of power. The steam is then condensed back into water.
## endregion Power

## region Steam
Expand Down Expand Up @@ -368,19 +368,30 @@ unit.uaw-caernarvon.name = Caernarvon
unit.uaw-caernarvon.description = Fires powerful armour-piercing composite 'dart' at targets that ignores armour and pierces through force shields, also launches missiles and barrages enemy with bullets.\n\nHas a very thick composite armour, rendering most incoming shots ineffective.\n\nSuffer less movement penalty on liquid and muddy terrain.
## endregion Ground - Main Battle Tanks

## region Ground - Flamethrower Tanks
unit.uaw-cavalierF.name = Cavalier Pyrite
unit.uaw-cavalierF.description = Armed with a small flamethrower and a main gun that fires short-range incendiary shotgun blasts.

unit.uaw-centurionF.name = Centurion Phlogiston
unit.uaw-centurionF.description = [EMPTY]

unit.uaw-caernarvonF.name = Caernarvon Pentecost
unit.uaw-caernarvonF.description = [EMPTY]
## endregion Ground - Main Battle Tanks

## region Ground - SPG

unit.uaw-abbot.name = Abbot
unit.uaw-abbot.description = Fires high-explosive shells and a barrage of bullets at targets.\n\nSuffer less movement penalty on liquid and muddy terrain.
unit.uaw-abbot.description = [EMPTY]

unit.uaw-archer.name = Archer
unit.uaw-archer.description = Fires armor-piercing shells, launches missiles, and barrages of bullets at target.\n\nSuffer less movement penalty on liquid and muddy terrain.
unit.uaw-archer.description = [EMPTY]

unit.uaw-arbalester.name = Arbalester
unit.uaw-arbalester.description = Fires powerful armour-piercing composite 'dart' at targets that ignores armour and pierces through force shields, also launches missiles and barrages enemy with bullets.\n\nHas a very thick composite armour, rendering most incoming shots ineffective.\n\nSuffer less movement penalty on liquid and muddy terrain.
unit.uaw-arbalester.description = [EMPTY]

unit.uaw-arbiter.name = Arbiter
unit.uaw-arbiter.description = Fires powerful armour-piercing composite 'dart' at targets that ignores armour and pierces through force shields, also launches missiles and barrages enemy with bullets.\n\nHas a very thick composite armour, rendering most incoming shots ineffective.\n\nSuffer less movement penalty on liquid and muddy terrain.
unit.uaw-arbiter.description = [EMPTY]


## endregion Ground - SPG
Expand Down
4 changes: 3 additions & 1 deletion src/UAW/Vars.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ public class Vars implements Loadable {
// Stuff
public static final float tick = 60f;
public static final float px = 0.25f;
public static final float liquidConsumption = 60;
public static final float steamConversionScl = 3;
public static final float steamLoseScl= 0.5f;

public static final String modName = "uaw-";
public static final String modTurretBase = "armored-";

Expand Down
40 changes: 35 additions & 5 deletions src/UAW/content/UAWUnitTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import UAW.entities.abilities.RazorRotorAbility;
import UAW.entities.bullet.*;
import UAW.entities.bullet.ModdedVanillaBullet.SplashArtilleryBulletType;
import UAW.entities.effects.*;
import UAW.entities.units.*;
import UAW.entities.units.entity.*;
import UAW.type.Rotor;
Expand Down Expand Up @@ -56,6 +57,9 @@ public class UAWUnitTypes {
// Tanks - MBT
cavalier, centurion, caernarvon, challenger,

// Tanks- Flamer
cavalierF, centurionF, caernarvonF,

// Tanks - SPG
abbot, archer, arbalester, arbiter;

Expand Down Expand Up @@ -589,7 +593,12 @@ public static void load() {
backColor = UAWPal.cryoBack;
trailEffect = new MultiEffect(
Fx.disperseTrail,
UAWFx.statusEffectCircle.wrap(frontColor)
new StatusHitEffect() {{
color = frontColor;
sizeMax = 1.25f;
square = true;
circle = false;
}}
);
trailChance = 0.5f;
shootEffect = Fx.shootBigColor;
Expand All @@ -604,6 +613,13 @@ public static void load() {
sparkColor = UAWPal.cryoMiddle;
waveRad = splashDamageRadius;
smokeRad = splashDamageRadius * 1.2f;
}},
new SparkEffect() {{
size = 4;
lifetime = 60;
amount = 20;
spreadRad = splashDamageRadius * 0.8f;
sparkColor = frontColor;
}}
);
smokeEffect = Fx.shootBigSmoke;
Expand All @@ -613,7 +629,7 @@ public static void load() {
}};
cantankerous = new AirshipUnitType("cantankerous") {{
float unitRange = 35 * tilesize;
health = 5250;
health = 5000;
armor = 15f;
hitSize = 20;

Expand Down Expand Up @@ -681,13 +697,19 @@ public static void load() {
}};
bullet = new StatusEffectBulletType(UAWStatusEffects.cryoBurn, 8 * tick) {{
lifetime = unitRange / speed;
splashDamage = 90;
// Fires twice, damage is doubled
splashDamage = 80;
splashDamageRadius = 6.5f * tilesize;
frontColor = UAWPal.cryoFront;
backColor = UAWPal.cryoBack;
trailEffect = new MultiEffect(
Fx.disperseTrail,
UAWFx.statusEffectCircle.wrap(frontColor)
new StatusHitEffect() {{
color = frontColor;
sizeMax = 2;
square = true;
circle = false;
}}
);
trailChance = 0.5f;
shootEffect = Fx.shootBigColor;
Expand All @@ -702,6 +724,14 @@ public static void load() {
sparkColor = UAWPal.cryoMiddle;
waveRad = splashDamageRadius;
smokeRad = splashDamageRadius * 1.2f;
smokeSize = 6f;
}},
new SparkEffect() {{
size = 4;
lifetime = 60;
amount = 20;
spreadRad = splashDamageRadius * 0.8f;
sparkColor = frontColor;
}}
);
smokeEffect = Fx.shootBigSmoke;
Expand Down Expand Up @@ -768,7 +798,7 @@ public static void load() {

weapons.add(new SuicideWeapon() {{
float splashRad = 4 * tilesize;
bullet = new ExplosionBulletType(health * 0.6f, splashRad) {{
bullet = new ExplosionBulletType(95, splashRad) {{
status = UAWStatusEffects.cryoBurn;
statusDuration = 5 * tick;
makeFire = true;
Expand Down
13 changes: 8 additions & 5 deletions src/UAW/content/blocks/UAWBlocksDefense.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ public class UAWBlocksDefense {
public static Block placeholder,

// Tier 2
quadra, ashlock, buckshot,
quadra, ashlock, buckshot, skeeter,
// Tier 3
spitfire, longbow, tempest, strikeforce, zounderkite,
spitfire, longbow, tempest, strikeforce, zounderkite, redeemer,
// Tier 4
deadeye, skyhammer,
deadeye, skyhammer, hellseeker,
// Tier 5

// Energy
Expand Down Expand Up @@ -275,18 +275,20 @@ Items.surgeAlloy, new BasicBulletType(8, 15) {{
limitRange(2 * tilesize);

squareSprite = false;
cooldownTime = 2 * tick;
drawer = new DrawTurret(modTurretBase) {{
parts.addAll(
new RegionPart("-barrel") {{
heatProgress = PartProgress.heat.add(PartProgress.heat);
progress = PartProgress.warmup.add(PartProgress.reload.add(-2.5f));
moveY = 4 * px;
heatProgress = PartProgress.reload;
}},
new RegionPart("-side") {{
progress = PartProgress.warmup;
mirror = true;
moveX = 2f * px;
moveY = -16 * px;
moveY = -4 * px;
moveRot = -22f;
}},
new RegionPart("-blade") {{
progress = PartProgress.warmup;
Expand Down Expand Up @@ -583,6 +585,7 @@ UAWItems.stoutsteel, new HighVelocityShellBulletType(25f, 12500) {{
consumePowerCond(15f, TurretBuild::isActive);

squareSprite = false;
cooldownTime = reload * 0.8f;
drawer = new DrawTurret(modTurretBase) {{
parts.addAll(
new RegionPart("-barrel") {{
Expand Down
14 changes: 7 additions & 7 deletions src/UAW/content/blocks/UAWBlocksLogistic.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import UAW.content.UAWItems;
import UAW.world.blocks.liquid.*;
import UAW.world.blocks.power.heat.HeatConduit;
import mindustry.content.Items;
import mindustry.type.Category;
import mindustry.world.Block;
Expand All @@ -20,7 +19,7 @@ public class UAWBlocksLogistic {
copperHeatNode, compositeHeatNode,

// Liquid
pressurizedConduit, platedPressurizedConduit, pressurizedLiquidRouter, pressurizedLiquidJunction, pressurizedLiquidBridge,
pressurizedLiquidRouter, pressurizedLiquidJunction, pressurizedLiquidBridge, pressurizedConduit, platedPressurizedConduit,

// Payload
heavyDutyPayloadConveyor;
Expand Down Expand Up @@ -56,16 +55,18 @@ public static void load() {

// Liquid

pressurizedConduit = new PressurizedConduit("pressurized-conduit") {{
pressurizedConduit = new PrzConduit("pressurized-conduit") {{
requirements(Category.liquid, with(
Items.titanium, 3,
Items.metaglass, 2,
Items.plastanium, 3
));
health = 550;
baseExplosiveness = 8f;
junctionReplacement = pressurizedLiquidJunction;
rotBridgeReplacement = pressurizedLiquidBridge;
}};
platedPressurizedConduit = new PlatedPressurizedConduit("plated-pressurized-conduit") {{
platedPressurizedConduit = new PrzPlatedConduit("plated-pressurized-conduit") {{
requirements(Category.liquid, with(
Items.titanium, 3,
Items.metaglass, 2,
Expand All @@ -74,6 +75,8 @@ public static void load() {
));
health = 850;
baseExplosiveness = 8f;
junctionReplacement = pressurizedLiquidJunction;
rotBridgeReplacement = pressurizedLiquidBridge;
}};
pressurizedLiquidRouter = new LiquidRouter("pressurized-liquid-router") {{
requirements(Category.liquid, with(
Expand Down Expand Up @@ -118,11 +121,8 @@ public static void load() {
baseExplosiveness = 8f;

squareSprite = false;

((PressurizedConduit)pressurizedConduit).rotBridgeReplacement = this;
}};


}
}

34 changes: 21 additions & 13 deletions src/UAW/content/blocks/UAWBlocksPower.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import mindustry.world.draw.*;
import mindustry.world.meta.Attribute;

import static UAW.Vars.*;
import static mindustry.type.ItemStack.with;

/** Contains Power Blocks or Blocks that produces Power */
Expand All @@ -28,7 +29,6 @@ public class UAWBlocksPower {
coalBurner, vapourHeater, LPGHeater, geothermalHeater;

public static void load() {
float steamConversionScl = 3f;

// Steam to Power
steamTurbine = new ConsumeGenerator("steam-turbine") {{
Expand All @@ -41,7 +41,7 @@ public static void load() {
size = 3;
squareSprite = false;
powerProduction = 8.5f;
liquidCapacity = 120f;
liquidCapacity = 90f;

generateEffect = Fx.steam;
effectChance = 0.1f;
Expand All @@ -53,7 +53,9 @@ public static void load() {
new DrawDefault(),
new DrawBlurSpin("-rotator", 6)
);
consumeLiquid(UAWLiquids.steam, 0.625f);
float steamInput = 45 / tick;
consumeLiquid(UAWLiquids.steam, steamInput);
outputLiquid = new LiquidStack(Liquids.water, (steamInput / steamConversionScl) * 0.8f);
}};
advancedSteamTurbine = new ConsumeGenerator("advanced-steam-turbine") {{
requirements(Category.power, with(
Expand All @@ -67,7 +69,7 @@ public static void load() {
size = 4;
squareSprite = false;
powerProduction = 13.5f;
liquidCapacity = 320f;
liquidCapacity = 270f;

generateEffect = Fx.steam;
effectChance = 0.1f;
Expand All @@ -79,7 +81,9 @@ public static void load() {
new DrawDefault(),
new DrawBlurSpin("-rotator", 7)
);
consumeLiquid(UAWLiquids.steam, 1.2f);
float steamInput = 135 / tick;
consumeLiquid(UAWLiquids.steam, steamInput);
outputLiquid = new LiquidStack(Liquids.water, (steamInput / steamConversionScl) * 0.8f);
}};

// Steam Production
Expand All @@ -90,8 +94,9 @@ public static void load() {
));
size = 1;

consumeLiquid(Liquids.water, 0.25f);
outputLiquid = new LiquidStack(UAWLiquids.steam, 0.25f * steamConversionScl);
float steamOutput = 15 / tick;
consumeLiquid(Liquids.water, steamOutput);
outputLiquid = new LiquidStack(UAWLiquids.steam, steamOutput * steamConversionScl);
liquidCapacity = 180f;

squareSprite = false;
Expand All @@ -116,8 +121,9 @@ public static void load() {
));
size = 2;

consumeLiquids(new LiquidStack(Liquids.water, 0.5f));
outputLiquid = new LiquidStack(UAWLiquids.steam, 0.5f * steamConversionScl);
float steamOutput = 30 / tick;
consumeLiquid(Liquids.water, steamOutput);
outputLiquid = new LiquidStack(UAWLiquids.steam, steamOutput * steamConversionScl);
liquidCapacity = steamKettle.liquidCapacity * 2;

squareSprite = false;
Expand Down Expand Up @@ -146,8 +152,9 @@ public static void load() {
));
size = 4;

consumeLiquid(Liquids.water, 2f);
outputLiquid = new LiquidStack(UAWLiquids.steam, 2f * steamConversionScl);
float steamOutput = 120 / tick;
consumeLiquid(Liquids.water, steamOutput);
outputLiquid = new LiquidStack(UAWLiquids.steam, steamOutput * steamConversionScl);
liquidCapacity = steamKettle.liquidCapacity * 4;

squareSprite = false;
Expand Down Expand Up @@ -183,8 +190,9 @@ public static void load() {
}}
);
attribute = Attribute.heat;
consumeLiquid(Liquids.water, 0.5f);
outputLiquid = new LiquidStack(UAWLiquids.steam, 0.5f * steamConversionScl);
float steamOutput = 90 / tick;
consumeLiquid(Liquids.water, steamOutput);
outputLiquid = new LiquidStack(UAWLiquids.steam, steamOutput * steamConversionScl);
}};

// Heat Generation
Expand Down
Loading

0 comments on commit 86f1fce

Please sign in to comment.