This commit is contained in:
Anuken
2020-06-07 17:22:17 -04:00
parent 6c00b2a0ff
commit 210971fedb
19 changed files with 839 additions and 784 deletions

View File

@@ -48,8 +48,6 @@ public abstract class BulletType extends Content{
public float splashDamage = 0f;
/** Knockback in velocity. */
public float knockback;
/** Whether this bullet hits tiles. */
public boolean hitTiles = true;
/** Status effect applied on hit. */
public StatusEffect status = StatusEffects.none;
/** Intensity of applied status effect in terms of duration. */
@@ -139,7 +137,11 @@ public abstract class BulletType extends Content{
}
if(splashDamageRadius > 0){
Damage.damage(b.team(), x, y, splashDamageRadius, splashDamage * b.damageMultiplier());
Damage.damage(b.team(), x, y, splashDamageRadius, splashDamage * b.damageMultiplier(), collidesAir, collidesGround);
if(status != StatusEffects.none){
Damage.status(b.team(), x, y, splashDamageRadius, status, statusDuration, collidesAir, collidesGround);
}
}
for(int i = 0; i < lightning; i++){

View File

@@ -53,7 +53,7 @@ public class LaserBulletType extends BulletType{
furthest = null;
world.raycast(b.tileX(), b.tileY(), world.toTile(b.x() + Tmp.v1.x), world.toTile(b.y() + Tmp.v1.y),
(x, y) -> (furthest = world.tile(x, y)) != null && furthest.block().absorbLasers);
(x, y) -> (furthest = world.tile(x, y)) != null && furthest.team() != b.team() && furthest.block().absorbLasers);
float resultLength = furthest != null ? Math.max(6f, b.dst(furthest.worldx(), furthest.worldy())) : length;