Save fixes / Implemented overdrive projector
This commit is contained in:
@@ -121,10 +121,10 @@ public class StatusEffects implements ContentList{
|
||||
}
|
||||
};
|
||||
|
||||
overdrive = new StatusEffect(6f){
|
||||
overdrive = new StatusEffect(60f*15){
|
||||
{
|
||||
armorMultiplier = 0.95f;
|
||||
speedMultiplier = 1.05f;
|
||||
speedMultiplier = 1.15f;
|
||||
damageMultiplier = 1.4f;
|
||||
}
|
||||
|
||||
@@ -132,6 +132,10 @@ public class StatusEffects implements ContentList{
|
||||
public void update(Unit unit, float time){
|
||||
//idle regen boosted
|
||||
unit.health += 0.01f * Timers.delta();
|
||||
|
||||
if(Mathf.chance(Timers.delta() * 0.25f)){
|
||||
Effects.effect(EnvironmentFx.overdriven, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f), 0f, unit);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import io.anuke.mindustry.world.blocks.defense.*;
|
||||
|
||||
public class DefenseBlocks extends BlockList implements ContentList{
|
||||
public static Block copperWall, copperWallLarge, compositeWall, compositeWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge,
|
||||
phaseWall, phaseWallLarge, surgeWall, surgeWallLarge, mendProjector, overdriveProjector, shockMine;
|
||||
phaseWall, phaseWallLarge, surgeWall, surgeWallLarge, mendProjector, overdriveProjector, forceProjector, shockMine;
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
@@ -82,6 +82,12 @@ public class DefenseBlocks extends BlockList implements ContentList{
|
||||
consumes.item(Items.phasematter).optional(true);
|
||||
}};
|
||||
|
||||
forceProjector = new ForceProjector("force-projector"){{
|
||||
consumes.power(0.25f);
|
||||
size = 3;
|
||||
consumes.item(Items.phasematter).optional(true);
|
||||
}};
|
||||
|
||||
shockMine = new ShockMine("shock-mine"){{
|
||||
health = 40;
|
||||
damage = 11;
|
||||
|
||||
@@ -19,7 +19,7 @@ public class BlockFx extends FxList implements ContentList{
|
||||
public static Effect reactorsmoke, nuclearsmoke, nuclearcloud, redgeneratespark, generatespark, fuelburn, plasticburn,
|
||||
pulverize, pulverizeRed, pulverizeRedder, pulverizeSmall, pulverizeMedium, producesmoke, smeltsmoke, formsmoke, blastsmoke,
|
||||
lava, dooropen, doorclose, dooropenlarge, doorcloselarge, purify, purifyoil, purifystone, generate, mine, mineBig, mineHuge,
|
||||
smelt, teleportActivate, teleport, teleportOut, ripple, bubble, commandSend, healBlock, healBlockFull;
|
||||
smelt, teleportActivate, teleport, teleportOut, ripple, bubble, commandSend, healBlock, healBlockFull, healWaveMend, overdriveWave;
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
@@ -285,6 +285,20 @@ public class BlockFx extends FxList implements ContentList{
|
||||
Draw.color();
|
||||
});
|
||||
|
||||
healWaveMend = new Effect(40, e -> {
|
||||
Draw.color(e.color);
|
||||
Lines.stroke(e.fout() * 2f);
|
||||
Lines.poly(e.x, e.y, 30, e.finpow() * e.rotation);
|
||||
Draw.color();
|
||||
});
|
||||
|
||||
overdriveWave = new Effect(50, e -> {
|
||||
Draw.color(e.color);
|
||||
Lines.stroke(e.fout() * 1f);
|
||||
Lines.poly(e.x, e.y, 30, e.finpow() * e.rotation);
|
||||
Draw.color();
|
||||
});
|
||||
|
||||
healBlock = new Effect(20, e -> {
|
||||
Draw.color(Palette.heal);
|
||||
Lines.stroke(2f * e.fout() + 0.5f);
|
||||
|
||||
@@ -11,7 +11,7 @@ import io.anuke.ucore.util.Angles;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
public class EnvironmentFx extends FxList implements ContentList{
|
||||
public static Effect burning, fire, smoke, steam, fireballsmoke, ballfire, freezing, melting, wet, oily;
|
||||
public static Effect burning, fire, smoke, steam, fireballsmoke, ballfire, freezing, melting, wet, oily, overdriven;
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
@@ -115,5 +115,15 @@ public class EnvironmentFx extends FxList implements ContentList{
|
||||
|
||||
Draw.color();
|
||||
});
|
||||
|
||||
overdriven = new Effect(20f, e -> {
|
||||
Draw.color(Palette.accent);
|
||||
|
||||
Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> {
|
||||
Fill.square(e.x + x, e.y + y, e.fout() * 2.3f+0.5f);
|
||||
});
|
||||
|
||||
Draw.color();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import io.anuke.ucore.util.Angles;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
public class UnitFx extends FxList implements ContentList{
|
||||
public static Effect vtolHover, unitDrop, unitPickup, unitLand, pickup, healWave, healWaveMend, heal;
|
||||
public static Effect vtolHover, unitDrop, unitPickup, unitLand, pickup, healWave, heal;
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
@@ -61,13 +61,6 @@ public class UnitFx extends FxList implements ContentList{
|
||||
Draw.color();
|
||||
});
|
||||
|
||||
healWaveMend = new Effect(40, e -> {
|
||||
Draw.color(e.color);
|
||||
Lines.stroke(e.fout() * 2f);
|
||||
Lines.poly(e.x, e.y, 30, e.finpow() * e.rotation);
|
||||
Draw.color();
|
||||
});
|
||||
|
||||
heal = new Effect(11, e -> {
|
||||
Draw.color(Palette.heal);
|
||||
Lines.stroke(e.fout() * 2f);
|
||||
|
||||
Reference in New Issue
Block a user