Made T2+ tanks instantly kill nodes
This commit is contained in:
@@ -2489,6 +2489,7 @@ public class Blocks{
|
|||||||
maxNodes = 10;
|
maxNodes = 10;
|
||||||
laserRange = 6;
|
laserRange = 6;
|
||||||
underBullets = true;
|
underBullets = true;
|
||||||
|
crushFragile = true;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
powerNodeLarge = new PowerNode("power-node-large"){{
|
powerNodeLarge = new PowerNode("power-node-large"){{
|
||||||
@@ -2658,7 +2659,7 @@ public class Blocks{
|
|||||||
range = 10;
|
range = 10;
|
||||||
fogRadius = 1;
|
fogRadius = 1;
|
||||||
researchCost = with(Items.beryllium, 5);
|
researchCost = with(Items.beryllium, 5);
|
||||||
buildCostMultiplier = 2.5f;
|
crushFragile = true;
|
||||||
|
|
||||||
consumePowerBuffered(1000f);
|
consumePowerBuffered(1000f);
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -2723,6 +2723,7 @@ public class UnitTypes{
|
|||||||
itemCapacity = 0;
|
itemCapacity = 0;
|
||||||
floorMultiplier = 0.8f;
|
floorMultiplier = 0.8f;
|
||||||
treadRects = new Rect[]{new Rect(17 - 96f/2f, 10 - 96f/2f, 19, 76)};
|
treadRects = new Rect[]{new Rect(17 - 96f/2f, 10 - 96f/2f, 19, 76)};
|
||||||
|
crushFragile = true;
|
||||||
researchCostMultiplier = 0f;
|
researchCostMultiplier = 0f;
|
||||||
|
|
||||||
tankMoveVolume *= 0.55f;
|
tankMoveVolume *= 0.55f;
|
||||||
@@ -2807,6 +2808,7 @@ public class UnitTypes{
|
|||||||
drownTimeMultiplier = 1.2f;
|
drownTimeMultiplier = 1.2f;
|
||||||
immunities.addAll(StatusEffects.burning, StatusEffects.melting);
|
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)};
|
treadRects = new Rect[]{new Rect(16 - 60f, 48 - 70f, 30, 75), new Rect(44 - 60f, 17 - 70f, 17, 60)};
|
||||||
|
crushFragile = true;
|
||||||
researchCostMultiplier = 0f;
|
researchCostMultiplier = 0f;
|
||||||
|
|
||||||
weapons.add(new Weapon("precept-weapon"){{
|
weapons.add(new Weapon("precept-weapon"){{
|
||||||
@@ -2879,6 +2881,7 @@ public class UnitTypes{
|
|||||||
floorMultiplier = 0.5f;
|
floorMultiplier = 0.5f;
|
||||||
drownTimeMultiplier = 1.25f;
|
drownTimeMultiplier = 1.25f;
|
||||||
immunities.addAll(StatusEffects.burning, StatusEffects.melting);
|
immunities.addAll(StatusEffects.burning, StatusEffects.melting);
|
||||||
|
crushFragile = true;
|
||||||
treadRects = new Rect[]{new Rect(22 - 154f/2f, 16 - 154f/2f, 28, 130)};
|
treadRects = new Rect[]{new Rect(22 - 154f/2f, 16 - 154f/2f, 28, 130)};
|
||||||
|
|
||||||
tankMoveVolume *= 1.25f;
|
tankMoveVolume *= 1.25f;
|
||||||
@@ -2984,6 +2987,7 @@ public class UnitTypes{
|
|||||||
|
|
||||||
tankMoveVolume *= 1.5f;
|
tankMoveVolume *= 1.5f;
|
||||||
tankMoveSound = Sounds.tankMoveHeavy;
|
tankMoveSound = Sounds.tankMoveHeavy;
|
||||||
|
crushFragile = true;
|
||||||
|
|
||||||
float xo = 231f/2f, yo = 231f/2f;
|
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)};
|
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;
|
lastDeepFloor = null;
|
||||||
boolean anyNonDeep = false;
|
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
|
//calculate overlapping tiles so it slows down when going "over" walls
|
||||||
int r = Math.max((int)(hitSize * 0.75f / tilesize), 0);
|
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;
|
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 */
|
/** 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;
|
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!)
|
//SEGMENTED / CRAWL UNITS (this is WIP content!)
|
||||||
|
|
||||||
|
|||||||
@@ -224,6 +224,8 @@ public class Block extends UnlockableContent implements Senseable{
|
|||||||
public float placeOverlapRange = 50f;
|
public float placeOverlapRange = 50f;
|
||||||
/** Multiplier of damage dealt to this block by tanks. Does not apply to crawlers. */
|
/** Multiplier of damage dealt to this block by tanks. Does not apply to crawlers. */
|
||||||
public float crushDamageMultiplier = 1f;
|
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. */
|
/** Max of timers used. */
|
||||||
public int timers = 0;
|
public int timers = 0;
|
||||||
/** Cache layer. Only used for 'cached' rendering. */
|
/** Cache layer. Only used for 'cached' rendering. */
|
||||||
|
|||||||
Reference in New Issue
Block a user