Merge remote-tracking branch 'origin/7.0-features' into 7.0-features
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 458 B After Width: | Height: | Size: 463 B |
@@ -3792,27 +3792,27 @@ public class Blocks{
|
|||||||
}};
|
}};
|
||||||
outlineColor = Pal.darkOutline;
|
outlineColor = Pal.darkOutline;
|
||||||
|
|
||||||
liquidConsumed = 4f / 60f;
|
liquidConsumed = 8f / 60f;
|
||||||
|
|
||||||
float r = range = 130f;
|
float r = range = 130f;
|
||||||
|
|
||||||
//TODO balance, set up, where is liquid/sec displayed? status effects maybe?
|
//TODO balance, set up, where is liquid/sec displayed? status effects maybe?
|
||||||
ammo(
|
ammo(
|
||||||
Liquids.ozone, new ContinuousFlameBulletType(){{
|
Liquids.ozone, new ContinuousFlameBulletType(){{
|
||||||
damage = 90f;
|
damage = 70f;
|
||||||
length = r;
|
length = r;
|
||||||
knockback = 1f;
|
knockback = 1f;
|
||||||
pierceCap = 3;
|
pierceCap = 2;
|
||||||
buildingDamageMultiplier = 0.3f;
|
buildingDamageMultiplier = 0.3f;
|
||||||
|
|
||||||
colors = new Color[]{Color.valueOf("eb7abe").a(0.55f), Color.valueOf("e189f5").a(0.7f), Color.valueOf("907ef7").a(0.8f), Color.valueOf("91a4ff"), Color.white};
|
colors = new Color[]{Color.valueOf("eb7abe").a(0.55f), Color.valueOf("e189f5").a(0.7f), Color.valueOf("907ef7").a(0.8f), Color.valueOf("91a4ff"), Color.white};
|
||||||
}},
|
}},
|
||||||
Liquids.cyanogen, new ContinuousFlameBulletType(){{
|
Liquids.cyanogen, new ContinuousFlameBulletType(){{
|
||||||
damage = 200f;
|
damage = 160f;
|
||||||
rangeChange = 70f;
|
rangeChange = 70f;
|
||||||
length = r + rangeChange;
|
length = r + rangeChange;
|
||||||
knockback = 2f;
|
knockback = 2f;
|
||||||
pierceCap = 4;
|
pierceCap = 3;
|
||||||
buildingDamageMultiplier = 0.3f;
|
buildingDamageMultiplier = 0.3f;
|
||||||
|
|
||||||
colors = new Color[]{Color.valueOf("465ab8").a(0.55f), Color.valueOf("66a6d2").a(0.7f), Color.valueOf("89e8b6").a(0.8f), Color.valueOf("cafcbe"), Color.white};
|
colors = new Color[]{Color.valueOf("465ab8").a(0.55f), Color.valueOf("66a6d2").a(0.7f), Color.valueOf("89e8b6").a(0.8f), Color.valueOf("cafcbe"), Color.white};
|
||||||
|
|||||||
@@ -2261,7 +2261,7 @@ public class UnitTypes{
|
|||||||
bullet = new EmpBulletType(){{
|
bullet = new EmpBulletType(){{
|
||||||
float rad = 100f;
|
float rad = 100f;
|
||||||
|
|
||||||
scaleVelocity = true;
|
scaleLife = true;
|
||||||
lightOpacity = 0.7f;
|
lightOpacity = 0.7f;
|
||||||
unitDamageScl = 0.8f;
|
unitDamageScl = 0.8f;
|
||||||
healPercent = 20f;
|
healPercent = 20f;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class ArtilleryBulletType extends BasicBulletType{
|
|||||||
collidesTiles = false;
|
collidesTiles = false;
|
||||||
collides = false;
|
collides = false;
|
||||||
collidesAir = false;
|
collidesAir = false;
|
||||||
scaleVelocity = true;
|
scaleLife = true;
|
||||||
hitShake = 1f;
|
hitShake = 1f;
|
||||||
hitSound = Sounds.explosion;
|
hitSound = Sounds.explosion;
|
||||||
hitEffect = Fx.flakExplosion;
|
hitEffect = Fx.flakExplosion;
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public class BulletType extends Content implements Cloneable{
|
|||||||
/** Whether velocity is inherited from the shooter. */
|
/** Whether velocity is inherited from the shooter. */
|
||||||
public boolean keepVelocity = true;
|
public boolean keepVelocity = true;
|
||||||
/** Whether to scale lifetime (not actually velocity!) to disappear at the target position. Used for artillery. */
|
/** Whether to scale lifetime (not actually velocity!) to disappear at the target position. Used for artillery. */
|
||||||
public boolean scaleVelocity;
|
public boolean scaleLife;
|
||||||
/** Whether this bullet can be hit by point defense. */
|
/** Whether this bullet can be hit by point defense. */
|
||||||
public boolean hittable = true;
|
public boolean hittable = true;
|
||||||
/** Whether this bullet can be reflected. */
|
/** Whether this bullet can be reflected. */
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class PointBulletType extends BulletType{
|
|||||||
public float trailSpacing = 10f;
|
public float trailSpacing = 10f;
|
||||||
|
|
||||||
public PointBulletType(){
|
public PointBulletType(){
|
||||||
scaleVelocity = true;
|
scaleLife = true;
|
||||||
lifetime = 100f;
|
lifetime = 100f;
|
||||||
collides = false;
|
collides = false;
|
||||||
keepVelocity = false;
|
keepVelocity = false;
|
||||||
|
|||||||
@@ -94,8 +94,6 @@ public class ContentParser{
|
|||||||
if(data.isString()){
|
if(data.isString()){
|
||||||
StatusEffect result = locate(ContentType.status, data.asString());
|
StatusEffect result = locate(ContentType.status, data.asString());
|
||||||
if(result != null) return result;
|
if(result != null) return result;
|
||||||
result = (StatusEffect)fieldOpt(StatusEffects.class, data);
|
|
||||||
if(result != null) return result;
|
|
||||||
throw new IllegalArgumentException("Unknown status effect: '" + data.asString() + "'");
|
throw new IllegalArgumentException("Unknown status effect: '" + data.asString() + "'");
|
||||||
}
|
}
|
||||||
StatusEffect effect = new StatusEffect(currentMod.name + "-" + data.getString("name"));
|
StatusEffect effect = new StatusEffect(currentMod.name + "-" + data.getString("name"));
|
||||||
|
|||||||
@@ -399,7 +399,7 @@ public class Weapon implements Cloneable{
|
|||||||
bulletX = mountX + Angles.trnsx(weaponRotation, this.shootX + xOffset, this.shootY + yOffset),
|
bulletX = mountX + Angles.trnsx(weaponRotation, this.shootX + xOffset, this.shootY + yOffset),
|
||||||
bulletY = mountY + Angles.trnsy(weaponRotation, this.shootX + xOffset, this.shootY + yOffset),
|
bulletY = mountY + Angles.trnsy(weaponRotation, this.shootX + xOffset, this.shootY + yOffset),
|
||||||
shootAngle = bulletRotation(unit, mount, bulletX, bulletY) + angleOffset,
|
shootAngle = bulletRotation(unit, mount, bulletX, bulletY) + angleOffset,
|
||||||
lifeScl = bullet.scaleVelocity ? Mathf.clamp(Mathf.dst(shootX, shootY, mount.aimX, mount.aimY) / bullet.range) : 1f,
|
lifeScl = bullet.scaleLife ? Mathf.clamp(Mathf.dst(bulletX, bulletY, mount.aimX, mount.aimY) / bullet.range) : 1f,
|
||||||
angle = angleOffset + shootAngle + Mathf.range(inaccuracy);
|
angle = angleOffset + shootAngle + Mathf.range(inaccuracy);
|
||||||
|
|
||||||
mount.bullet = bullet.create(unit, unit.team, bulletX, bulletY, angle, -1f, (1f - velocityRnd) + Mathf.random(velocityRnd), lifeScl, null, mover, mount.aimX, mount.aimY);
|
mount.bullet = bullet.create(unit, unit.team, bulletX, bulletY, angle, -1f, (1f - velocityRnd) + Mathf.random(velocityRnd), lifeScl, null, mover, mount.aimX, mount.aimY);
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class ConstructBlock extends Block{
|
|||||||
@Remote(called = Loc.server)
|
@Remote(called = Loc.server)
|
||||||
public static void deconstructFinish(Tile tile, Block block, Unit builder){
|
public static void deconstructFinish(Tile tile, Block block, Unit builder){
|
||||||
Team team = tile.team();
|
Team team = tile.team();
|
||||||
if(fogControl.isVisibleTile(player.team(), tile.x, tile.y)){
|
if(fogControl.isVisibleTile(team, tile.x, tile.y)){
|
||||||
block.breakEffect.at(tile.drawx(), tile.drawy(), block.size, block.mapColor);
|
block.breakEffect.at(tile.drawx(), tile.drawy(), block.size, block.mapColor);
|
||||||
if(shouldPlay()) block.breakSound.at(tile, block.breakPitchChange ? calcPitch(false) : 1f);
|
if(shouldPlay()) block.breakSound.at(tile, block.breakPitchChange ? calcPitch(false) : 1f);
|
||||||
}
|
}
|
||||||
@@ -98,7 +98,7 @@ public class ConstructBlock extends Block{
|
|||||||
tile.build.playerPlaced(config);
|
tile.build.playerPlaced(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fogControl.isVisibleTile(player.team(), tile.x, tile.y)){
|
if(fogControl.isVisibleTile(team, tile.x, tile.y)){
|
||||||
Fx.placeBlock.at(tile.drawx(), tile.drawy(), block.size);
|
Fx.placeBlock.at(tile.drawx(), tile.drawy(), block.size);
|
||||||
if(shouldPlay()) block.placeSound.at(tile, block.placePitchChange ? calcPitch(true) : 1f);
|
if(shouldPlay()) block.placeSound.at(tile, block.placePitchChange ? calcPitch(true) : 1f);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -500,7 +500,7 @@ public class Turret extends ReloadTurret{
|
|||||||
bulletY = y + Angles.trnsy(rotation - 90, shootX + xOffset, shootY + yOffset),
|
bulletY = y + Angles.trnsy(rotation - 90, shootX + xOffset, shootY + yOffset),
|
||||||
shootAngle = rotation + angleOffset + Mathf.range(inaccuracy);
|
shootAngle = rotation + angleOffset + Mathf.range(inaccuracy);
|
||||||
|
|
||||||
float lifeScl = type.scaleVelocity ? Mathf.clamp(Mathf.dst(bulletX, bulletY, targetPos.x, targetPos.y) / type.range, minRange / type.range, range() / type.range) : 1f;
|
float lifeScl = type.scaleLife ? Mathf.clamp(Mathf.dst(bulletX, bulletY, targetPos.x, targetPos.y) / type.range, minRange / type.range, range() / type.range) : 1f;
|
||||||
|
|
||||||
//TODO aimX / aimY for multi shot turrets?
|
//TODO aimX / aimY for multi shot turrets?
|
||||||
handleBullet(type.create(this, team, bulletX, bulletY, shootAngle, -1f, 1f + Mathf.range(velocityInaccuracy), lifeScl, null, mover, targetPos.x, targetPos.y), xOffset, yOffset, angleOffset);
|
handleBullet(type.create(this, team, bulletX, bulletY, shootAngle, -1f, 1f + Mathf.range(velocityInaccuracy), lifeScl, null, mover, targetPos.x, targetPos.y), xOffset, yOffset, angleOffset);
|
||||||
|
|||||||
Reference in New Issue
Block a user