@@ -184,7 +184,6 @@ public class Damage{
|
||||
Building tile = world.build(cx, cy);
|
||||
if(tile != null && tile.team != hitter.team){
|
||||
tmpBuilding = tile;
|
||||
//TODO return tile
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -215,12 +215,12 @@ public class Units{
|
||||
cdist = 0f;
|
||||
|
||||
nearbyEnemies(team, x - range, y - range, range*2f, range*2f, e -> {
|
||||
if(e.dead() || !predicate.get(e)) return;
|
||||
if(e.dead() || !predicate.get(e) || !e.within(x, y, range)) return;
|
||||
|
||||
float dst2 = sort.cost(e, x, y);
|
||||
if(dst2 < range*range && (result == null || dst2 < cdist)){
|
||||
float cost = sort.cost(e, x, y);
|
||||
if(result == null || cost < cdist){
|
||||
result = e;
|
||||
cdist = dst2;
|
||||
cdist = cost;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ public class ForceFieldAbility extends Ability{
|
||||
private static float realRad;
|
||||
private static Unit paramUnit;
|
||||
private static ForceFieldAbility paramField;
|
||||
private static final Cons<Shielderc> shieldConsumer = trait -> {
|
||||
if(trait.team() != paramUnit.team && Intersector.isInsideHexagon(paramUnit.x, paramUnit.y, realRad * 2f, trait.x(), trait.y()) && paramUnit.shield > 0){
|
||||
private static final Cons<Bullet> shieldConsumer = trait -> {
|
||||
if(trait.team != paramUnit.team && trait.type.absorbable && Intersector.isInsideHexagon(paramUnit.x, paramUnit.y, realRad * 2f, trait.x(), trait.y()) && paramUnit.shield > 0){
|
||||
trait.absorb();
|
||||
Fx.absorb.at(trait);
|
||||
|
||||
|
||||
@@ -71,6 +71,8 @@ public abstract class BulletType extends Content{
|
||||
public boolean hittable = true;
|
||||
/** Whether this bullet can be reflected. */
|
||||
public boolean reflectable = true;
|
||||
/** Whether this projectile can be absorbed by shields. */
|
||||
public boolean absorbable = true;
|
||||
/** Whether to move the bullet back depending on delta to fix some delta-time realted issues.
|
||||
* Do not change unless you know what you're doing. */
|
||||
public boolean backMove = true;
|
||||
|
||||
@@ -37,6 +37,7 @@ public class ContinuousLaserBulletType extends BulletType{
|
||||
incendSpread = 5;
|
||||
incendChance = 0.4f;
|
||||
lightColor = Color.orange;
|
||||
absorbable = false;
|
||||
}
|
||||
|
||||
protected ContinuousLaserBulletType(){
|
||||
|
||||
@@ -23,7 +23,6 @@ abstract class ShieldComp implements Healthc, Posc{
|
||||
@Override
|
||||
public void damage(float amount){
|
||||
//apply armor
|
||||
//TODO balancing of armor stats & minArmorDamage
|
||||
amount = Math.max(amount - armor, minArmorDamage * amount);
|
||||
|
||||
hitTime = 1f;
|
||||
|
||||
Reference in New Issue
Block a user