Prototyping mechs
This commit is contained in:
@@ -590,22 +590,10 @@ public class Bullets implements ContentList{
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
arc = new BulletType(0.001f, 21){
|
arc = new LightningBulletType(){{
|
||||||
{
|
damage = 21;
|
||||||
lifetime = 1;
|
lightningLength = 25;
|
||||||
despawnEffect = Fx.none;
|
}};
|
||||||
hitEffect = Fx.hitLancer;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void draw(Bullet b){
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init(Bullet b){
|
|
||||||
Lightning.create(b.getTeam(), Pal.lancerLaser, damage, b.x, b.y, b.rot(), 25);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
driverBolt = new MassDriverBolt();
|
driverBolt = new MassDriverBolt();
|
||||||
|
|
||||||
|
|||||||
@@ -51,16 +51,15 @@ public class Mechs implements ContentList{
|
|||||||
ejectEffect = Fx.none;
|
ejectEffect = Fx.none;
|
||||||
bullet = new HealBulletType(){{
|
bullet = new HealBulletType(){{
|
||||||
healPercent = 3f;
|
healPercent = 3f;
|
||||||
//TODO decide on color or remove healing properties
|
backColor = engineColor;
|
||||||
//backColor = engineColor;
|
|
||||||
homingPower = 20f;
|
homingPower = 20f;
|
||||||
bulletHeight = 4f;
|
bulletHeight = 4f;
|
||||||
bulletWidth = 1.5f;
|
bulletWidth = 1.5f;
|
||||||
damage = 3f;
|
damage = 3f;
|
||||||
speed = 4f;
|
speed = 4f;
|
||||||
lifetime = 40f;
|
lifetime = 40f;
|
||||||
//shootEffect = Fx.shootHealYellow;
|
shootEffect = Fx.shootHealYellow;
|
||||||
//smokeEffect = hitEffect = despawnEffect = Fx.hitYellowLaser;
|
smokeEffect = hitEffect = despawnEffect = Fx.hitYellowLaser;
|
||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
@@ -74,7 +73,7 @@ public class Mechs implements ContentList{
|
|||||||
public void updateAlt(Player player){
|
public void updateAlt(Player player){
|
||||||
if(player.timer.get(Player.timerAbility, healReload)){
|
if(player.timer.get(Player.timerAbility, healReload)){
|
||||||
if(indexer.eachBlock(player, healRange, other -> other.entity.damaged(), other -> {
|
if(indexer.eachBlock(player, healRange, other -> other.entity.damaged(), other -> {
|
||||||
other.entity.healBy(other.entity.maxHealth() * healPercent);
|
other.entity.healBy(other.entity.maxHealth() * healPercent / 100f);
|
||||||
Effects.effect(Fx.healBlockFull, Pal.heal, other.drawx(), other.drawy(), other.block().size);
|
Effects.effect(Fx.healBlockFull, Pal.heal, other.drawx(), other.drawy(), other.block().size);
|
||||||
})){
|
})){
|
||||||
Effects.effect(Fx.healWave, player);
|
Effects.effect(Fx.healWave, player);
|
||||||
@@ -138,10 +137,17 @@ public class Mechs implements ContentList{
|
|||||||
|
|
||||||
weapon = new Weapon("flamethrower"){{
|
weapon = new Weapon("flamethrower"){{
|
||||||
length = 1.5f;
|
length = 1.5f;
|
||||||
reload = 10f;
|
reload = 30f;
|
||||||
width = 4f;
|
width = 4f;
|
||||||
alternate = true;
|
alternate = true;
|
||||||
bullet = Bullets.basicFlame;
|
shots = 3;
|
||||||
|
inaccuracy = 40f;
|
||||||
|
shootSound = Sounds.spark;
|
||||||
|
bullet = new LightningBulletType(){{
|
||||||
|
damage = 5;
|
||||||
|
lightningLength = 10;
|
||||||
|
lightningColor = Pal.lightFlame;
|
||||||
|
}};
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package io.anuke.mindustry.entities.bullet;
|
||||||
|
|
||||||
|
import io.anuke.arc.graphics.*;
|
||||||
|
import io.anuke.mindustry.content.*;
|
||||||
|
import io.anuke.mindustry.entities.effect.*;
|
||||||
|
import io.anuke.mindustry.entities.type.*;
|
||||||
|
import io.anuke.mindustry.graphics.*;
|
||||||
|
|
||||||
|
public class LightningBulletType extends BulletType{
|
||||||
|
protected Color lightningColor = Pal.lancerLaser;
|
||||||
|
protected int lightningLength = 25;
|
||||||
|
|
||||||
|
public LightningBulletType(){
|
||||||
|
super(0.0001f, 1f);
|
||||||
|
|
||||||
|
lifetime = 1;
|
||||||
|
despawnEffect = Fx.none;
|
||||||
|
hitEffect = Fx.hitLancer;
|
||||||
|
keepVelocity = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void draw(Bullet b){
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(Bullet b){
|
||||||
|
Lightning.create(b.getTeam(), lightningColor, damage, b.x, b.y, b.rot(), lightningLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,9 +24,7 @@ import io.anuke.mindustry.io.*;
|
|||||||
import io.anuke.mindustry.net.Administration.*;
|
import io.anuke.mindustry.net.Administration.*;
|
||||||
import io.anuke.mindustry.net.*;
|
import io.anuke.mindustry.net.*;
|
||||||
import io.anuke.mindustry.type.*;
|
import io.anuke.mindustry.type.*;
|
||||||
import io.anuke.mindustry.type.TypeID;
|
|
||||||
import io.anuke.mindustry.ui.*;
|
import io.anuke.mindustry.ui.*;
|
||||||
import io.anuke.mindustry.ui.Cicon;
|
|
||||||
import io.anuke.mindustry.world.*;
|
import io.anuke.mindustry.world.*;
|
||||||
import io.anuke.mindustry.world.blocks.*;
|
import io.anuke.mindustry.world.blocks.*;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user