Skip to content

Commit

Permalink
Support Weapon Mounts
Browse files Browse the repository at this point in the history
  • Loading branch information
Slotterleet committed May 30, 2024
1 parent 9bb1bd1 commit 47340a0
Show file tree
Hide file tree
Showing 4 changed files with 195 additions and 107 deletions.
5 changes: 3 additions & 2 deletions src/fos/content/FOSUnitTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,8 @@ public static void load(){
color = Pal.surge;
effectRadius = 3f;
healPercent = 2f;
healEffect = Fx.blastExplosion; hitEffect = Fx.blastExplosion; damageEffect = Fx.chainLightning;
healEffect = hitEffect = Fx.blastExplosion;
damageEffect = Fx.chainLightning;
//buildingDamageMultiplier = 1.25f;
}});

Expand Down Expand Up @@ -1065,7 +1066,7 @@ public static void load(){
shoot.shots = 5;
inaccuracy = 11.25f;
shootSound = Sounds.artillery;
bullet = new ArtilleryBulletType(){{
bullet = new BasicBulletType(){{
width = height = 12;
speed = 3f;
lifetime = 60f;
Expand Down
224 changes: 140 additions & 84 deletions src/fos/content/FOSWeaponModules.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package fos.content;

import arc.Events;
import arc.struct.Seq;
import arc.graphics.Color;
import fos.type.abilities.UnitResistanceAbility;
import fos.type.bullets.SmartBulletType;
import fos.type.content.WeaponSet;
Expand Down Expand Up @@ -30,45 +30,54 @@ public class FOSWeaponModules {

public static void load() {
// BASIC / ASSAULT RIFLES
standard1 = new WeaponSet("standard1", new Weapon("fos-standard-weapon1"){{
x = 0; y = 0;
alternate = mirror = false;
rotate = true;
top = true;
recoil = 0.4f;
reload = recoilTime = 20f;
bullet = new BasicBulletType(2.5f, 72){{
width = 7f; height = 9f;
trailLength = 8;
lifetime = 60f;
}};
}}).reqs(empty);
standard1.researchCost = with();
standard2 = new WeaponSet("standard2", new Weapon("fos-standard-weapon2"){{
x = 0; y = 0;
alternate = mirror = false;
rotate = true;
recoil = 0.3f;
reload = recoilTime = 40f;
bullet = new BasicBulletType(2f, 180){{
width = 8f; height = 10f;
lifetime = 40f;
shootEffect = Fx.shootSmallSmoke;
trailLength = 6;
fragOnHit = false;
fragBullets = 2;
fragVelocityMin = 1f;
collidesTiles = false;
fragBullet = new SmartBulletType(7f, 60){{
width = 4f; height = 5f;
lifetime = 20f;
trailLength = 15;
hitEffect = Fx.hitBulletSmall;
collidesTiles = true;
}};
}};
}}).reqs(with(tin, 75, silver, 75));
standard2.researchCost = with();
standard1 = new WeaponSet("standard1"){{
weapons.add(
new Weapon("fos-standard-weapon1"){{
x = 0; y = 0;
alternate = mirror = false;
rotate = true;
top = true;
recoil = 0.4f;
reload = recoilTime = 20f;
bullet = new BasicBulletType(2.5f, 72){{
width = 7f; height = 9f;
trailLength = 8;
lifetime = 60f;
}};
}}
);
reqs = empty;
researchCost = empty;
}};
standard2 = new WeaponSet("standard2"){{
weapons.add(
new Weapon("fos-standard-weapon2"){{
x = 0; y = 0;
alternate = mirror = false;
rotate = true;
recoil = 0.3f;
reload = recoilTime = 40f;
bullet = new BasicBulletType(2f, 180){{
width = 8f; height = 10f;
lifetime = 40f;
shootEffect = Fx.shootSmallSmoke;
trailLength = 6;
fragOnHit = false;
fragBullets = 2;
fragVelocityMin = 1f;
fragBullet = new SmartBulletType(7f, 60){{
width = 4f; height = 5f;
lifetime = 20f;
trailLength = 15;
hitEffect = Fx.hitBulletSmall;
collidesTiles = true;
}};
}};
}}
);
reqs = with(tin, 75, silver, 75);
researchCost = empty;
}};
standard3 = new WeaponSet("standard3", new Weapon("fos-standard-weapon3"){{
x = 0; y = 0;
alternate = mirror = false;
Expand Down Expand Up @@ -127,29 +136,33 @@ public static void load() {
}}).reqs(with(tin, 500, silver, 500, vanadium, 300, nickel, 250, luminium, 200));

// SHOTGUNS
shotgun1 = new WeaponSet("shotgun1", new Weapon("fos-shotgun-mount1"){{
x = y = 0;
alternate = mirror = false;
rotate = true;
rotateSpeed = 5f;
inaccuracy = 30f;
shoot.shots = 4;
shoot.shotDelay = 0f;
reload = recoilTime = 90f;
shootSound = Sounds.shotgun;
ejectEffect = Fx.casing2;
bullet = new ShrapnelBulletType(){{
width = 2f;
length = 48f;
fromColor = Pal.accentBack;
toColor = Pal.accent;
damage = 120;
lifetime = 20f;
hitEffect = Fx.hitBulletSmall;
knockback = 4f;
}};
}}).reqs(empty);
//TODO: placeholders
shotgun1 = new WeaponSet("shotgun1"){{
weapons.add(
new Weapon("fos-shotgun-mount1"){{
x = y = 0;
alternate = mirror = false;
rotate = true;
rotateSpeed = 5f;
inaccuracy = 30f;
shoot.shots = 4;
shoot.shotDelay = 0f;
reload = recoilTime = 90f;
shootSound = Sounds.shotgun;
ejectEffect = Fx.casing2;
bullet = new ShrapnelBulletType(){{
width = 2f;
length = 48f;
fromColor = Pal.accentBack;
toColor = Pal.accent;
damage = 120;
lifetime = 20f;
hitEffect = Fx.hitBulletSmall;
knockback = 4f;
}};
}}
);
reqs = empty;
}};
shotgun2 = new WeaponSet("shotgun2", new Weapon("fos-shotgun-mount2"){{
x = y = 0;
alternate = mirror = false;
Expand Down Expand Up @@ -201,35 +214,78 @@ public static void load() {
}};
}};
}}).reqs(with(tin, 200, silver, 50, silicon, 200, vanadium, 100));
//TODO: placeholders
shotgun4 = new WeaponSet("shotgun4", new Weapon()).reqs(with(lead, 1));
shotgun5 = new WeaponSet("shotgun5", new Weapon()).reqs(with(lead, 1));

// SUPPORT MODULES
support1 = new WeaponSet("support1", new BuildWeapon("fos-support-mount1")){{
Events.on(EventType.ContentInitEvent.class, e -> {
abilities = Seq.with(
new StatusFieldAbility(FOSStatuses.buildBoost, 60, 30, 1){{
activeEffect = Fx.none;
}}
);
});
}}.reqs(empty);
support1 = new WeaponSet("support1"){{
weapons.add(new BuildWeapon("fos-support-mount1"));
abilities.add(
new StatusFieldAbility(FOSStatuses.buildBoost, 60, 30, 1){{
activeEffect = Fx.none;
}}
);
reqs = empty;
}};
support2 = new WeaponSet("support2", new Weapon("fos-support-mount2"){{
x = 0; y = 0;
rotate = false;
top = true;
reload = 10f;
mirror = false;
inaccuracy = 4f;
shootCone = 10f;
recoil = 2f;
bullet = new BasicBulletType(){{
lifetime = 30f; speed = 4f;

width = 10f; height = 20f;
//sprite = "laser";
backColor = Pal.heal;
frontColor = Color.white;
shootEffect = Fx.shootHeal;
shootSound = Sounds.lasershoot;

damage = 0;
collidesTeam = true;
collidesAir = false;
collidesGround = true;
healPercent = 5;
}};
}}).reqs(with(tin, 50, silver, 100));
support3 = new WeaponSet("support3"){{
abilities.add(
new EnergyFieldAbility(80f, 40f, 64f){{
x = 0; y = 2;
statusDuration = 120f;
maxTargets = 6;
color = Pal.heal;
effectRadius = 2f;
healPercent = 2.5f;
healEffect = Fx.heal;
damageEffect = Fx.chainLightning;
}}
);
reqs = with(tin, 75, silver, 150, vanadium, 150);
}};

// BOSS WEAPONS
legionFabricator = new WeaponSet("legion-fabricator",
new RepairBeamWeapon("fos-legion-beam-replica"){{
x = 0; y = 0;
mirror = false;
beamWidth = 0.4f;
repairSpeed = 0.2f;
bullet = new BulletType(){{
maxRange = 40f;
}};
}}
){{
legionFabricator = new WeaponSet("legion-fabricator"){{
weapons.add(
new RepairBeamWeapon("fos-legion-beam-replica"){{
x = 0; y = 0;
mirror = false;
beamWidth = 0.4f;
repairSpeed = 0.2f;
bullet = new BulletType(){{
maxRange = 40f;
}};
}}
);
customIcon = true;
Events.on(EventType.ContentInitEvent.class, e -> {
abilities = Seq.with(
abilities.add(
new UnitResistanceAbility(FOSUnitTypes.legionnaireReplica, 0.05f),
new UnitSpawnAbility(FOSUnitTypes.legionnaireReplica, 600, 16, 0)
);
Expand Down
15 changes: 11 additions & 4 deletions src/fos/content/LumoniTechTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import static fos.content.FOSBlocks.*;
import static fos.content.FOSFluids.tokicite;
import static fos.content.FOSItems.*;
import static fos.content.FOSObjectives.*;
import static fos.content.FOSSectors.*;
import static fos.content.FOSUnitTypes.*;
import static fos.content.FOSWeaponModules.*;
Expand Down Expand Up @@ -215,10 +216,16 @@ public static void load() {
*/
//TODO: artillery
soontm();
//TODO: support
soontm();
// SUPPORT
node(support1, Seq.with(new SectorComplete(ruins)), () ->
node(support2, () ->
node(support3, () ->
soontm()
)
)
);
// BOSS-SPECIFIC WEAPONS
node(legionFabricator, Seq.with(new FOSObjectives.DefeatBoss(legion)), () -> {
node(legionFabricator, Seq.with(new DefeatBoss(legion)), () -> {
//TODO: citadel shotgun? or stickybomb launcher?
soontm();
});
Expand Down Expand Up @@ -277,6 +284,6 @@ public static void load() {
}

public static void soontm() {
node(soontm, Seq.with(new FOSObjectives.TBDObjective()), () -> {});
node(soontm, Seq.with(new TBDObjective()), () -> {});
}
}
Loading

0 comments on commit 47340a0

Please sign in to comment.