Tecta buff / Closes Anuken/Mindustry-Suggestions/issues/4427
This commit is contained in:
@@ -3258,7 +3258,7 @@ public class UnitTypes{
|
||||
drag = 0.1f;
|
||||
speed = 0.6f;
|
||||
hitSize = 23f;
|
||||
health = 6700;
|
||||
health = 7300;
|
||||
armor = 5f;
|
||||
|
||||
lockLegBase = true;
|
||||
@@ -3271,13 +3271,14 @@ public class UnitTypes{
|
||||
|
||||
abilities.add(new ShieldArcAbility(){{
|
||||
region = "tecta-shield";
|
||||
radius = 34f;
|
||||
radius = 36f;
|
||||
angle = 82f;
|
||||
regen = 0.6f;
|
||||
cooldown = 60f * 8f;
|
||||
max = 1500f;
|
||||
max = 2000f;
|
||||
y = -20f;
|
||||
width = 6f;
|
||||
whenShooting = false;
|
||||
}});
|
||||
|
||||
rotateSpeed = 2.1f;
|
||||
@@ -3319,14 +3320,14 @@ public class UnitTypes{
|
||||
velocityRnd = 0.33f;
|
||||
heatColor = Color.red;
|
||||
|
||||
bullet = new MissileBulletType(4.2f, 47){{
|
||||
bullet = new MissileBulletType(4.2f, 60){{
|
||||
homingPower = 0.2f;
|
||||
weaveMag = 4;
|
||||
weaveScale = 4;
|
||||
lifetime = 55f;
|
||||
shootEffect = Fx.shootBig2;
|
||||
smokeEffect = Fx.shootSmokeTitan;
|
||||
splashDamage = 60f;
|
||||
splashDamage = 70f;
|
||||
splashDamageRadius = 30f;
|
||||
frontColor = Color.white;
|
||||
hitSound = Sounds.none;
|
||||
|
||||
@@ -492,10 +492,14 @@ public class Schematics implements Loadable{
|
||||
}
|
||||
|
||||
public static void place(Schematic schem, int x, int y, Team team){
|
||||
place(schem, x, y, team, true);
|
||||
}
|
||||
|
||||
public static void place(Schematic schem, int x, int y, Team team, boolean overwrite){
|
||||
int ox = x - schem.width/2, oy = y - schem.height/2;
|
||||
schem.tiles.each(st -> {
|
||||
Tile tile = world.tile(st.x + ox, st.y + oy);
|
||||
if(tile == null) return;
|
||||
if(tile == null || (!overwrite && !Build.validPlace(st.block, team, tile.x, tile.y, st.rotation))) return;
|
||||
|
||||
tile.setBlock(st.block, team, st.rotation);
|
||||
|
||||
|
||||
@@ -24,7 +24,8 @@ import static mindustry.Vars.*;
|
||||
public class BaseGenerator{
|
||||
private static final Vec2 axis = new Vec2(), rotator = new Vec2();
|
||||
|
||||
private static final int range = 160;
|
||||
private static final int range = 180;
|
||||
private static final boolean insanity = false;
|
||||
|
||||
private Tiles tiles;
|
||||
private Seq<Tile> cores;
|
||||
@@ -51,9 +52,9 @@ public class BaseGenerator{
|
||||
float baseChance = Mathf.lerp(0.7f, 2.1f, difficulty);
|
||||
int wallAngle = 70; //180 for full coverage
|
||||
double resourceChance = 0.5 * baseChance;
|
||||
double nonResourceChance = 0.0005 * baseChance;
|
||||
double nonResourceChance = 0.002 * baseChance;
|
||||
BasePart coreschem = bases.cores.getFrac(difficulty);
|
||||
int passes = difficulty < 0.4 ? 1 : difficulty < 0.8 ? 2 : 3;
|
||||
int passes = difficulty < 0.4 ? 1 : difficulty < 0.8 ? 3 : 5;
|
||||
|
||||
Block wall = getDifficultyWall(1, difficulty), wallLarge = getDifficultyWall(2, difficulty);
|
||||
|
||||
@@ -80,7 +81,7 @@ public class BaseGenerator{
|
||||
tryPlace(parts.getFrac(difficulty + Mathf.range(bracketRange)), tile.x, tile.y, team);
|
||||
}
|
||||
}else if(Mathf.chance(nonResourceChance)){
|
||||
tryPlace(bases.parts.getFrac(difficulty + Mathf.range(bracketRange)), tile.x, tile.y, team);
|
||||
tryPlace(bases.parts.getFrac(Mathf.random(1f)), tile.x, tile.y, team);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -148,10 +149,13 @@ public class BaseGenerator{
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
float coreDst = 10f * 8;
|
||||
|
||||
//clear path for ground units
|
||||
for(Tile tile : cores){
|
||||
Astar.pathfind(tile, spawn, t -> t.team() == state.rules.waveTeam && !t.within(tile, 25f * 8) ? 100000 : t.floor().hasSurface() ? 1 : 10, t -> !t.block().isStatic()).each(t -> {
|
||||
if(!t.within(tile, 25f * 8)){
|
||||
Astar.pathfind(tile, spawn, t -> t.team() == state.rules.waveTeam && !t.within(tile, coreDst) ? 100000 : t.floor().hasSurface() ? 1 : 10, t -> !t.block().isStatic()).each(t -> {
|
||||
if(!t.within(tile, coreDst)){
|
||||
if(t.team() == state.rules.waveTeam){
|
||||
t.setBlock(Blocks.air);
|
||||
}
|
||||
@@ -208,7 +212,7 @@ public class BaseGenerator{
|
||||
|
||||
for(Stile tile : result.tiles){
|
||||
int realX = tile.x + cx, realY = tile.y + cy;
|
||||
if(isTaken(tile.block, realX, realY)){
|
||||
if(!insanity && isTaken(tile.block, realX, realY)){
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -219,12 +223,16 @@ public class BaseGenerator{
|
||||
|
||||
if(part.required instanceof Item item){
|
||||
for(Stile tile : result.tiles){
|
||||
if(tile.block instanceof Drill){
|
||||
//uncomment for extra checks if changed above
|
||||
if(tile.block instanceof Drill && (!insanity || !isTaken(tile.block, tile.x + cx, tile.y + cy))){
|
||||
|
||||
tile.block.iterateTaken(tile.x + cx, tile.y + cy, (ex, ey) -> {
|
||||
Tile placed = world.tiles.get(ex, ey);
|
||||
|
||||
if(world.tiles.getn(ex, ey).floor().hasSurface()){
|
||||
set(world.tiles.getn(ex, ey), item);
|
||||
if(placed == null) return;
|
||||
|
||||
if(placed.floor().hasSurface()){
|
||||
set(placed, item);
|
||||
}
|
||||
|
||||
Tile rand = world.tiles.getc(ex + Mathf.range(1), ey + Mathf.range(1));
|
||||
@@ -237,16 +245,16 @@ public class BaseGenerator{
|
||||
}
|
||||
}
|
||||
|
||||
Schematics.place(result, cx + result.width/2, cy + result.height/2, team);
|
||||
Schematics.place(result, cx + result.width/2, cy + result.height/2, team, false);
|
||||
|
||||
//fill drills with items after placing
|
||||
if(part.required instanceof Item item){
|
||||
for(Stile tile : result.tiles){
|
||||
if(tile.block instanceof Drill){
|
||||
|
||||
Building build = world.tile(tile.x + cx, tile.y + cy).build;
|
||||
var build = world.build(tile.x + cx, tile.y + cy);
|
||||
|
||||
if(build != null){
|
||||
if(build != null && build.block == tile.block){
|
||||
build.items.add(item, build.block.itemCapacity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,6 +73,10 @@ public class LogicBlock extends Block{
|
||||
link.name = "";
|
||||
link.name = entity.findLinkName(lbuild.block);
|
||||
}
|
||||
//disable when unlinking
|
||||
if(!link.active && lbuild.block.autoResetEnabled && lbuild.lastDisabler == entity){
|
||||
lbuild.enabled = true;
|
||||
}
|
||||
}else{
|
||||
entity.links.remove(l -> world.build(l.x, l.y) == lbuild);
|
||||
entity.links.add(new LogicLink(x, y, entity.findLinkName(lbuild.block), true));
|
||||
|
||||
Reference in New Issue
Block a user