Removed player damage/speed rules
these didn't work anyway, since units are player-controlled
This commit is contained in:
@@ -30,7 +30,7 @@ public class Bullets implements ContentList{
|
|||||||
standardGlaive, standardDenseBig, standardThoriumBig, standardIncendiaryBig,
|
standardGlaive, standardDenseBig, standardThoriumBig, standardIncendiaryBig,
|
||||||
|
|
||||||
//electric
|
//electric
|
||||||
lancerLaser, meltdownLaser, lightning, arc, damageLightning,
|
lancerLaser, meltdownLaser, arc, damageLightning,
|
||||||
|
|
||||||
//liquid
|
//liquid
|
||||||
waterShot, cryoShot, slagShot, oilShot,
|
waterShot, cryoShot, slagShot, oilShot,
|
||||||
@@ -204,7 +204,7 @@ public class Bullets implements ContentList{
|
|||||||
flakSurge = new FlakBulletType(4.5f, 13){{
|
flakSurge = new FlakBulletType(4.5f, 13){{
|
||||||
splashDamage = 40f;
|
splashDamage = 40f;
|
||||||
splashDamageRadius = 40f;
|
splashDamageRadius = 40f;
|
||||||
lightining = 2;
|
lightning = 2;
|
||||||
lightningLength = 12;
|
lightningLength = 12;
|
||||||
shootEffect = Fx.shootBig;
|
shootEffect = Fx.shootBig;
|
||||||
}};
|
}};
|
||||||
@@ -250,7 +250,7 @@ public class Bullets implements ContentList{
|
|||||||
lifetime = 150f;
|
lifetime = 150f;
|
||||||
hitEffect = Fx.blastExplosion;
|
hitEffect = Fx.blastExplosion;
|
||||||
despawnEffect = Fx.blastExplosion;
|
despawnEffect = Fx.blastExplosion;
|
||||||
lightining = 2;
|
lightning = 2;
|
||||||
lightningLength = 14;
|
lightningLength = 14;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
@@ -581,31 +581,6 @@ public class Bullets implements ContentList{
|
|||||||
drag = 0.03f;
|
drag = 0.03f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
lightning = new BulletType(0.001f, 12f){
|
|
||||||
{
|
|
||||||
lifetime = 1f;
|
|
||||||
shootEffect = Fx.hitLancer;
|
|
||||||
smokeEffect = Fx.none;
|
|
||||||
despawnEffect = Fx.none;
|
|
||||||
hitEffect = Fx.hitLancer;
|
|
||||||
keepVelocity = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public float range(){
|
|
||||||
return 70f;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void draw(Bulletc b){
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init(Bulletc b){
|
|
||||||
Lightning.create(b.team(), Pal.lancerLaser, damage * (b.owner().isLocal() ? state.rules.playerDamageMultiplier : 1f), b.x(), b.y(), b.rotation(), 30);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
arc = new LightningBulletType(){{
|
arc = new LightningBulletType(){{
|
||||||
damage = 21;
|
damage = 21;
|
||||||
lightningLength = 25;
|
lightningLength = 25;
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ public abstract class BulletType extends Content{
|
|||||||
public float homingPower = 0f;
|
public float homingPower = 0f;
|
||||||
public float homingRange = 50f;
|
public float homingRange = 50f;
|
||||||
|
|
||||||
public int lightining;
|
public int lightning;
|
||||||
public int lightningLength = 5;
|
public int lightningLength = 5;
|
||||||
|
|
||||||
public float weaveScale = 1f;
|
public float weaveScale = 1f;
|
||||||
@@ -134,19 +134,19 @@ public abstract class BulletType extends Content{
|
|||||||
if(splashDamageRadius > 0){
|
if(splashDamageRadius > 0){
|
||||||
Damage.damage(b.team(), x, y, splashDamageRadius, splashDamage * b.damageMultiplier());
|
Damage.damage(b.team(), x, y, splashDamageRadius, splashDamage * b.damageMultiplier());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < lightning; i++){
|
||||||
|
Lightning.create(b.team(), Pal.surge, damage, b.getX(), b.getY(), Mathf.random(360f), lightningLength);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void despawned(Bulletc b){
|
public void despawned(Bulletc b){
|
||||||
despawnEffect.at(b.getX(), b.getY(), b.rotation());
|
despawnEffect.at(b.getX(), b.getY(), b.rotation());
|
||||||
hitSound.at(b);
|
hitSound.at(b);
|
||||||
|
|
||||||
if(fragBullet != null || splashDamageRadius > 0){
|
if(fragBullet != null || splashDamageRadius > 0 || lightning > 0){
|
||||||
hit(b);
|
hit(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < lightining; i++){
|
|
||||||
Lightning.create(b.team(), Pal.surge, damage, b.getX(), b.getY(), Mathf.random(360f), lightningLength);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw(Bulletc b){
|
public void draw(Bulletc b){
|
||||||
|
|||||||
@@ -19,6 +19,11 @@ public class LightningBulletType extends BulletType{
|
|||||||
keepVelocity = false;
|
keepVelocity = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float range(){
|
||||||
|
return lightningLength * 2.33f;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(Bulletc b){
|
public void draw(Bulletc b){
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(){
|
public void update(){
|
||||||
if(unit.dead()){
|
if(unit.dead() || !unit.isAdded()){
|
||||||
clearUnit();
|
clearUnit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean dead(){
|
boolean dead(){
|
||||||
return unit.isNull();
|
return unit.isNull() || unit.dead() || !unit.isAdded();
|
||||||
}
|
}
|
||||||
|
|
||||||
String uuid(){
|
String uuid(){
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ public enum Gamemode{
|
|||||||
rules.enemyCoreBuildRadius = 600f;
|
rules.enemyCoreBuildRadius = 600f;
|
||||||
rules.buildCostMultiplier = 1f;
|
rules.buildCostMultiplier = 1f;
|
||||||
rules.buildSpeedMultiplier = 1f;
|
rules.buildSpeedMultiplier = 1f;
|
||||||
rules.playerDamageMultiplier = 0.33f;
|
|
||||||
rules.playerHealthMultiplier = 0.5f;
|
|
||||||
rules.unitBuildSpeedMultiplier = 2f;
|
rules.unitBuildSpeedMultiplier = 2f;
|
||||||
rules.unitHealthMultiplier = 3f;
|
rules.unitHealthMultiplier = 3f;
|
||||||
rules.attackMode = true;
|
rules.attackMode = true;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import mindustry.world.*;
|
|||||||
* Does not store game state, just configuration.
|
* Does not store game state, just configuration.
|
||||||
*/
|
*/
|
||||||
public class Rules{
|
public class Rules{
|
||||||
/** Whether the player has infinite resources. */
|
/** Whether the player team has infinite resources. */
|
||||||
public boolean infiniteResources;
|
public boolean infiniteResources;
|
||||||
/** Whether the waves come automatically on a timer. If not, waves come when the play button is pressed. */
|
/** Whether the waves come automatically on a timer. If not, waves come when the play button is pressed. */
|
||||||
public boolean waveTimer = true;
|
public boolean waveTimer = true;
|
||||||
@@ -30,15 +30,11 @@ public class Rules{
|
|||||||
public float unitBuildSpeedMultiplier = 1f;
|
public float unitBuildSpeedMultiplier = 1f;
|
||||||
/** How much health units start with. */
|
/** How much health units start with. */
|
||||||
public float unitHealthMultiplier = 1f;
|
public float unitHealthMultiplier = 1f;
|
||||||
/** How much health players start with. */
|
|
||||||
public float playerHealthMultiplier = 1f;
|
|
||||||
/** How much health blocks start with. */
|
/** How much health blocks start with. */
|
||||||
public float blockHealthMultiplier = 1f;
|
public float blockHealthMultiplier = 1f;
|
||||||
/** How much damage player mechs deal. */
|
|
||||||
public float playerDamageMultiplier = 1f;
|
|
||||||
/** How much damage any other units deal. */
|
/** How much damage any other units deal. */
|
||||||
public float unitDamageMultiplier = 1f;
|
public float unitDamageMultiplier = 1f;
|
||||||
/** Multiplier for buildings for the player. */
|
/** Multiplier for buildings resource cost. */
|
||||||
public float buildCostMultiplier = 1f;
|
public float buildCostMultiplier = 1f;
|
||||||
/** Multiplier for building speed. */
|
/** Multiplier for building speed. */
|
||||||
public float buildSpeedMultiplier = 1f;
|
public float buildSpeedMultiplier = 1f;
|
||||||
|
|||||||
@@ -153,10 +153,6 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
main.button("$bannedblocks", banDialog::show).left().width(300f);
|
main.button("$bannedblocks", banDialog::show).left().width(300f);
|
||||||
main.row();
|
main.row();
|
||||||
|
|
||||||
title("$rules.title.player");
|
|
||||||
number("$rules.playerhealthmultiplier", f -> rules.playerHealthMultiplier = f, () -> rules.playerHealthMultiplier);
|
|
||||||
number("$rules.playerdamagemultiplier", f -> rules.playerDamageMultiplier = f, () -> rules.playerDamageMultiplier);
|
|
||||||
|
|
||||||
title("$rules.title.unit");
|
title("$rules.title.unit");
|
||||||
number("$rules.unithealthmultiplier", f -> rules.unitHealthMultiplier = f, () -> rules.unitHealthMultiplier);
|
number("$rules.unithealthmultiplier", f -> rules.unitHealthMultiplier = f, () -> rules.unitHealthMultiplier);
|
||||||
number("$rules.unitdamagemultiplier", f -> rules.unitDamageMultiplier = f, () -> rules.unitDamageMultiplier);
|
number("$rules.unitdamagemultiplier", f -> rules.unitDamageMultiplier = f, () -> rules.unitDamageMultiplier);
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public class AmmoListValue<T extends UnlockableContent> implements StatValue{
|
|||||||
sep(bt, "$bullet.homing");
|
sep(bt, "$bullet.homing");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(type.lightining > 0){
|
if(type.lightning > 0){
|
||||||
sep(bt, "$bullet.shock");
|
sep(bt, "$bullet.shock");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user