Block damage multiplier rule
This commit is contained in:
@@ -18,6 +18,7 @@ import static mindustry.Vars.*;
|
||||
@Component
|
||||
abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Drawc, Shielderc, Ownerc, Velc, Bulletc, Timerc{
|
||||
@Import Team team;
|
||||
@Import Entityc owner;
|
||||
|
||||
IntSeq collided = new IntSeq(6);
|
||||
Object data;
|
||||
@@ -49,9 +50,9 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
|
||||
|
||||
@Override
|
||||
public float damageMultiplier(){
|
||||
if(owner() instanceof Unitc){
|
||||
return ((Unitc)owner()).damageMultiplier();
|
||||
}
|
||||
if(owner instanceof Unitc) return ((Unitc)owner).damageMultiplier() * state.rules.unitDamageMultiplier;
|
||||
if(owner instanceof Tilec) return state.rules.blockDamageMultiplier;
|
||||
|
||||
return 1f;
|
||||
}
|
||||
|
||||
@@ -133,8 +134,7 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
|
||||
Draw.z(Layer.bullet);
|
||||
|
||||
type.draw(this);
|
||||
//TODO refactor
|
||||
Drawf.light(x(), y(), 16f, Pal.powerLight, 0.3f);
|
||||
type.drawLight(this);
|
||||
}
|
||||
|
||||
/** Sets the bullet's rotation in degrees. */
|
||||
|
||||
Reference in New Issue
Block a user