From 411b6d74601d75b5da528cda7336fc062625118b Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 11 Jul 2022 14:37:57 -0400 Subject: [PATCH] Shockwave tower block --- .../blocks/defense/shockwave-tower-heat.png | Bin 0 -> 5535 bytes .../blocks/defense/shockwave-tower.png | Bin 0 -> 3124 bytes core/assets/bundles/bundle.properties | 1 + core/assets/icons/icons.properties | 1 + core/assets/logicids.dat | Bin 4580 -> 4597 bytes core/src/mindustry/content/Blocks.java | 9 +- .../src/mindustry/content/ErekirTechTree.java | 2 + core/src/mindustry/content/Fx.java | 8 ++ core/src/mindustry/logic/LStatements.java | 3 +- .../world/blocks/defense/ShockwaveTower.java | 118 ++++++++++++++++++ gradle.properties | 2 +- tools/src/mindustry/tools/Generators.java | 2 +- 12 files changed, 141 insertions(+), 5 deletions(-) create mode 100644 core/assets-raw/sprites/blocks/defense/shockwave-tower-heat.png create mode 100644 core/assets-raw/sprites/blocks/defense/shockwave-tower.png create mode 100644 core/src/mindustry/world/blocks/defense/ShockwaveTower.java diff --git a/core/assets-raw/sprites/blocks/defense/shockwave-tower-heat.png b/core/assets-raw/sprites/blocks/defense/shockwave-tower-heat.png new file mode 100644 index 0000000000000000000000000000000000000000..f949af1f2d3045ccbaea1f444bfd90348781af45 GIT binary patch literal 5535 zcmV;Q6=3R#P)Px~SxH1eRCt{2ooiPV$+Cu@<|YUT;%yZ7=tOZ zd`vMFc>;bT&osRB)COTZmq1K0v~ zfNkI&L3kPgp48*dfMehQ_zWBZC%^?Agy)o(@^K&7Bq+3wk8|J%_>$q{a+XS5npH)K z@-~47z)!$a;0Zx^cL~#&pT0D0eFshn0^1`fdx1DAu5lZT1{zpBcdg!^fL-Hb2Uu_5 z<13*P?E&xY-Qi#;iehF;oQVPx<=q1w5(M@F_?e)@9qJYMjiA7N!l)S#gn41lWl9ed9!+L~VUz9!CM z1TGMIvwHh3L3#hN&t3a|!`}14fFO`7!U$X>2ydOZ*^t7u?Qas8-qY@L#mZVIC}hh% z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7@QU9l!#=(;gY+o9DsW7+Th6*K zTWGp#oEEe`-Fa$VQ=KU<9zFI40kiYJ1O@8uz!ZJg3-vt$VLY^3Ito1y_n0_srZD(6 zz1{oVJY4_O%9cw@3QgOhOF#|@Gs^G4{{a6-7=6NS&Lpo*?+P3f?Y5A-r%rH6ydhMV za7_xW*QH(?R___*X*A`-1A_k~C{TAi>DsxOB_*202<(b>t5TqUcaJhwa#Cphvek1! zP^JmBbBwIGiqy!eE37V!qLRT)S-@T=|)grHMzs848Yzb*9o;X zB|fzAkvVV#=5bRgF>e&Mm&x9jBDIFECQobB)|B{2>mFKtZaN|DJm4;K`7^Vx4PWR# h)p3rGxlmY2{|{M1NgOU~e=Pt2002ovPDHLkV1k`B-Y@_F literal 0 HcmV?d00001 diff --git a/core/assets-raw/sprites/blocks/defense/shockwave-tower.png b/core/assets-raw/sprites/blocks/defense/shockwave-tower.png new file mode 100644 index 0000000000000000000000000000000000000000..dff1d431182881a8dcfdea53ec296dba12be38cb GIT binary patch literal 3124 zcmXY!e>~IMAICql88f@gWEy3}lxU+(DY4D`swva07P6VThAaI>7Vg@ZA6G7m8ELCX zg(xaF7HfVLk)-a@uTicP7L_RXyYBt|ao*?gIFI-HJkIMp-tXu8oUGuj{s<$C5dZ*) zzyMl^Zf5@&hESc=ND|ir0DK{kM)^4j^r38H)gE8-jKt;$q6Tcn;gK@zV_TWr6<)!= zsvMo%?Krk=n^gk_IJQgZs?gXg93m%5E(Eo8h)njAO&NufFabM+w&JDx#D?g}(72%< zujnzzOj}uJ&-+br-~UNH+tNqf)m@s15Pw`?oi#BPq zi?#O%DIb}c9mwt`_aP^6KviEge_8R=)xVz~P56Ezc}JSr)gXG#r-}0ue_G)~BS>lR zdAA@$V|@mq-^|Gsp%qG1%}k_uJ}!Z+G`&R>IC8TpTwG z=77@0$4CiRT{%i+QOz@@BR*gH$^pm3C28Oi!tWs*Zm!Sgu*cAJiL5^U*;_9xpX!Ni zYwod1=JC)CWg%UKyfCgCd!}gO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UOUgC_mc|TP1a{a?a&Av`Y zMc8oa>#WI~^J80yQ!Mp5?Fmfok`*K0K7HZbjJ&&H-TRA)o{Eg0;LWWA17B|6`1SdX z!af(mfml7IUm!vvoKrGg-SVRUYamwR$}9_j4ffwTCK*p5N1zv->co0;qp54I#J@c zLTZ{+|DbTr)E#J6Ih+3XDh`QNp&OWELEma8{!9b { //TODO more tiers of build tower or "support" structures like overdrive projectors node(buildTower, Seq.with(new OnSector(four)), () -> { + node(shockwaveTower, () -> { + }); }); }); }); diff --git a/core/src/mindustry/content/Fx.java b/core/src/mindustry/content/Fx.java index c1b50d78af..3a5ee1ed08 100644 --- a/core/src/mindustry/content/Fx.java +++ b/core/src/mindustry/content/Fx.java @@ -198,6 +198,14 @@ public class Fx{ rect(block.fullIcon, e.x, e.y); }).layer(Layer.turret - 5f), + pointShockwave = new Effect(20, e -> { + color(e.color); + stroke(e.fout() * 2f); + Lines.circle(e.x, e.y, e.finpow() * e.rotation); + randLenVectors(e.id + 1, 8, 1f + 23f * e.finpow(), (x, y) -> + lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f)); + }), + moveCommand = new Effect(20, e -> { color(Pal.command); stroke(e.fout() * 5f); diff --git a/core/src/mindustry/logic/LStatements.java b/core/src/mindustry/logic/LStatements.java index a6df7dcac6..cb10027821 100644 --- a/core/src/mindustry/logic/LStatements.java +++ b/core/src/mindustry/logic/LStatements.java @@ -11,7 +11,6 @@ import mindustry.*; import mindustry.annotations.Annotations.*; import mindustry.ctype.*; import mindustry.gen.*; -import mindustry.graphics.*; import mindustry.logic.LCanvas.*; import mindustry.logic.LExecutor.*; import mindustry.type.*; @@ -1264,7 +1263,7 @@ public class LStatements{ fields(table, unit, str -> unit = str); - if(!clear){ + if(!clear && !(content.statusEffect(effect) != null && content.statusEffect(effect).permanent)){ table.add(" for "); diff --git a/core/src/mindustry/world/blocks/defense/ShockwaveTower.java b/core/src/mindustry/world/blocks/defense/ShockwaveTower.java new file mode 100644 index 0000000000..ec93ed7de6 --- /dev/null +++ b/core/src/mindustry/world/blocks/defense/ShockwaveTower.java @@ -0,0 +1,118 @@ +package mindustry.world.blocks.defense; + +import arc.math.*; +import arc.util.*; +import arc.struct.*; +import arc.graphics.*; +import arc.graphics.g2d.*; +import arc.audio.*; +import mindustry.content.*; +import mindustry.gen.*; +import mindustry.graphics.*; +import mindustry.world.meta.*; +import mindustry.world.*; +import mindustry.entities.*; +import mindustry.annotations.Annotations.Load; + +import static mindustry.Vars.*; + +public class ShockwaveTower extends Block{ + public int timerCheck = timers ++; + + public float range = 90f; + public float reload = 60f * 2f; + public float bulletDamage = 150; + public float falloffCount = 20f; + public float shake = 2f; + //checking for bullets every frame is costly, so only do it at intervals even when ready. + public float checkInterval = 8f; + public Sound shootSound = Sounds.bang; + public Color waveColor = Pal.accent, heatColor = Pal.turretHeat, shapeColor = Color.valueOf("f29c83"); + public float cooldownMultiplier = 1f; + public Effect waveEffect = Fx.pointShockwave; + + public float shapeRotateSpeed = 1f, shapeRadius = 6f; + public int shapeSides = 4; + + public @Load("@-heat") TextureRegion heatRegion; + + public ShockwaveTower(String name){ + super(name); + update = true; + solid = true; + } + + @Override + public void setStats(){ + super.setStats(); + + stats.add(Stat.damage, bulletDamage, StatUnit.none); + stats.add(Stat.range, range / tilesize, StatUnit.blocks); + stats.add(Stat.reload, 60f / reload, StatUnit.perSecond); + } + + @Override + public void drawPlace(int x, int y, int rotation, boolean valid){ + super.drawPlace(x, y, rotation, valid); + + Drawf.dashCircle(x * tilesize + offset, y * tilesize + offset, range, waveColor); + } + + public class ShockwaveTowerBuild extends Building{ + public float reloadCounter = Mathf.random(reload); + public float heat = 0f; + public Seq targets = new Seq<>(); + + @Override + public void updateTile(){ + if(potentialEfficiency > 0 && (reloadCounter += Time.delta) >= reload && timer(timerCheck, checkInterval)){ + targets.clear(); + Groups.bullet.intersect(x - range, y - range, range * 2, range * 2, b -> { + if(b.team != team && b.type.hittable){ + targets.add(b); + } + }); + + if(targets.size > 0){ + heat = 1f; + reloadCounter = 0f; + waveEffect.at(x, y, range, waveColor); + shootSound.at(this); + Effect.shake(shake, shake, this); + float waveDamage = Math.min(bulletDamage, bulletDamage * falloffCount / targets.size); + + for(var target : targets){ + if(target.damage > waveDamage){ + target.damage -= waveDamage; + }else{ + target.remove(); + } + } + } + } + + heat = Mathf.clamp(heat - Time.delta / reload * cooldownMultiplier); + } + + @Override + public float warmup(){ + return heat; + } + + @Override + public boolean shouldConsume(){ + return targets.size != 0; + } + + @Override + public void draw(){ + super.draw(); + Drawf.additive(heatRegion, heatColor, heat, x, y, 0f, Layer.blockAdditive); + + Draw.z(Layer.effect); + Draw.color(shapeColor, waveColor, Mathf.pow(heat, 2f)); + Fill.poly(x, y, shapeSides, shapeRadius * potentialEfficiency, Time.time * shapeRotateSpeed); + Draw.color(); + } + } +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 1ecdb11d3e..77ed3793fc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,4 +25,4 @@ org.gradle.caching=true #used for slow jitpack builds; TODO see if this actually works org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 -archash=29a4391826 +archash=b1b88883e2 diff --git a/tools/src/mindustry/tools/Generators.java b/tools/src/mindustry/tools/Generators.java index b5702a9945..c15bf06a22 100644 --- a/tools/src/mindustry/tools/Generators.java +++ b/tools/src/mindustry/tools/Generators.java @@ -382,7 +382,7 @@ public class Generators{ save(image, "../editor/" + block.name + "-icon-editor"); if(block.buildVisibility != BuildVisibility.hidden){ - saveScaled(image, block.name + "-icon-logic", logicIconSize); + saveScaled(image, block.name + "-icon-logic", Math.min(32 * 3, image.width)); } saveScaled(image, "../ui/block-" + block.name + "-ui", Math.min(image.width, maxUiIcon));