mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-09 20:29:06 +07:00
Weapon occlusion / Balancing
This commit is contained in:
parent
60ce8ca935
commit
521e3c773f
@ -672,7 +672,7 @@ public class UnitTypes implements ContentList{
|
||||
speed = 1.1f;
|
||||
drag = 0.13f;
|
||||
hitsize = 9f;
|
||||
health = 220;
|
||||
health = 280;
|
||||
accel = 0.4f;
|
||||
rotateSpeed = 3.3f;
|
||||
immunities = ObjectSet.with(StatusEffects.wet);
|
||||
@ -717,10 +717,10 @@ public class UnitTypes implements ContentList{
|
||||
}};
|
||||
|
||||
minke = new UnitType("minke"){{
|
||||
health = 600;
|
||||
speed = 0.9f;
|
||||
drag = 0.15f;
|
||||
hitsize = 11f;
|
||||
health = 430;
|
||||
armor = 4f;
|
||||
accel = 0.3f;
|
||||
rotateSpeed = 2.6f;
|
||||
@ -758,12 +758,13 @@ public class UnitTypes implements ContentList{
|
||||
}};
|
||||
|
||||
bryde = new UnitType("bryde"){{
|
||||
health = 900;
|
||||
speed = 0.85f;
|
||||
accel = 0.2f;
|
||||
rotateSpeed = 1.8f;
|
||||
drag = 0.17f;
|
||||
hitsize = 14f;
|
||||
health = 130;
|
||||
armor = 6f;
|
||||
immunities = ObjectSet.with(StatusEffects.wet);
|
||||
|
||||
trailLength = 22;
|
||||
@ -771,18 +772,19 @@ public class UnitTypes implements ContentList{
|
||||
trailY = -9f;
|
||||
trailScl = 1.5f;
|
||||
|
||||
abilities.add(new HealFieldAbility(22f, 60f * 5, 70f));
|
||||
abilities.add(new HealFieldAbility(22f, 60f * 4, 70f), new ShieldFieldAbility(20f, 40f, 60f * 4, 60f));
|
||||
|
||||
weapons.add(new Weapon("large-artillery"){{
|
||||
reload = 60f;
|
||||
reload = 65f;
|
||||
mirror = false;
|
||||
x = 0f;
|
||||
y = -2.5f;
|
||||
y = -3.5f;
|
||||
rotateSpeed = 1.7f;
|
||||
rotate = true;
|
||||
shootY = 7f;
|
||||
shake = 5f;
|
||||
recoil = 4f;
|
||||
occlusion = 17f;
|
||||
|
||||
shots = 1;
|
||||
inaccuracy = 3f;
|
||||
@ -799,7 +801,7 @@ public class UnitTypes implements ContentList{
|
||||
collidesTiles = false;
|
||||
ammoMultiplier = 4f;
|
||||
splashDamageRadius = 60f;
|
||||
splashDamage = 75f;
|
||||
splashDamage = 85f;
|
||||
backColor = Pal.missileYellowBack;
|
||||
frontColor = Pal.missileYellow;
|
||||
trailEffect = Fx.artilleryTrail;
|
||||
@ -818,6 +820,8 @@ public class UnitTypes implements ContentList{
|
||||
x = 8.5f;
|
||||
y = -9f;
|
||||
|
||||
occlusion = 6f;
|
||||
|
||||
rotateSpeed = 4f;
|
||||
rotate = true;
|
||||
shots = 2;
|
||||
|
@ -381,10 +381,14 @@ public class UnitType extends UnlockableContent{
|
||||
float weaponRotation = rotation + (weapon.rotate ? mount.rotation : 0);
|
||||
float width = weapon.region.getWidth();
|
||||
float recoil = -((mount.reload) / weapon.reload * weapon.recoil);
|
||||
float wx = unit.x + Angles.trnsx(rotation, weapon.x, weapon.y) + Angles.trnsx(weaponRotation, 0, recoil),
|
||||
wy = unit.y + Angles.trnsy(rotation, weapon.x, weapon.y) + Angles.trnsy(weaponRotation, 0, recoil);
|
||||
|
||||
Draw.rect(weapon.region,
|
||||
unit.x + Angles.trnsx(rotation, weapon.x, weapon.y) + Angles.trnsx(weaponRotation, 0, recoil),
|
||||
unit.y + Angles.trnsy(rotation, weapon.x, weapon.y) + Angles.trnsy(weaponRotation, 0, recoil),
|
||||
if(weapon.occlusion > 0){
|
||||
Drawf.shadow(wx, wy, weapon.occlusion);
|
||||
}
|
||||
|
||||
Draw.rect(weapon.region, wx, wy,
|
||||
width * Draw.scl * -Mathf.sign(weapon.flipSprite),
|
||||
weapon.region.getHeight() * Draw.scl,
|
||||
weaponRotation);
|
||||
|
@ -43,6 +43,8 @@ public class Weapon{
|
||||
public float shootX = 0f, shootY = 3f;
|
||||
/** offsets of weapon position on unit */
|
||||
public float x = 5f, y = 0f;
|
||||
/** radius of occlusion drawn under the weapon; <0 to diable */
|
||||
public float occlusion = -1f;
|
||||
/** fraction of velocity that is random */
|
||||
public float velocityRnd = 0f;
|
||||
/** delay in ticks between shots */
|
||||
|
Loading…
Reference in New Issue
Block a user