Skip to content

Commit

Permalink
Warden boss unit
Browse files Browse the repository at this point in the history
  • Loading branch information
Slotterleet committed Nov 26, 2023
1 parent f33be82 commit 37f21eb
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 6 deletions.
3 changes: 2 additions & 1 deletion core/annotations/src/main/resources/classids.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ lord=4
sergeant=5
subSmall=6
testOverdrive=7
vulture=8
vulture=8
warden=9
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}
2 changes: 0 additions & 2 deletions core/res/bundles/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ setting.fos-debugmode.name = [red]Danger Zone: []Debug Mode
setting.fos-debugmode.description = Enables debug-only features. Not recommended for players.\nRestart required to apply changes.
setting.fos-unlock-all-content = Unlock all content.

block.fos-mechanical-separator.name = Mechanical Separator
block.fos-mechanical-separator.description = Recycles scrap without the use of power, though at a much slower rate and efficiency.
block.fos-resource-extractor.name = Resource Extractor
block.fos-resource-extractor.description = Refines inputted materials into their metal components. Output can be selected.
block.fos-cuberium-synthesizer.name = Cuberium Synthesizer
Expand Down
2 changes: 0 additions & 2 deletions core/res/bundles/bundle_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ setting.fos-debugmode.name = [red]Опасная зона: []Режим отла
setting.fos-debugmode.description = Включает функции отладки. Не рекомендуется для игроков.\nПерезагрузите игру, чтобы изменения вступили в силу.\n[red]Требует перепуска игры
setting.fos-unlock-all-content = Разблокировать весь контент.

block.fos-mechanical-separator.name = Механический разделитель
block.fos-mechanical-separator.description = Перерабатывает металлолом без использования энергии засчёт пониженной производительности и эффективности.
block.fos-resource-extractor.name = Экстрактор ресурсов
block.fos-resource-extractor.description = Перебирает камни на ресурсы на случай, если надо больше.
block.fos-cuberium-synthesizer.name = Синтезатор кубрия
Expand Down
Binary file added core/res/sprites/units/warden-treads.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
139 changes: 138 additions & 1 deletion core/src/fos/content/FOSUnitTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import arc.graphics.Color;
import arc.math.Mathf;
import arc.math.geom.Rect;
import fos.ai.*;
import fos.gen.*;
import fos.graphics.FOSPal;
Expand All @@ -10,6 +11,7 @@
import fos.type.units.*;
import fos.type.units.destroyers.DestroyersUnits;
import fos.type.units.weapons.InjectorWeapon;
import mindustry.ai.types.GroundAI;
import mindustry.annotations.Annotations;
import mindustry.content.*;
import mindustry.entities.abilities.*;
Expand All @@ -25,6 +27,8 @@
public class FOSUnitTypes {
public static @Annotations.EntityDef({Mechc.class}) UnitType legion, citadel;

public static @Annotations.EntityDef({Tankc.class}) UnitType warden;

public static @Annotations.EntityDef({Unitc.class}) UnitType sergeant, lieutenant, captain, general, marshal,
smoke, cloud;

Expand Down Expand Up @@ -66,7 +70,7 @@ public static void load(){
//TODO: campaign boss
citadel = new BossUnitType("citadel"){{
health = 7500;
armor = 40;
armor = 30;
hitSize = 40;
speed = 0.05f;
flying = false;
Expand Down Expand Up @@ -117,6 +121,139 @@ public static void load(){
}}
);
}};
//TODO: campaign boss
warden = new BossUnitType("warden"){{
health = 9000;
armor = 15;
hitSize = 36;
speed = 0.2f;
rotateSpeed = 0.75f;
omniMovement = false;
treadPullOffset = 1;
treadRects = new Rect[]{
new Rect(36f, 24f - 73f, 24f, 73f),
new Rect(30f, 80f - 37f, 18f, 37f)
};
weapons.add(new Weapon[]{
new Weapon("warden-artillery"){{
x = 16; y = -8;
rotate = true;
rotateSpeed = 3f;
top = true;
recoil = 2f;
shake = 2f;
reload = 75f;
shootCone = 18f;
mirror = alternate = true;
inaccuracy = 5f;
bullet = new ArtilleryBulletType(){{
width = 14f; height = 18f;
damage = 30f;
splashDamage = 120f;
splashDamageRadius = 20f;
speed = 2.5f;
lifetime = 100f;
trailWidth = 5f;
trailLength = 12;
trailEffect = Fx.artilleryTrail;
shootSound = Sounds.artillery;
hitEffect = despawnEffect = Fx.massiveExplosion;
}};
}},
new Weapon("warden-artillery"){{
x = -12; y = -16;
rotate = true;
rotateSpeed = 3f;
top = true;
recoil = 2f;
shake = 2f;
reload = 75f;
shootCone = 18f;
mirror = alternate = true;
inaccuracy = 5f;
bullet = new ArtilleryBulletType(){{
width = 14f; height = 18f;
damage = 30f;
splashDamage = 120f;
splashDamageRadius = 20f;
speed = 2.5f;
lifetime = 100f;
trailWidth = 5f;
trailLength = 12;
trailEffect = Fx.artilleryTrail;
shootSound = Sounds.artillery;
hitEffect = despawnEffect = Fx.massiveExplosion;
}};
}},

new Weapon("warden-machine-gun"){{
x = 14; y = 8;
rotate = false;
top = false;
baseRotation = 10f;
recoil = 4f;
shake = 0.5f;
reload = 7.5f;
shootCone = 15f;
mirror = true;
alternate = false;
inaccuracy = 4f;
bullet = new BasicBulletType(){{
width = 8f; height = 16f;
damage = 80f;
speed = 5f;
lifetime = 30f;
shootSound = Sounds.shoot;
}};
}},
new Weapon("warden-machine-gun"){{
x = 18; y = 8;
rotate = false;
top = false;
baseRotation = 10f;
recoil = 4f;
shake = 0.5f;
reload = 7.5f;
shootCone = 15f;
mirror = true;
alternate = false;
inaccuracy = 4f;
bullet = new BasicBulletType(){{
width = 8f; height = 16f;
damage = 80f;
speed = 5f;
lifetime = 30f;
shootSound = Sounds.shoot;
}};
}},

new Weapon("warden-antiair"){{
x = 0; y = -4;
rotate = true;
top = true;
rotateSpeed = 6f;
shootCone = 30f;
mirror = false;
reload = 120f;
shoot.shots = 4;
shoot.shotDelay = 10f;
inaccuracy = 4f;
bullet = new MissileBulletType(){{
width = 8f; height = 14f;
damage = 60f;
splashDamage = 90f;
splashDamageRadius = 28f;
speed = 8f;
lifetime = 30f;
collidesAir = true;
collidesGround = false;
shootSound = Sounds.missile;
hitEffect = Fx.blastExplosion;
}};
}}
});
aiController = GroundAI::new;
}};

lord = new LumoniPlayerUnitType("lord"){{
health = 2400;
Expand Down

0 comments on commit 37f21eb

Please sign in to comment.