Javelin abilities
This commit is contained in:
@@ -255,14 +255,60 @@ public class Mechs implements ContentList{
|
||||
trailColor = Palette.lightTrail;
|
||||
}};
|
||||
|
||||
javelin = new Mech("javelin-ship", true){{
|
||||
drillPower = -1;
|
||||
speed = 0.4f;
|
||||
maxSpeed = 3.6f;
|
||||
drag = 0.09f;
|
||||
weapon = Weapons.missiles;
|
||||
trailColor = Color.valueOf("d3ddff");
|
||||
}};
|
||||
javelin = new Mech("javelin-ship", true){
|
||||
float minV = 3.6f;
|
||||
float maxV = 6f;
|
||||
TextureRegion shield;
|
||||
{
|
||||
drillPower = -1;
|
||||
speed = 0.11f;
|
||||
maxSpeed = 3.4f;
|
||||
drag = 0.01f;
|
||||
weapon = Weapons.missiles;
|
||||
trailColor = Color.valueOf("d3ddff");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
super.load();
|
||||
shield = Draw.region(name + "-shield");
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getRotationAlpha(Player player){
|
||||
return 0.5f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAlt(Player player){
|
||||
float scl = scld(player);
|
||||
if(Mathf.chance(Timers.delta() * (0.15*scl))){
|
||||
Effects.effect(BulletFx.hitLancer, Palette.lancerLaser, player.x, player.y);
|
||||
Lightning.create(player.getTeam(), BulletFx.hitLancer, Palette.lancerLaser, 10f,
|
||||
player.x + player.getVelocity().x, player.y + player.getVelocity().y, player.rotation, 14);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Player player){
|
||||
float scl = scld(player);
|
||||
if(scl < 0.01f) return;
|
||||
float alpha = Core.batch.getColor().a;
|
||||
Graphics.shader();
|
||||
Graphics.setAdditiveBlending();
|
||||
Draw.color(Palette.lancerLaser);
|
||||
Draw.alpha(scl/2f);
|
||||
Draw.rect(shield, player.snappedX() + Mathf.range(scl/2f), player.snappedY() + Mathf.range(scl/2f), player.rotation - 90);
|
||||
Graphics.setNormalBlending();
|
||||
Graphics.shader(Shaders.mix);
|
||||
Draw.color();
|
||||
Draw.alpha(alpha);
|
||||
}
|
||||
|
||||
float scld(Player player){
|
||||
return Mathf.clamp((player.getVelocity().len() - minV) / (maxV - minV));
|
||||
}
|
||||
};
|
||||
|
||||
trident = new Mech("trident-ship", true){{
|
||||
drillPower = 1;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class Weapons implements ContentList{
|
||||
|
||||
healBlaster = new Weapon("heal-blaster"){{
|
||||
length = 1.5f;
|
||||
reload = 30f;
|
||||
reload = 24f;
|
||||
roundrobin = false;
|
||||
ejectEffect = Fx.none;
|
||||
recoil = 2f;
|
||||
@@ -41,12 +41,14 @@ public class Weapons implements ContentList{
|
||||
|
||||
missiles = new Weapon("missiles"){{
|
||||
length = 1.5f;
|
||||
reload = 40f;
|
||||
shots = 2;
|
||||
inaccuracy = 10f;
|
||||
reload = 60f;
|
||||
shots = 4;
|
||||
inaccuracy = 2f;
|
||||
roundrobin = false;
|
||||
roundrobin = true;
|
||||
ejectEffect = Fx.none;
|
||||
velocityRnd = 0.2f;
|
||||
spacing = 1f;
|
||||
ammo = AmmoTypes.weaponMissile;
|
||||
}};
|
||||
|
||||
@@ -55,6 +57,7 @@ public class Weapons implements ContentList{
|
||||
recoil = 4f;
|
||||
reload = 60f;
|
||||
shots = 4;
|
||||
spacing = 8f;
|
||||
inaccuracy = 8f;
|
||||
roundrobin = false;
|
||||
roundrobin = true;
|
||||
|
||||
@@ -2,10 +2,13 @@ package io.anuke.mindustry.content.bullets;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import io.anuke.mindustry.content.fx.BulletFx;
|
||||
import io.anuke.mindustry.entities.bullet.Bullet;
|
||||
import io.anuke.mindustry.entities.bullet.BulletType;
|
||||
import io.anuke.mindustry.entities.bullet.MissileBulletType;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.mindustry.type.ContentList;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
public class MissileBullets extends BulletList implements ContentList{
|
||||
public static BulletType explosive, incindiary, surge, javelin, swarm;
|
||||
@@ -52,18 +55,27 @@ public class MissileBullets extends BulletList implements ContentList{
|
||||
}
|
||||
};
|
||||
|
||||
javelin = new MissileBulletType(2.5f, 14, "missile"){
|
||||
javelin = new MissileBulletType(5f, 10.5f, "missile"){
|
||||
{
|
||||
bulletWidth = 8f;
|
||||
bulletHeight = 8f;
|
||||
bulletShrink = 0f;
|
||||
drag = -0.02f;
|
||||
drag = -0.003f;
|
||||
keepVelocity = false;
|
||||
splashDamageRadius = 25f;
|
||||
splashDamage = 11f;
|
||||
splashDamageRadius = 20f;
|
||||
splashDamage = 3f;
|
||||
lifetime = 90f;
|
||||
trailColor = Color.valueOf("b6c6fd");
|
||||
hiteffect = BulletFx.blastExplosion;
|
||||
despawneffect = BulletFx.blastExplosion;
|
||||
backColor = Palette.bulletYellowBack;
|
||||
frontColor = Palette.bulletYellow;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Bullet b){
|
||||
super.update(b);
|
||||
b.getVelocity().rotate(Mathf.sin(Timers.time() + b.id * 4422, 8f, 2f));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -84,6 +96,12 @@ public class MissileBullets extends BulletList implements ContentList{
|
||||
hiteffect = BulletFx.blastExplosion;
|
||||
despawneffect = BulletFx.blastExplosion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Bullet b){
|
||||
super.update(b);
|
||||
b.getVelocity().rotate(Mathf.sin(Timers.time() + b.id * 4422, 8f, 2f));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class TurretBullets extends BulletList implements ContentList{
|
||||
public void load(){
|
||||
|
||||
healBullet = new BulletType(5.2f, 19){
|
||||
float healAmount = 20f;
|
||||
float healAmount = 21f;
|
||||
|
||||
{
|
||||
hiteffect = BulletFx.hitLaser;
|
||||
|
||||
Reference in New Issue
Block a user