Another erekir rebalance pr (#11184)
* wip * wipp * real * aaa * ae * oh yeah * fixx * wip * afflict stuff * this should work ig * wip * real * a * maybe? * a * holy shit * what the fuck am I doing * I have children in my basement * 9 * o * a * good enough * more thor disperse overrange * no * fix this * a * restore * ohno * oh nice * aaa * some changes * FREEDOM * nvm * perhaps * h * aio * ya * should be all * ig * almost * well this works * more surge scathe hp nerfs * wip * drowntime changes * last tweaks * last change probs * quick locus hotfix * sadedwerwfw * targetable fix
This commit is contained in:
@@ -1016,6 +1016,7 @@ stat.damage = Damage
|
|||||||
stat.frequency = Frequency
|
stat.frequency = Frequency
|
||||||
stat.targetsair = Targets Air
|
stat.targetsair = Targets Air
|
||||||
stat.targetsground = Targets Ground
|
stat.targetsground = Targets Ground
|
||||||
|
stat.crushdamage = Crush Damage
|
||||||
stat.itemsmoved = Move Speed
|
stat.itemsmoved = Move Speed
|
||||||
stat.launchtime = Time Between Launches
|
stat.launchtime = Time Between Launches
|
||||||
stat.shootrange = Range
|
stat.shootrange = Range
|
||||||
@@ -1100,7 +1101,7 @@ ability.movelightning.description = Releases lightning while moving
|
|||||||
ability.armorplate = Armor Plate
|
ability.armorplate = Armor Plate
|
||||||
ability.armorplate.description = Reduces damage taken while shooting
|
ability.armorplate.description = Reduces damage taken while shooting
|
||||||
ability.shieldarc = Shield Arc
|
ability.shieldarc = Shield Arc
|
||||||
ability.shieldarc.description = Projects a force shield in an arc that absorbs bullets
|
ability.shieldarc.description = Projects a force shield in an arc that absorbs or deflects bullets, missiles and units
|
||||||
ability.suppressionfield = Repair Suppression
|
ability.suppressionfield = Repair Suppression
|
||||||
ability.suppressionfield.description = Stops nearby repair buildings
|
ability.suppressionfield.description = Stops nearby repair buildings
|
||||||
ability.energyfield = Energy Field
|
ability.energyfield = Energy Field
|
||||||
@@ -1120,6 +1121,7 @@ ability.stat.regen = [stat]{0}[lightgray] health/sec
|
|||||||
ability.stat.pulseregen = [stat]{0}[lightgray] health/pulse
|
ability.stat.pulseregen = [stat]{0}[lightgray] health/pulse
|
||||||
ability.stat.shield = [stat]{0}[lightgray] max shield
|
ability.stat.shield = [stat]{0}[lightgray] max shield
|
||||||
ability.stat.repairspeed = [stat]{0}/sec[lightgray] repair speed
|
ability.stat.repairspeed = [stat]{0}/sec[lightgray] repair speed
|
||||||
|
ability.stat.deflectchance = [stat]{0}%[lightgray] deflect chance
|
||||||
ability.stat.slurpheal = [stat]{0}[lightgray] health/liquid unit
|
ability.stat.slurpheal = [stat]{0}[lightgray] health/liquid unit
|
||||||
ability.stat.cooldown = [stat]{0} sec[lightgray] cooldown
|
ability.stat.cooldown = [stat]{0} sec[lightgray] cooldown
|
||||||
ability.stat.maxtargets = [stat]{0}[lightgray] max targets
|
ability.stat.maxtargets = [stat]{0}[lightgray] max targets
|
||||||
@@ -2476,9 +2478,9 @@ unit.navanax.description = Fires explosive EMP projectiles, dealing significant
|
|||||||
#Erekir
|
#Erekir
|
||||||
unit.stell.description = Fires standard bullets at enemy targets.
|
unit.stell.description = Fires standard bullets at enemy targets.
|
||||||
unit.locus.description = Fires alternating bullets at enemy targets.
|
unit.locus.description = Fires alternating bullets at enemy targets.
|
||||||
unit.precept.description = Fires piercing cluster bullets at enemy targets.
|
unit.precept.description = Fires piercing cluster bullets at enemy targets. Less affected by harmful terrain.
|
||||||
unit.vanquish.description = Fires large piercing splitting bullets at enemy targets.
|
unit.vanquish.description = Fires large piercing splitting bullets at enemy targets. Less affected by harmful terrain.
|
||||||
unit.conquer.description = Fires large piercing cascades of bullets at enemy targets.
|
unit.conquer.description = Fires large piercing cascades of bullets at enemy targets. Less affected by harmful terrain.
|
||||||
unit.merui.description = Fires long-range artillery at enemy ground targets. Can step over most terrain.
|
unit.merui.description = Fires long-range artillery at enemy ground targets. Can step over most terrain.
|
||||||
unit.cleroi.description = Fires dual shells at enemy targets. Targets enemy projectiles with point defense turrets. Can step over most terrain.
|
unit.cleroi.description = Fires dual shells at enemy targets. Targets enemy projectiles with point defense turrets. Can step over most terrain.
|
||||||
unit.anthicus.description = Fires long-range homing missiles at enemy targets. Can step over most terrain.
|
unit.anthicus.description = Fires long-range homing missiles at enemy targets. Can step over most terrain.
|
||||||
|
|||||||
@@ -4804,6 +4804,7 @@ public class Blocks{
|
|||||||
ammoMultiplier = 1f;
|
ammoMultiplier = 1f;
|
||||||
|
|
||||||
lifetime = 34f;
|
lifetime = 34f;
|
||||||
|
extraRangeMargin = 32f;
|
||||||
rotationOffset = 90f;
|
rotationOffset = 90f;
|
||||||
trailRotation = true;
|
trailRotation = true;
|
||||||
trailEffect = Fx.disperseTrail;
|
trailEffect = Fx.disperseTrail;
|
||||||
@@ -5160,7 +5161,7 @@ public class Blocks{
|
|||||||
|
|
||||||
fogRadius = 6f;
|
fogRadius = 6f;
|
||||||
|
|
||||||
health = 210;
|
health = 240;
|
||||||
|
|
||||||
weapons.add(new Weapon(){{
|
weapons.add(new Weapon(){{
|
||||||
shootCone = 360f;
|
shootCone = 360f;
|
||||||
@@ -5353,7 +5354,7 @@ public class Blocks{
|
|||||||
|
|
||||||
fogRadius = 6f;
|
fogRadius = 6f;
|
||||||
|
|
||||||
health = 400;
|
health = 300;
|
||||||
|
|
||||||
weapons.add(new Weapon(){{
|
weapons.add(new Weapon(){{
|
||||||
shootCone = 360f;
|
shootCone = 360f;
|
||||||
@@ -5408,7 +5409,7 @@ public class Blocks{
|
|||||||
|
|
||||||
fogRadius = 6f;
|
fogRadius = 6f;
|
||||||
|
|
||||||
health = 100;
|
health = 50;
|
||||||
|
|
||||||
weapons.add(new Weapon(){{
|
weapons.add(new Weapon(){{
|
||||||
shootCone = 360f;
|
shootCone = 360f;
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ public class UnitTypes{
|
|||||||
mechStepParticles = true;
|
mechStepParticles = true;
|
||||||
stepShake = 0.15f;
|
stepShake = 0.15f;
|
||||||
singleTarget = true;
|
singleTarget = true;
|
||||||
drownTimeMultiplier = 4f;
|
drownTimeMultiplier = 1.5f;
|
||||||
|
|
||||||
abilities.add(new ShieldRegenFieldAbility(25f, 250f, 60f * 1, 60f));
|
abilities.add(new ShieldRegenFieldAbility(25f, 250f, 60f * 1, 60f));
|
||||||
|
|
||||||
@@ -262,7 +262,7 @@ public class UnitTypes{
|
|||||||
armor = 18f;
|
armor = 18f;
|
||||||
mechStepParticles = true;
|
mechStepParticles = true;
|
||||||
stepShake = 0.75f;
|
stepShake = 0.75f;
|
||||||
drownTimeMultiplier = 6f;
|
drownTimeMultiplier = 1.6f;
|
||||||
mechFrontSway = 1.9f;
|
mechFrontSway = 1.9f;
|
||||||
mechSideSway = 0.6f;
|
mechSideSway = 0.6f;
|
||||||
ammoType = new ItemAmmoType(Items.thorium);
|
ammoType = new ItemAmmoType(Items.thorium);
|
||||||
@@ -459,7 +459,7 @@ public class UnitTypes{
|
|||||||
mechStepParticles = true;
|
mechStepParticles = true;
|
||||||
stepShake = 0.15f;
|
stepShake = 0.15f;
|
||||||
ammoType = new PowerAmmoType(2500);
|
ammoType = new PowerAmmoType(2500);
|
||||||
drownTimeMultiplier = 4f;
|
drownTimeMultiplier = 1.3f;
|
||||||
|
|
||||||
speed = 0.44f;
|
speed = 0.44f;
|
||||||
boostMultiplier = 2.4f;
|
boostMultiplier = 2.4f;
|
||||||
@@ -539,7 +539,7 @@ public class UnitTypes{
|
|||||||
armor = 9f;
|
armor = 9f;
|
||||||
stepShake = 1.5f;
|
stepShake = 1.5f;
|
||||||
rotateSpeed = 1.5f;
|
rotateSpeed = 1.5f;
|
||||||
drownTimeMultiplier = 6f;
|
drownTimeMultiplier = 1.6f;
|
||||||
|
|
||||||
legCount = 4;
|
legCount = 4;
|
||||||
legLength = 14f;
|
legLength = 14f;
|
||||||
@@ -770,7 +770,6 @@ public class UnitTypes{
|
|||||||
|
|
||||||
legSplashDamage = 32;
|
legSplashDamage = 32;
|
||||||
legSplashRange = 30;
|
legSplashRange = 30;
|
||||||
drownTimeMultiplier = 2f;
|
|
||||||
|
|
||||||
hovering = true;
|
hovering = true;
|
||||||
shadowElevation = 0.65f;
|
shadowElevation = 0.65f;
|
||||||
@@ -857,7 +856,6 @@ public class UnitTypes{
|
|||||||
lightRadius = 140f;
|
lightRadius = 140f;
|
||||||
|
|
||||||
rotateSpeed = 1.9f;
|
rotateSpeed = 1.9f;
|
||||||
drownTimeMultiplier = 3f;
|
|
||||||
|
|
||||||
legCount = 8;
|
legCount = 8;
|
||||||
legMoveSpace = 0.8f;
|
legMoveSpace = 0.8f;
|
||||||
@@ -2506,6 +2504,7 @@ public class UnitTypes{
|
|||||||
health = 850;
|
health = 850;
|
||||||
armor = 6f;
|
armor = 6f;
|
||||||
itemCapacity = 0;
|
itemCapacity = 0;
|
||||||
|
floorMultiplier = 0.95f;
|
||||||
treadRects = new Rect[]{new Rect(12 - 32f, 7 - 32f, 14, 51)};
|
treadRects = new Rect[]{new Rect(12 - 32f, 7 - 32f, 14, 51)};
|
||||||
researchCostMultiplier = 0f;
|
researchCostMultiplier = 0f;
|
||||||
|
|
||||||
@@ -2547,6 +2546,7 @@ public class UnitTypes{
|
|||||||
health = 2100;
|
health = 2100;
|
||||||
armor = 8f;
|
armor = 8f;
|
||||||
itemCapacity = 0;
|
itemCapacity = 0;
|
||||||
|
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)};
|
||||||
researchCostMultiplier = 0f;
|
researchCostMultiplier = 0f;
|
||||||
|
|
||||||
@@ -2625,6 +2625,9 @@ public class UnitTypes{
|
|||||||
health = 5000;
|
health = 5000;
|
||||||
armor = 11f;
|
armor = 11f;
|
||||||
itemCapacity = 0;
|
itemCapacity = 0;
|
||||||
|
floorMultiplier = 0.65f;
|
||||||
|
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)};
|
treadRects = new Rect[]{new Rect(16 - 60f, 48 - 70f, 30, 75), new Rect(44 - 60f, 17 - 70f, 17, 60)};
|
||||||
researchCostMultiplier = 0f;
|
researchCostMultiplier = 0f;
|
||||||
|
|
||||||
@@ -2695,6 +2698,9 @@ public class UnitTypes{
|
|||||||
armor = 20f;
|
armor = 20f;
|
||||||
itemCapacity = 0;
|
itemCapacity = 0;
|
||||||
crushDamage = 13f / 5f;
|
crushDamage = 13f / 5f;
|
||||||
|
floorMultiplier = 0.5f;
|
||||||
|
drownTimeMultiplier = 1.25f;
|
||||||
|
immunities.addAll(StatusEffects.burning, StatusEffects.melting);
|
||||||
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)};
|
||||||
|
|
||||||
weapons.add(new Weapon("vanquish-weapon"){{
|
weapons.add(new Weapon("vanquish-weapon"){{
|
||||||
@@ -2791,6 +2797,8 @@ public class UnitTypes{
|
|||||||
armor = 26f;
|
armor = 26f;
|
||||||
crushDamage = 25f / 5f;
|
crushDamage = 25f / 5f;
|
||||||
rotateSpeed = 0.8f;
|
rotateSpeed = 0.8f;
|
||||||
|
floorMultiplier = 0.3f;
|
||||||
|
immunities.addAll(StatusEffects.burning, StatusEffects.melting);
|
||||||
|
|
||||||
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)};
|
||||||
@@ -3306,7 +3314,7 @@ public class UnitTypes{
|
|||||||
drag = 0.1f;
|
drag = 0.1f;
|
||||||
speed = 0.6f;
|
speed = 0.6f;
|
||||||
hitSize = 30f;
|
hitSize = 30f;
|
||||||
health = 7300;
|
health = 6500;
|
||||||
armor = 5f;
|
armor = 5f;
|
||||||
|
|
||||||
lockLegBase = true;
|
lockLegBase = true;
|
||||||
@@ -3319,14 +3327,15 @@ public class UnitTypes{
|
|||||||
|
|
||||||
abilities.add(new ShieldArcAbility(){{
|
abilities.add(new ShieldArcAbility(){{
|
||||||
region = "tecta-shield";
|
region = "tecta-shield";
|
||||||
radius = 36f;
|
radius = 45f;
|
||||||
angle = 82f;
|
angle = 82f;
|
||||||
regen = 0.6f;
|
regen = 40f / 60f;
|
||||||
cooldown = 60f * 8f;
|
cooldown = 60f * 8f;
|
||||||
max = 2000f;
|
max = 2200f;
|
||||||
y = -20f;
|
y = -20f;
|
||||||
width = 6f;
|
width = 8f;
|
||||||
whenShooting = false;
|
whenShooting = false;
|
||||||
|
chanceDeflect = 1f;
|
||||||
}});
|
}});
|
||||||
|
|
||||||
rotateSpeed = 2.1f;
|
rotateSpeed = 2.1f;
|
||||||
@@ -3344,7 +3353,7 @@ public class UnitTypes{
|
|||||||
|
|
||||||
legSplashDamage = 32;
|
legSplashDamage = 32;
|
||||||
legSplashRange = 30;
|
legSplashRange = 30;
|
||||||
drownTimeMultiplier = 2f;
|
drownTimeMultiplier = 0.5f;
|
||||||
|
|
||||||
hovering = true;
|
hovering = true;
|
||||||
shadowElevation = 0.4f;
|
shadowElevation = 0.4f;
|
||||||
@@ -3435,7 +3444,7 @@ public class UnitTypes{
|
|||||||
|
|
||||||
legSplashDamage = 32;
|
legSplashDamage = 32;
|
||||||
legSplashRange = 32;
|
legSplashRange = 32;
|
||||||
drownTimeMultiplier = 2f;
|
drownTimeMultiplier = 0.5f;
|
||||||
|
|
||||||
hovering = true;
|
hovering = true;
|
||||||
shadowElevation = 0.4f;
|
shadowElevation = 0.4f;
|
||||||
@@ -3487,7 +3496,7 @@ public class UnitTypes{
|
|||||||
|
|
||||||
bullet = new ArtilleryBulletType(5.5f, 260){{
|
bullet = new ArtilleryBulletType(5.5f, 260){{
|
||||||
collidesTiles = collides = true;
|
collidesTiles = collides = true;
|
||||||
lifetime = 70f;
|
lifetime = 60f;
|
||||||
shootEffect = Fx.shootBigColor;
|
shootEffect = Fx.shootBigColor;
|
||||||
smokeEffect = Fx.shootSmokeSquareBig;
|
smokeEffect = Fx.shootSmokeSquareBig;
|
||||||
frontColor = Color.white;
|
frontColor = Color.white;
|
||||||
@@ -3495,6 +3504,7 @@ public class UnitTypes{
|
|||||||
hitSound = Sounds.none;
|
hitSound = Sounds.none;
|
||||||
width = 18f;
|
width = 18f;
|
||||||
height = 24f;
|
height = 24f;
|
||||||
|
rangeOverride = 385f;
|
||||||
|
|
||||||
lightColor = trailColor = hitColor = backColor = Pal.techBlue;
|
lightColor = trailColor = hitColor = backColor = Pal.techBlue;
|
||||||
lightRadius = 40f;
|
lightRadius = 40f;
|
||||||
@@ -3508,10 +3518,10 @@ public class UnitTypes{
|
|||||||
despawnSound = Sounds.dullExplosion;
|
despawnSound = Sounds.dullExplosion;
|
||||||
|
|
||||||
hitEffect = despawnEffect = new ExplosionEffect(){{
|
hitEffect = despawnEffect = new ExplosionEffect(){{
|
||||||
lifetime = 34f;
|
lifetime = 50f;
|
||||||
waveStroke = 4f;
|
waveStroke = 5f;
|
||||||
waveColor = sparkColor = trailColor;
|
waveColor = sparkColor = trailColor;
|
||||||
waveRad = 25f;
|
waveRad = 45f;
|
||||||
smokeSize = 0f;
|
smokeSize = 0f;
|
||||||
smokeSizeBase = 0f;
|
smokeSizeBase = 0f;
|
||||||
sparks = 10;
|
sparks = 10;
|
||||||
@@ -3520,8 +3530,8 @@ public class UnitTypes{
|
|||||||
sparkStroke = 3f;
|
sparkStroke = 3f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
splashDamage = 85f;
|
splashDamage = 120f;
|
||||||
splashDamageRadius = 20f;
|
splashDamageRadius = 36f;
|
||||||
|
|
||||||
fragBullets = 15;
|
fragBullets = 15;
|
||||||
fragVelocityMin = 0.5f;
|
fragVelocityMin = 0.5f;
|
||||||
@@ -3529,14 +3539,14 @@ public class UnitTypes{
|
|||||||
fragLifeMin = 0.3f;
|
fragLifeMin = 0.3f;
|
||||||
despawnShake = 5f;
|
despawnShake = 5f;
|
||||||
|
|
||||||
fragBullet = new BasicBulletType(5.5f, 50){{
|
fragBullet = new BasicBulletType(5.5f, 37){{
|
||||||
pierceCap = 2;
|
pierceCap = 2;
|
||||||
pierceBuilding = true;
|
pierceBuilding = true;
|
||||||
|
|
||||||
homingPower = 0.09f;
|
homingPower = 0.09f;
|
||||||
homingRange = 150f;
|
homingRange = 150f;
|
||||||
|
|
||||||
lifetime = 50f;
|
lifetime = 40f;
|
||||||
shootEffect = Fx.shootBigColor;
|
shootEffect = Fx.shootBigColor;
|
||||||
smokeEffect = Fx.shootSmokeSquareBig;
|
smokeEffect = Fx.shootSmokeSquareBig;
|
||||||
frontColor = Color.white;
|
frontColor = Color.white;
|
||||||
@@ -3555,7 +3565,7 @@ public class UnitTypes{
|
|||||||
collidesAir = false;
|
collidesAir = false;
|
||||||
|
|
||||||
despawnEffect = Fx.none;
|
despawnEffect = Fx.none;
|
||||||
splashDamage = 46f;
|
splashDamage = 35f;
|
||||||
splashDamageRadius = 30f;
|
splashDamageRadius = 30f;
|
||||||
|
|
||||||
hitEffect = despawnEffect = new MultiEffect(new ExplosionEffect(){{
|
hitEffect = despawnEffect = new MultiEffect(new ExplosionEffect(){{
|
||||||
@@ -4074,7 +4084,7 @@ public class UnitTypes{
|
|||||||
hitSize = 9f;
|
hitSize = 9f;
|
||||||
omniMovement = false;
|
omniMovement = false;
|
||||||
rotateSpeed = 2.5f;
|
rotateSpeed = 2.5f;
|
||||||
drownTimeMultiplier = 2f;
|
drownTimeMultiplier = 1.75f;
|
||||||
segments = 3;
|
segments = 3;
|
||||||
drawBody = false;
|
drawBody = false;
|
||||||
hidden = true;
|
hidden = true;
|
||||||
@@ -4094,7 +4104,6 @@ public class UnitTypes{
|
|||||||
hitSize = 48f;
|
hitSize = 48f;
|
||||||
omniMovement = false;
|
omniMovement = false;
|
||||||
rotateSpeed = 1.7f;
|
rotateSpeed = 1.7f;
|
||||||
drownTimeMultiplier = 4f;
|
|
||||||
segments = 4;
|
segments = 4;
|
||||||
drawBody = false;
|
drawBody = false;
|
||||||
hidden = true;
|
hidden = true;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package mindustry.entities.abilities;
|
package mindustry.entities.abilities;
|
||||||
|
|
||||||
|
import arc.audio.*;
|
||||||
import arc.func.*;
|
import arc.func.*;
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
@@ -9,6 +10,7 @@ import arc.scene.ui.layout.*;
|
|||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.*;
|
import mindustry.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
|
import mindustry.entities.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
@@ -19,25 +21,86 @@ public class ShieldArcAbility extends Ability{
|
|||||||
private static Vec2 paramPos = new Vec2();
|
private static Vec2 paramPos = new Vec2();
|
||||||
private static final Cons<Bullet> shieldConsumer = b -> {
|
private static final Cons<Bullet> shieldConsumer = b -> {
|
||||||
if(b.team != paramUnit.team && b.type.absorbable && paramField.data > 0 &&
|
if(b.team != paramUnit.team && b.type.absorbable && paramField.data > 0 &&
|
||||||
!(b.within(paramPos, paramField.radius - paramField.width/2f) && paramPos.within(b.x - b.deltaX, b.y - b.deltaY, paramField.radius - paramField.width/2f)) &&
|
!(b.within(paramPos, paramField.radius - paramField.width) && paramPos.within(b.x - b.deltaX, b.y - b.deltaY, paramField.radius - paramField.width)) &&
|
||||||
(Tmp.v1.set(b).add(b.deltaX, b.deltaY).within(paramPos, paramField.radius + paramField.width/2f) || b.within(paramPos, paramField.radius + paramField.width/2f)) &&
|
(Tmp.v1.set(b).add(b.deltaX, b.deltaY).within(paramPos, paramField.radius + paramField.width) || b.within(paramPos, paramField.radius + paramField.width)) &&
|
||||||
(Angles.within(paramPos.angleTo(b), paramUnit.rotation + paramField.angleOffset, paramField.angle / 2f) || Angles.within(paramPos.angleTo(b.x + b.deltaX, b.y + b.deltaY), paramUnit.rotation + paramField.angleOffset, paramField.angle / 2f))){
|
(Angles.within(paramPos.angleTo(b), paramUnit.rotation + paramField.angleOffset, paramField.angle / 2f) || Angles.within(paramPos.angleTo(b.x + b.deltaX, b.y + b.deltaY), paramUnit.rotation + paramField.angleOffset, paramField.angle / 2f))){
|
||||||
|
|
||||||
b.absorb();
|
if(paramField.chanceDeflect > 0f && b.vel.len() >= 0.1f && b.type.reflectable && Mathf.chance(paramField.chanceDeflect)){
|
||||||
Fx.absorb.at(b);
|
|
||||||
|
|
||||||
//break shield
|
//make sound
|
||||||
|
paramField.deflectSound.at(paramPos, Mathf.random(0.9f, 1.1f));
|
||||||
|
|
||||||
|
//translate bullet back to where it was upon collision
|
||||||
|
b.trns(-b.vel.x, -b.vel.y);
|
||||||
|
|
||||||
|
float penX = Math.abs(paramPos.x - b.x), penY = Math.abs(paramPos.y - b.y);
|
||||||
|
|
||||||
|
if(penX > penY){
|
||||||
|
b.vel.x *= -1;
|
||||||
|
}else{
|
||||||
|
b.vel.y *= -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
b.owner = paramUnit;
|
||||||
|
b.team = paramUnit.team;
|
||||||
|
b.time += 1f;
|
||||||
|
|
||||||
|
}else{
|
||||||
|
b.absorb();
|
||||||
|
Fx.absorb.at(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
// break shield
|
||||||
if(paramField.data <= b.damage()){
|
if(paramField.data <= b.damage()){
|
||||||
paramField.data -= paramField.cooldown * paramField.regen;
|
paramField.data -= paramField.cooldown * paramField.regen;
|
||||||
|
|
||||||
Fx.arcShieldBreak.at(paramPos.x, paramPos.y, 0, paramField.color == null ? paramUnit.type.shieldColor(paramUnit) : paramField.color, paramUnit);
|
Fx.arcShieldBreak.at(paramPos.x, paramPos.y, 0, paramField.color == null ? paramUnit.type.shieldColor(paramUnit) : paramField.color, paramUnit);
|
||||||
}
|
}
|
||||||
|
|
||||||
paramField.data -= b.damage();
|
// shieldDamage for consistency
|
||||||
|
paramField.data -= b.type.shieldDamage(b);
|
||||||
paramField.alpha = 1f;
|
paramField.alpha = 1f;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
protected static final Cons<Unit> unitConsumer = unit -> {
|
||||||
|
// ignore core units
|
||||||
|
if(paramField.data > 0 && unit.targetable(paramUnit.team) &&
|
||||||
|
!(unit.within(paramPos, paramField.radius - paramField.width) && paramPos.within(unit.x - unit.deltaX, unit.y - unit.deltaY, paramField.radius - paramField.width)) &&
|
||||||
|
(Tmp.v1.set(unit).add(unit.deltaX, unit.deltaY).within(paramPos, paramField.radius + paramField.width) || unit.within(paramPos, paramField.radius + paramField.width)) &&
|
||||||
|
(Angles.within(paramPos.angleTo(unit), paramUnit.rotation + paramField.angleOffset, paramField.angle / 2f) || Angles.within(paramPos.angleTo(unit.x + unit.deltaX, unit.y + unit.deltaY), paramUnit.rotation + paramField.angleOffset, paramField.angle / 2f))){
|
||||||
|
|
||||||
|
if(unit.isMissile() && unit.killable() && paramField.missileUnitMultiplier >= 0f){
|
||||||
|
|
||||||
|
unit.remove();
|
||||||
|
unit.type.deathSound.at(unit);
|
||||||
|
unit.type.deathExplosionEffect.at(unit);
|
||||||
|
Fx.absorb.at(unit);
|
||||||
|
Fx.circleColorSpark.at(unit.x, unit.y,paramUnit.team.color);
|
||||||
|
|
||||||
|
// consider missile hp and gamerule to damage the shield
|
||||||
|
paramField.data -= unit.health() * paramField.missileUnitMultiplier * Vars.state.rules.unitDamage(unit.team);
|
||||||
|
paramField.alpha = 1f;
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
float reach = paramField.radius + paramField.width;
|
||||||
|
float overlapDst = reach - unit.dst(paramPos.x,paramPos.y);
|
||||||
|
|
||||||
|
if(overlapDst>0){
|
||||||
|
//stop
|
||||||
|
unit.vel.setZero();
|
||||||
|
// get out
|
||||||
|
unit.move(Tmp.v1.set(unit).sub(paramUnit).setLength(overlapDst + 0.01f));
|
||||||
|
|
||||||
|
if(Mathf.chanceDelta(0.5f*Time.delta)){
|
||||||
|
Fx.circleColorSpark.at(unit.x,unit.y,paramUnit.team.color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/** Shield radius. */
|
/** Shield radius. */
|
||||||
public float radius = 60f;
|
public float radius = 60f;
|
||||||
/** Shield regen speed in damage/tick. */
|
/** Shield regen speed in damage/tick. */
|
||||||
@@ -54,6 +117,12 @@ public class ShieldArcAbility extends Ability{
|
|||||||
public boolean whenShooting = true;
|
public boolean whenShooting = true;
|
||||||
/** Width of shield line. */
|
/** Width of shield line. */
|
||||||
public float width = 6f;
|
public float width = 6f;
|
||||||
|
/** Bullet deflection chance. -1 to disable */
|
||||||
|
public float chanceDeflect = -1f;
|
||||||
|
/** Deflection sound. */
|
||||||
|
public Sound deflectSound = Sounds.none;
|
||||||
|
/** Multiplier for shield damage taken from missile units. */
|
||||||
|
public float missileUnitMultiplier = 2f;
|
||||||
|
|
||||||
/** Whether to draw the arc line. */
|
/** Whether to draw the arc line. */
|
||||||
public boolean drawArc = true;
|
public boolean drawArc = true;
|
||||||
@@ -75,6 +144,8 @@ public class ShieldArcAbility extends Ability{
|
|||||||
t.add(abilityStat("repairspeed", Strings.autoFixed(regen * 60f, 2)));
|
t.add(abilityStat("repairspeed", Strings.autoFixed(regen * 60f, 2)));
|
||||||
t.row();
|
t.row();
|
||||||
t.add(abilityStat("cooldown", Strings.autoFixed(cooldown / 60f, 2)));
|
t.add(abilityStat("cooldown", Strings.autoFixed(cooldown / 60f, 2)));
|
||||||
|
t.row();
|
||||||
|
t.add(abilityStat("deflectchance", Strings.autoFixed(chanceDeflect *100f, 2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -93,8 +164,9 @@ public class ShieldArcAbility extends Ability{
|
|||||||
paramField = this;
|
paramField = this;
|
||||||
paramPos.set(x, y).rotate(unit.rotation - 90f).add(unit);
|
paramPos.set(x, y).rotate(unit.rotation - 90f).add(unit);
|
||||||
|
|
||||||
float reach = radius + width / 2f;
|
float reach = radius + width;
|
||||||
Groups.bullet.intersect(paramPos.x - reach, paramPos.y - reach, reach * 2f, reach * 2f, shieldConsumer);
|
Groups.bullet.intersect(paramPos.x - reach, paramPos.y - reach, reach * 2f, reach * 2f, shieldConsumer);
|
||||||
|
Units.nearbyEnemies(paramUnit.team, paramPos.x - reach, paramPos.y - reach, reach * 2f, reach * 2f, unitConsumer);
|
||||||
}else{
|
}else{
|
||||||
widthScale = Mathf.lerpDelta(widthScale, 0f, 0.11f);
|
widthScale = Mathf.lerpDelta(widthScale, 0f, 0.11f);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ abstract class TankComp implements Posc, Hitboxc, Unitc, ElevationMovec{
|
|||||||
boolean anyNonDeep = false;
|
boolean anyNonDeep = false;
|
||||||
|
|
||||||
//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.6f / tilesize), 0);
|
int r = Math.max((int)(hitSize * 0.75f / tilesize), 0);
|
||||||
|
|
||||||
int solids = 0, total = (r*2+1)*(r*2+1);
|
int solids = 0, total = (r*2+1)*(r*2+1);
|
||||||
for(int dx = -r; dx <= r; dx++){
|
for(int dx = -r; dx <= r; dx++){
|
||||||
@@ -104,7 +104,7 @@ abstract class TankComp implements Posc, Hitboxc, Unitc, ElevationMovec{
|
|||||||
public float floorSpeedMultiplier(){
|
public float floorSpeedMultiplier(){
|
||||||
Floor on = isFlying() || type.hovering ? Blocks.air.asFloor() : floorOn();
|
Floor on = isFlying() || type.hovering ? Blocks.air.asFloor() : floorOn();
|
||||||
//TODO take into account extra blocks
|
//TODO take into account extra blocks
|
||||||
return on.speedMultiplier * speedMultiplier * lastSlowdown;
|
return (float)Math.pow(on.speedMultiplier, type.floorMultiplier) * speedMultiplier * lastSlowdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Replace
|
@Replace
|
||||||
|
|||||||
@@ -606,7 +606,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
|||||||
|
|
||||||
if(floor != null && floor.isLiquid && floor.drownTime > 0 && canDrown()){
|
if(floor != null && floor.isLiquid && floor.drownTime > 0 && canDrown()){
|
||||||
lastDrownFloor = floor;
|
lastDrownFloor = floor;
|
||||||
drownTime += Time.delta / floor.drownTime / type.drownTimeMultiplier;
|
drownTime += Time.delta / (hitSize / 8f * type.drownTimeMultiplier * floor.drownTime);
|
||||||
if(Mathf.chanceDelta(0.05f)){
|
if(Mathf.chanceDelta(0.05f)){
|
||||||
floor.drownUpdateEffect.at(x, y, hitSize, floor.mapColor);
|
floor.drownUpdateEffect.at(x, y, hitSize, floor.mapColor);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -439,6 +439,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;
|
||||||
|
/** how affected this unit is by terrain */
|
||||||
|
public float floorMultiplier = 1f;
|
||||||
|
|
||||||
//SEGMENTED / CRAWL UNITS (this is WIP content!)
|
//SEGMENTED / CRAWL UNITS (this is WIP content!)
|
||||||
|
|
||||||
@@ -743,6 +745,11 @@ public class UnitType extends UnlockableContent implements Senseable{
|
|||||||
stats.add(Stat.size, StatValues.squared(hitSize / tilesize, StatUnit.blocks));
|
stats.add(Stat.size, StatValues.squared(hitSize / tilesize, StatUnit.blocks));
|
||||||
stats.add(Stat.itemCapacity, itemCapacity);
|
stats.add(Stat.itemCapacity, itemCapacity);
|
||||||
stats.add(Stat.range, Strings.autoFixed(maxRange / tilesize, 1), StatUnit.blocks);
|
stats.add(Stat.range, Strings.autoFixed(maxRange / tilesize, 1), StatUnit.blocks);
|
||||||
|
|
||||||
|
if(crushDamage > 0){
|
||||||
|
stats.add(Stat.crushDamage, crushDamage * 60f * 5f, StatUnit.perSecond);
|
||||||
|
}
|
||||||
|
|
||||||
stats.add(Stat.targetsAir, targetAir);
|
stats.add(Stat.targetsAir, targetAir);
|
||||||
stats.add(Stat.targetsGround, targetGround);
|
stats.add(Stat.targetsGround, targetGround);
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ public class RepairTower extends Block{
|
|||||||
super(name);
|
super(name);
|
||||||
update = true;
|
update = true;
|
||||||
solid = true;
|
solid = true;
|
||||||
|
suppressable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -64,6 +65,11 @@ public class RepairTower extends Block{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(checkSuppression()){
|
||||||
|
warmup = 0f;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
boolean any = false;
|
boolean any = false;
|
||||||
if(efficiency > 0){
|
if(efficiency > 0){
|
||||||
for(var target : targets){
|
for(var target : targets){
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ public class Stat implements Comparable<Stat>{
|
|||||||
inaccuracy = new Stat("inaccuracy", StatCat.function),
|
inaccuracy = new Stat("inaccuracy", StatCat.function),
|
||||||
shots = new Stat("shots", StatCat.function),
|
shots = new Stat("shots", StatCat.function),
|
||||||
reload = new Stat("reload", StatCat.function),
|
reload = new Stat("reload", StatCat.function),
|
||||||
|
crushDamage = new Stat("crushDamage", StatCat.function),
|
||||||
targetsAir = new Stat("targetsAir", StatCat.function),
|
targetsAir = new Stat("targetsAir", StatCat.function),
|
||||||
targetsGround = new Stat("targetsGround", StatCat.function),
|
targetsGround = new Stat("targetsGround", StatCat.function),
|
||||||
damage = new Stat("damage", StatCat.function),
|
damage = new Stat("damage", StatCat.function),
|
||||||
|
|||||||
Reference in New Issue
Block a user