Reduced spirit factory to 1 drone, 2x power
This commit is contained in:
@@ -1631,18 +1631,18 @@ public class Blocks implements ContentList{
|
|||||||
produceTime = 2500;
|
produceTime = 2500;
|
||||||
size = 2;
|
size = 2;
|
||||||
maxSpawn = 1;
|
maxSpawn = 1;
|
||||||
consumes.power(1.1f);
|
consumes.power(1.2f);
|
||||||
consumes.items();
|
consumes.items();
|
||||||
}};
|
}};
|
||||||
|
|
||||||
spiritFactory = new UnitFactory("spirit-factory"){{
|
spiritFactory = new UnitFactory("spirit-factory"){{
|
||||||
requirements(Category.units, ItemStack.with(Items.metaglass, 45, Items.lead, 55, Items.silicon, 45));
|
requirements(Category.units, ItemStack.with(Items.metaglass, 45, Items.lead, 55, Items.silicon, 45));
|
||||||
type = UnitTypes.spirit;
|
type = UnitTypes.spirit;
|
||||||
produceTime = 3500;
|
produceTime = 4000;
|
||||||
size = 2;
|
size = 2;
|
||||||
maxSpawn = 2;
|
maxSpawn = 1;
|
||||||
consumes.power(0.80f);
|
consumes.power(1.2f);
|
||||||
consumes.items(new ItemStack(Items.silicon, 15), new ItemStack(Items.lead, 15));
|
consumes.items(new ItemStack(Items.silicon, 30), new ItemStack(Items.lead, 30));
|
||||||
}};
|
}};
|
||||||
|
|
||||||
phantomFactory = new UnitFactory("phantom-factory"){{
|
phantomFactory = new UnitFactory("phantom-factory"){{
|
||||||
|
|||||||
@@ -8,11 +8,9 @@ import io.anuke.mindustry.entities.*;
|
|||||||
import io.anuke.mindustry.entities.bullet.*;
|
import io.anuke.mindustry.entities.bullet.*;
|
||||||
import io.anuke.mindustry.entities.effect.*;
|
import io.anuke.mindustry.entities.effect.*;
|
||||||
import io.anuke.mindustry.entities.type.*;
|
import io.anuke.mindustry.entities.type.*;
|
||||||
import io.anuke.mindustry.entities.type.Bullet;
|
|
||||||
import io.anuke.mindustry.game.*;
|
import io.anuke.mindustry.game.*;
|
||||||
import io.anuke.mindustry.graphics.*;
|
import io.anuke.mindustry.graphics.*;
|
||||||
import io.anuke.mindustry.world.*;
|
import io.anuke.mindustry.world.*;
|
||||||
import io.anuke.mindustry.world.blocks.*;
|
|
||||||
|
|
||||||
import static io.anuke.mindustry.Vars.*;
|
import static io.anuke.mindustry.Vars.*;
|
||||||
|
|
||||||
@@ -39,7 +37,7 @@ public class Bullets implements ContentList{
|
|||||||
waterShot, cryoShot, slagShot, oilShot,
|
waterShot, cryoShot, slagShot, oilShot,
|
||||||
|
|
||||||
//environment, misc.
|
//environment, misc.
|
||||||
fireball, basicFlame, pyraFlame, driverBolt, healBullet, frag, eruptorShot,
|
fireball, basicFlame, pyraFlame, driverBolt, healBullet, healBulletBig, frag, eruptorShot,
|
||||||
|
|
||||||
//bombs
|
//bombs
|
||||||
bombExplosive, bombIncendiary, bombOil;
|
bombExplosive, bombIncendiary, bombOil;
|
||||||
@@ -376,43 +374,13 @@ public class Bullets implements ContentList{
|
|||||||
statusDuration = 10f;
|
statusDuration = 10f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
healBullet = new BulletType(5.2f, 13){
|
healBullet = new HealBulletType(5.2f, 13){{
|
||||||
float healPercent = 3f;
|
healPercent = 3f;
|
||||||
|
}};
|
||||||
|
|
||||||
{
|
healBulletBig = new HealBulletType(5.2f, 15){{
|
||||||
shootEffect = Fx.shootHeal;
|
healPercent = 5.5f;
|
||||||
smokeEffect = Fx.hitLaser;
|
}};
|
||||||
hitEffect = Fx.hitLaser;
|
|
||||||
despawnEffect = Fx.hitLaser;
|
|
||||||
collidesTeam = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean collides(Bullet b, Tile tile){
|
|
||||||
return tile.getTeam() != b.getTeam() || tile.entity.healthf() < 1f;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void draw(Bullet b){
|
|
||||||
Draw.color(Pal.heal);
|
|
||||||
Lines.stroke(2f);
|
|
||||||
Lines.lineAngleCenter(b.x, b.y, b.rot(), 7f);
|
|
||||||
Draw.color(Color.white);
|
|
||||||
Lines.lineAngleCenter(b.x, b.y, b.rot(), 3f);
|
|
||||||
Draw.reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void hitTile(Bullet b, Tile tile){
|
|
||||||
super.hit(b);
|
|
||||||
tile = tile.link();
|
|
||||||
|
|
||||||
if(tile.entity != null && tile.getTeam() == b.getTeam() && !(tile.block() instanceof BuildBlock)){
|
|
||||||
Effects.effect(Fx.healBlockFull, Pal.heal, tile.drawx(), tile.drawy(), tile.block().size);
|
|
||||||
tile.entity.healBy(healPercent / 100f * tile.entity.maxHealth());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
fireball = new BulletType(1f, 4){
|
fireball = new BulletType(1f, 4){
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,10 +35,10 @@ public class UnitTypes implements ContentList{
|
|||||||
spirit = new UnitType("spirit", Spirit::new){{
|
spirit = new UnitType("spirit", Spirit::new){{
|
||||||
flying = true;
|
flying = true;
|
||||||
drag = 0.01f;
|
drag = 0.01f;
|
||||||
speed = 0.4f;
|
speed = 0.42f;
|
||||||
maxVelocity = 1.6f;
|
maxVelocity = 1.6f;
|
||||||
range = 50f;
|
range = 50f;
|
||||||
health = 60;
|
health = 100;
|
||||||
engineSize = 1.8f;
|
engineSize = 1.8f;
|
||||||
engineOffset = 5.7f;
|
engineOffset = 5.7f;
|
||||||
weapon = new Weapon("heal-blaster"){{
|
weapon = new Weapon("heal-blaster"){{
|
||||||
@@ -48,7 +48,7 @@ public class UnitTypes implements ContentList{
|
|||||||
roundrobin = true;
|
roundrobin = true;
|
||||||
ejectEffect = Fx.none;
|
ejectEffect = Fx.none;
|
||||||
recoil = 2f;
|
recoil = 2f;
|
||||||
bullet = Bullets.healBullet;
|
bullet = Bullets.healBulletBig;
|
||||||
shootSound = Sounds.pew;
|
shootSound = Sounds.pew;
|
||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package io.anuke.mindustry.entities.bullet;
|
||||||
|
|
||||||
|
import io.anuke.arc.graphics.*;
|
||||||
|
import io.anuke.arc.graphics.g2d.*;
|
||||||
|
import io.anuke.mindustry.content.*;
|
||||||
|
import io.anuke.mindustry.entities.*;
|
||||||
|
import io.anuke.mindustry.entities.type.*;
|
||||||
|
import io.anuke.mindustry.graphics.*;
|
||||||
|
import io.anuke.mindustry.world.*;
|
||||||
|
import io.anuke.mindustry.world.blocks.*;
|
||||||
|
|
||||||
|
public class HealBulletType extends BulletType{
|
||||||
|
protected float healPercent = 3f;
|
||||||
|
|
||||||
|
public HealBulletType(float speed, float damage){
|
||||||
|
super(speed, damage);
|
||||||
|
|
||||||
|
shootEffect = Fx.shootHeal;
|
||||||
|
smokeEffect = Fx.hitLaser;
|
||||||
|
hitEffect = Fx.hitLaser;
|
||||||
|
despawnEffect = Fx.hitLaser;
|
||||||
|
collidesTeam = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean collides(Bullet b, Tile tile){
|
||||||
|
return tile.getTeam() != b.getTeam() || tile.entity.healthf() < 1f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void draw(Bullet b){
|
||||||
|
Draw.color(Pal.heal);
|
||||||
|
Lines.stroke(2f);
|
||||||
|
Lines.lineAngleCenter(b.x, b.y, b.rot(), 7f);
|
||||||
|
Draw.color(Color.white);
|
||||||
|
Lines.lineAngleCenter(b.x, b.y, b.rot(), 3f);
|
||||||
|
Draw.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void hitTile(Bullet b, Tile tile){
|
||||||
|
super.hit(b);
|
||||||
|
tile = tile.link();
|
||||||
|
|
||||||
|
if(tile.entity != null && tile.getTeam() == b.getTeam() && !(tile.block() instanceof BuildBlock)){
|
||||||
|
Effects.effect(Fx.healBlockFull, Pal.heal, tile.drawx(), tile.drawy(), tile.block().size);
|
||||||
|
tile.entity.healBy(healPercent / 100f * tile.entity.maxHealth());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,9 +28,7 @@ public class ItemsDisplay extends Table{
|
|||||||
|
|
||||||
table(Tex.button,t -> {
|
table(Tex.button,t -> {
|
||||||
t.margin(10).marginLeft(15).marginTop(15f);
|
t.margin(10).marginLeft(15).marginTop(15f);
|
||||||
t.add("$launcheditems").colspan(3).left();
|
t.label(() -> state.is(State.menu) ? "$launcheditems" : "$launchinfo").colspan(3).padBottom(4).left().colspan(3).width(210f).wrap();
|
||||||
t.row();
|
|
||||||
t.label(() -> state.is(State.menu) ? "" : "$launchinfo").colspan(3).width(210f).wrap().padBottom(4).left();
|
|
||||||
t.row();
|
t.row();
|
||||||
for(Item item : content.items()){
|
for(Item item : content.items()){
|
||||||
if(item.type == ItemType.material && data.isUnlocked(item)){
|
if(item.type == ItemType.material && data.isUnlocked(item)){
|
||||||
|
|||||||
Reference in New Issue
Block a user