Skip to content

Commit

Permalink
"Bug sentry" sprite, Sticker nerf, Sticky fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Slotterleet committed Jun 10, 2024
1 parent 7ae1170 commit 16d4070
Show file tree
Hide file tree
Showing 37 changed files with 52 additions and 10 deletions.
Binary file added res/sprites/blocks/turrets/bases/clear-block-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/sprites/blocks/turrets/bug-sentry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
37 changes: 33 additions & 4 deletions src/fos/content/FOSBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ luminium, new BasicBulletType(){{
outlineColor = Color.valueOf("302326");
shootSound = Sounds.mud;
squareSprite = false;
consumeLiquid(tokicite, 0.1f);
consumeLiquid(tokicite, 0.2f);
ammo(
tin, new StickyBulletType(8f, 20, 90){{
lifetime = 45f;
Expand All @@ -583,7 +583,7 @@ tin, new StickyBulletType(8f, 20, 90){{
frontColor = FOSPal.tokicite;
ammoMultiplier = 2f;
scaleLife = true;
splashDamage = 80;
splashDamage = 60;
splashDamageRadius = 12f;
buildingDamageMultiplier = 0.3f;
}},
Expand All @@ -595,8 +595,8 @@ diamond, new StickyBulletType(8f, 60, 90){{
frontColor = FOSPal.tokicite;
ammoMultiplier = 3f;
scaleLife = true;
splashDamage = 100;
splashDamageRadius = 16f;
splashDamage = 75;
splashDamageRadius = 8f;
buildingDamageMultiplier = 0.3f;
}}
);
Expand Down Expand Up @@ -1218,9 +1218,28 @@ diamond, new MissileBulletType(5f, 5){{
shootY = 0f;
reload = 5;
range = 320;
recoil = 0f;
shootEffect = smokeEffect = Fx.none;
shootSound = Sounds.none;
loopSound = FOSSounds.buzz;

shoot = new ShootBarrel(){{
barrels = new float[]{
//there's a lot of holes scattered across the whole nest.
-3f, 3f, 0,
2f, 4f, 0,
-5.5f, 3.75f, 0,
5.5f, 3.5f, 0,
-5.25f, 1f, 0,
3f, 1f, 0,
-2.5f, -1.75f, 0,
5.5f, -3f, 0,
3.25f, -3.5f, 0,
-3.5f, -3.5f, 0,
-1.5f, -3.75f, 0f
};
}};

shootType = new BasicBulletType(){{
width = 6; height = 12;
speed = 3; lifetime = 120;
Expand All @@ -1237,6 +1256,11 @@ diamond, new MissileBulletType(5f, 5){{
trailLength = 4;
trailWidth = 1;
}};

drawer = new DrawTurret("clear-");
drawTeamOverlay = false;
outlineColor = Color.clear;

buildVisibility = BuildVisibility.editorOnly;
}};

Expand Down Expand Up @@ -1681,9 +1705,12 @@ public void setBars() {
}};
oreTinSurface = new OreBlock("ore-tin-surface"){{
itemDrop = tin;
// this is stupid - can't place this on shallow water without it.
needsSurface = false;
}};
oreTinDeep = new OreBlock("ore-tin-deep"){{
itemDrop = tin;

}};
oreSilver = new UndergroundOreBlock("ore-silver"){{
drop = silver;
Expand All @@ -1696,6 +1723,8 @@ public void setBars() {
}};
oreDiamond = new OreBlock("ore-diamond"){{
itemDrop = diamond;
// this is stupid x2
needsSurface = false;
}};
oreVanadium = new UndergroundOreBlock("ore-vanadium"){{
drop = vanadium;
Expand Down
3 changes: 3 additions & 0 deletions src/fos/type/blocks/environment/UndergroundOreBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public class UndergroundOreBlock extends OverlayFloor {

public UndergroundOreBlock(String name) {
super(name);
// can't place ores on shallow water without this.
needsSurface = false;

//hide an ore from the minimap
useColor = false;
playerUnmineable = true;
Expand Down
22 changes: 16 additions & 6 deletions src/fos/type/bullets/StickyBulletType.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,26 @@ public class StickyBulletType extends ArtilleryBulletType {

public StickyBulletType(float speed, float damage, int explosionDelay) {
super(speed, damage);
this.explosionDelay = explosionDelay;

sprite = "fos-sticky-bullet";
backSprite = "bullet-back";
this.explosionDelay = explosionDelay;
layer = Layer.flyingUnit + 1f;
despawnHit = true;
hitEffect = Fx.blastExplosion;
hitSound = Sounds.explosion;

setDefaults = false;
despawnHit = false;
pierce = true;
collides = true;
collidesGround = true;
hitEffect = Fx.blastExplosion;
hitSound = Sounds.explosion;
}

@Override
public void hitEntity(Bullet b, Hitboxc entity, float health) {
super.hitEntity(b, entity, health);

b.hit(true);
//b.hit(true);

StickyBulletData data = new StickyBulletData();
data.target = (Teamc) entity;
Expand All @@ -47,6 +50,13 @@ public void hitTile(Bullet b, Building build, float x, float y, float initialHea
b.lifetime = explosionDelay;
}

@Override
public void hit(Bullet b, float x, float y) {
// apply splash damage only when a sticky is already triggered.
if (b.data instanceof StickyBulletData)
super.hit(b, x, y);
}

@Override
public void update(Bullet b) {
super.update(b);
Expand Down Expand Up @@ -85,7 +95,7 @@ public void removed(Bullet b) {
if (b.data == null) {
// this bullet was already despawned; create a new one that stays on ground
Bullet nb = create(b.owner, b.team, b.x, b.y, b.rotation());
nb.hit(true);
//nb.hit(true);
nb.lifetime = explosionDelay;
nb.data = new StickyBulletData();
} else {
Expand Down

0 comments on commit 16d4070

Please sign in to comment.