This commit is contained in:
Anuken
2020-10-08 13:08:49 -04:00
parent eb0ab3b3e5
commit e05ac5ae41
3 changed files with 3 additions and 9 deletions

View File

@@ -311,7 +311,7 @@ public abstract class BulletType extends Content{
bullet.data = data;
bullet.drag = drag;
bullet.hitSize = hitSize;
bullet.damage = damage < 0 ? this.damage : damage;
bullet.damage = (damage < 0 ? this.damage : damage) * bullet.damageMultiplier();
bullet.add();
if(keepVelocity && owner instanceof Velc) bullet.vel.add(((Velc)owner).vel().x, ((Velc)owner).vel().y);

View File

@@ -19,12 +19,11 @@ import static mindustry.Vars.*;
abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Drawc, Shielderc, Ownerc, Velc, Bulletc, Timerc{
@Import Team team;
@Import Entityc owner;
@Import float x,y;
@Import float x, y, damage;
IntSeq collided = new IntSeq(6);
Object data;
BulletType type;
float damage;
float fdata;
@Override
@@ -76,11 +75,6 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
return type.drawSize;
}
@Override
public float damage(){
return damage * damageMultiplier();
}
@Replace
@Override
public boolean collides(Hitboxc other){

View File

@@ -4,5 +4,5 @@ import mindustry.annotations.Annotations.*;
@Component
abstract class DamageComp{
abstract float damage();
float damage;
}