mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-24 05:21:15 -08:00
Made T2+ tanks instantly kill nodes
This commit is contained in:
parent
3c95419987
commit
03260f60cd
5 changed files with 20 additions and 1 deletions
|
|
@ -2489,6 +2489,7 @@ public class Blocks{
|
|||
maxNodes = 10;
|
||||
laserRange = 6;
|
||||
underBullets = true;
|
||||
crushFragile = true;
|
||||
}};
|
||||
|
||||
powerNodeLarge = new PowerNode("power-node-large"){{
|
||||
|
|
@ -2658,7 +2659,7 @@ public class Blocks{
|
|||
range = 10;
|
||||
fogRadius = 1;
|
||||
researchCost = with(Items.beryllium, 5);
|
||||
buildCostMultiplier = 2.5f;
|
||||
crushFragile = true;
|
||||
|
||||
consumePowerBuffered(1000f);
|
||||
}};
|
||||
|
|
|
|||
|
|
@ -2723,6 +2723,7 @@ public class UnitTypes{
|
|||
itemCapacity = 0;
|
||||
floorMultiplier = 0.8f;
|
||||
treadRects = new Rect[]{new Rect(17 - 96f/2f, 10 - 96f/2f, 19, 76)};
|
||||
crushFragile = true;
|
||||
researchCostMultiplier = 0f;
|
||||
|
||||
tankMoveVolume *= 0.55f;
|
||||
|
|
@ -2807,6 +2808,7 @@ public class UnitTypes{
|
|||
drownTimeMultiplier = 1.2f;
|
||||
immunities.addAll(StatusEffects.burning, StatusEffects.melting);
|
||||
treadRects = new Rect[]{new Rect(16 - 60f, 48 - 70f, 30, 75), new Rect(44 - 60f, 17 - 70f, 17, 60)};
|
||||
crushFragile = true;
|
||||
researchCostMultiplier = 0f;
|
||||
|
||||
weapons.add(new Weapon("precept-weapon"){{
|
||||
|
|
@ -2879,6 +2881,7 @@ public class UnitTypes{
|
|||
floorMultiplier = 0.5f;
|
||||
drownTimeMultiplier = 1.25f;
|
||||
immunities.addAll(StatusEffects.burning, StatusEffects.melting);
|
||||
crushFragile = true;
|
||||
treadRects = new Rect[]{new Rect(22 - 154f/2f, 16 - 154f/2f, 28, 130)};
|
||||
|
||||
tankMoveVolume *= 1.25f;
|
||||
|
|
@ -2984,6 +2987,7 @@ public class UnitTypes{
|
|||
|
||||
tankMoveVolume *= 1.5f;
|
||||
tankMoveSound = Sounds.tankMoveHeavy;
|
||||
crushFragile = true;
|
||||
|
||||
float xo = 231f/2f, yo = 231f/2f;
|
||||
treadRects = new Rect[]{new Rect(27 - xo, 152 - yo, 56, 73), new Rect(24 - xo, 51 - 9 - yo, 29, 17), new Rect(59 - xo, 18 - 9 - yo, 39, 19)};
|
||||
|
|
|
|||
|
|
@ -57,6 +57,16 @@ abstract class TankComp implements Posc, Hitboxc, Unitc, ElevationMovec{
|
|||
lastDeepFloor = null;
|
||||
boolean anyNonDeep = false;
|
||||
|
||||
if(type.crushFragile){
|
||||
for(int i = 0; i < 8; i++){
|
||||
Point2 offset = Geometry.d8[i];
|
||||
var other = Vars.world.buildWorld(x + offset.x * tilesize, y + offset.y * tilesize);
|
||||
if(other != null && other.team != team && other.block.crushFragile){
|
||||
other.damage(team, 999999999f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//calculate overlapping tiles so it slows down when going "over" walls
|
||||
int r = Math.max((int)(hitSize * 0.75f / tilesize), 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -465,6 +465,8 @@ public class UnitType extends UnlockableContent implements Senseable{
|
|||
public int treadFrames = 18;
|
||||
/** how much of a top part of a tread sprite is "cut off" relative to the pattern; this is corrected for */
|
||||
public int treadPullOffset = 0;
|
||||
/** if true, 'fragile' blocks will instantly be crushed in a 1x1 area around the tank */
|
||||
public boolean crushFragile = false;
|
||||
|
||||
//SEGMENTED / CRAWL UNITS (this is WIP content!)
|
||||
|
||||
|
|
|
|||
|
|
@ -224,6 +224,8 @@ public class Block extends UnlockableContent implements Senseable{
|
|||
public float placeOverlapRange = 50f;
|
||||
/** Multiplier of damage dealt to this block by tanks. Does not apply to crawlers. */
|
||||
public float crushDamageMultiplier = 1f;
|
||||
/** If true, this block is instantly destroyed by tanks with crushFragile set to true. */
|
||||
public boolean crushFragile = false;
|
||||
/** Max of timers used. */
|
||||
public int timers = 0;
|
||||
/** Cache layer. Only used for 'cached' rendering. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue