diff --git a/Content.Server/Dragon/Components/DragonRiftComponent.cs b/Content.Server/Dragon/Components/DragonRiftComponent.cs index fa49b1f1f1..09685a8517 100644 --- a/Content.Server/Dragon/Components/DragonRiftComponent.cs +++ b/Content.Server/Dragon/Components/DragonRiftComponent.cs @@ -37,4 +37,26 @@ public sealed partial class DragonRiftComponent : SharedDragonRiftComponent [ViewVariables(VVAccess.ReadWrite), DataField("spawn", customTypeSerializer: typeof(PrototypeIdSerializer))] public string SpawnPrototype = "MobCarpDragon"; + + //Begin DeltaV - Elite spawns on dragon rifts + + [DataField] + public bool SpawnElites = true; + + [DataField("spawnElite")] + public EntProtoId? SpawnElitePrototype = "MobSharkminnowDragon"; + + /// + /// Every N-th spawn is the elite where N is Elite frequency + /// + [DataField] + public int SpawnEliteFrequency = 5; + + /// + /// Accumulation of elite spawns + /// Starts at the same value as Frequency to guarantee the first spawn to be elite + /// + [DataField] + public int SpawnEliteAccumulator = 5; + //End DeltaV - Elite spawns on dragon rifts } diff --git a/Content.Server/Dragon/DragonRiftSystem.cs b/Content.Server/Dragon/DragonRiftSystem.cs index 9cab018fd7..85f665dcae 100644 --- a/Content.Server/Dragon/DragonRiftSystem.cs +++ b/Content.Server/Dragon/DragonRiftSystem.cs @@ -90,7 +90,16 @@ public sealed class DragonRiftSystem : EntitySystem if (comp.SpawnAccumulator > comp.SpawnCooldown) { comp.SpawnAccumulator -= comp.SpawnCooldown; - var ent = Spawn(comp.SpawnPrototype, xform.Coordinates); + //Begin DeltaV - Elite spawns on dragon rifts + comp.SpawnEliteAccumulator += 1; + var entSpawnPrototype = comp.SpawnPrototype; + if (comp.SpawnElites && comp.SpawnEliteAccumulator >= comp.SpawnEliteFrequency) + { + comp.SpawnEliteAccumulator -= comp.SpawnEliteFrequency; + entSpawnPrototype = comp.SpawnElitePrototype; + } + //End DeltaV - Elite spawns on dragon rifts + var ent = Spawn(entSpawnPrototype, xform.Coordinates); //Delta-v change: comp.SpawnPrototype -> entSpawnPrototype // Update their look to match the leader. if (TryComp(comp.Dragon, out var randomSprite)) diff --git a/Resources/Locale/en-US/_DV/ghost/roles/sharkminnow.ftl b/Resources/Locale/en-US/_DV/ghost/roles/sharkminnow.ftl new file mode 100644 index 0000000000..0c8e07ddd4 --- /dev/null +++ b/Resources/Locale/en-US/_DV/ghost/roles/sharkminnow.ftl @@ -0,0 +1,2 @@ +ghost-role-information-sentient-shark-name = Sentient Sharkminnow +ghost-role-information-sentient-shark-description = Help the dragon flood the station with sharks! diff --git a/Resources/Prototypes/_DV/Entities/Mobs/NPCs/carp.yml b/Resources/Prototypes/_DV/Entities/Mobs/NPCs/carp.yml new file mode 100644 index 0000000000..5646dd22d8 --- /dev/null +++ b/Resources/Prototypes/_DV/Entities/Mobs/NPCs/carp.yml @@ -0,0 +1,47 @@ +- type: entity + parent: MobShark + id: MobSharkColored + components: + - type: Sprite + drawdepth: Mobs + sprite: _DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi + layers: + - map: [ "enum.DamageStateVisualLayers.Base" ] + state: alive + - map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ] + state: mouth + shader: unshaded + - type: RandomSprite + available: + - enum.DamageStateVisualLayers.Base: + alive: Rainbow + enum.DamageStateVisualLayers.BaseUnshaded: + mouth: "" + +- type: entity + name: Sharkminnow + id: MobSharkminnowDragon + suffix: DragonBrood + parent: MobSharkColored + components: + - type: GhostRole + makeSentient: true + name: ghost-role-information-sentient-shark-name + description: ghost-role-information-sentient-shark-description + rules: ghost-role-information-space-dragon-summoned-carp-rules + mindRoles: + - MindRoleGhostRoleTeamAntagonistFlock + - type: GhostTakeoverAvailable + - type: HTN + rootTask: + task: DragonCarpCompound + - type: Flammable + damage: + types: {} + - type: Temperature + heatDamageThreshold: 1200 + - type: MeleeWeapon + damage: + types: + Slash: 10 + Piercing: 10 diff --git a/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/alive.png b/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/alive.png new file mode 100644 index 0000000000..061738e7cd Binary files /dev/null and b/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/alive.png differ diff --git a/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/dead.png b/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/dead.png new file mode 100644 index 0000000000..6ca09ee033 Binary files /dev/null and b/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/dead.png differ diff --git a/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/dead_mouth.png b/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/dead_mouth.png new file mode 100644 index 0000000000..dab110c9ad Binary files /dev/null and b/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/dead_mouth.png differ diff --git a/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/icon.png b/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/icon.png new file mode 100644 index 0000000000..1c55c68acc Binary files /dev/null and b/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/icon.png differ diff --git a/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/meta.json b/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/meta.json new file mode 100644 index 0000000000..a312c06a68 --- /dev/null +++ b/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/meta.json @@ -0,0 +1,72 @@ +{ + "version": 1, + "size": { + "x": 48, + "y": 48 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Sprited by Nimfar11 (Github) for Space Station 14. Colors modified by Dorragon for Delta-v", + "states": [ + { + "name": "icon" + }, + { + "name": "mouth", + "directions": 4, + "delays": [ + [ + 0.3, + 0.3, + 0.3 + ], + [ + 0.3, + 0.3, + 0.3 + ], + [ + 0.3, + 0.3, + 0.3 + ], + [ + 0.3, + 0.3, + 0.3 + ] + ] + }, + { + "name": "dead_mouth" + }, + { + "name": "dead" + }, + { + "name": "alive", + "directions": 4, + "delays": [ + [ + 0.3, + 0.3, + 0.3 + ], + [ + 0.3, + 0.3, + 0.3 + ], + [ + 0.3, + 0.3, + 0.3 + ], + [ + 0.3, + 0.3, + 0.3 + ] + ] + } + ] +} diff --git a/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/mouth.png b/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/mouth.png new file mode 100644 index 0000000000..c8b97b5e77 Binary files /dev/null and b/Resources/Textures/_DV/Mobs/Aliens/Carps/uncoloredsharkminnow.rsi/mouth.png differ