Removed player damage/speed rules

these didn't work anyway, since units are player-controlled
This commit is contained in:
Anuken
2020-05-29 13:49:29 -04:00
parent 402fe88cf6
commit 5275599baf
8 changed files with 19 additions and 49 deletions
@@ -80,7 +80,7 @@ public abstract class BulletType extends Content{
public float homingPower = 0f;
public float homingRange = 50f;
public int lightining;
public int lightning;
public int lightningLength = 5;
public float weaveScale = 1f;
@@ -134,19 +134,19 @@ public abstract class BulletType extends Content{
if(splashDamageRadius > 0){
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){
despawnEffect.at(b.getX(), b.getY(), b.rotation());
hitSound.at(b);
if(fragBullet != null || splashDamageRadius > 0){
if(fragBullet != null || splashDamageRadius > 0 || lightning > 0){
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){
@@ -19,6 +19,11 @@ public class LightningBulletType extends BulletType{
keepVelocity = false;
}
@Override
public float range(){
return lightningLength * 2.33f;
}
@Override
public void draw(Bulletc b){
}
@@ -79,7 +79,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
@Override
public void update(){
if(unit.dead()){
if(unit.dead() || !unit.isAdded()){
clearUnit();
}
@@ -146,7 +146,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
}
boolean dead(){
return unit.isNull();
return unit.isNull() || unit.dead() || !unit.isAdded();
}
String uuid(){