Skip to content

Commit

Permalink
dragons despawn in 10 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyndomen committed Feb 22, 2025
1 parent 294b3ef commit 72a972f
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Content.Server/Dragon/Components/DragonComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public sealed partial class DragonComponent : Component
/// When any rift is destroyed how long is the dragon weakened for
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("weakenedDuration")]
public float WeakenedDuration = 120f;
public float WeakenedDuration = 60f; // DeltaV - buff dragon

/// <summary>
/// Has a rift been destroyed and the dragon in a temporary weakened state?
Expand All @@ -35,7 +35,7 @@ public sealed partial class DragonComponent : Component
/// <summary>
/// Maximum time the dragon can go without spawning a rift before they die.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("maxAccumulator")] public float RiftMaxAccumulator = 300f;
[ViewVariables(VVAccess.ReadWrite), DataField("maxAccumulator")] public float RiftMaxAccumulator = 600f; // DeltaV - 10 mins to die

[DataField("spawnRiftAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string SpawnRiftAction = "ActionSpawnRift";
Expand Down
16 changes: 11 additions & 5 deletions Content.Server/Dragon/DragonSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,19 @@ public override void Update(float frameTime)
if (!_mobState.IsDead(uid))
comp.RiftAccumulator += frameTime;

/* DeltaV - Dragons can stay alive
// Delete it, naughty dragon!
if (comp.RiftAccumulator >= comp.RiftMaxAccumulator)
// DeltaV - begin Dragon changes
if (comp.RiftAccumulator = .5 * comp.RiftMaxAccumulator) // dragon has half the time left

Check failure on line 101 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Cannot implicitly convert type 'double' to 'float'. An explicit conversion exists (are you missing a cast?)

Check failure on line 101 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Cannot implicitly convert type 'float' to 'bool'

Check failure on line 101 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Cannot implicitly convert type 'double' to 'float'. An explicit conversion exists (are you missing a cast?)

Check failure on line 101 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Cannot implicitly convert type 'float' to 'bool'

Check failure on line 101 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Cannot implicitly convert type 'double' to 'float'. An explicit conversion exists (are you missing a cast?)

Check failure on line 101 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Cannot implicitly convert type 'float' to 'bool'

Check failure on line 101 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Cannot implicitly convert type 'double' to 'float'. An explicit conversion exists (are you missing a cast?)

Check failure on line 101 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Cannot implicitly convert type 'float' to 'bool'

Check failure on line 101 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

Cannot implicitly convert type 'double' to 'float'. An explicit conversion exists (are you missing a cast?)

Check failure on line 101 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

Cannot implicitly convert type 'float' to 'bool'

Check failure on line 101 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

Cannot implicitly convert type 'double' to 'float'. An explicit conversion exists (are you missing a cast?)

Check failure on line 101 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

Cannot implicitly convert type 'float' to 'bool'

Check failure on line 101 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Cannot implicitly convert type 'double' to 'float'. An explicit conversion exists (are you missing a cast?)

Check failure on line 101 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Cannot implicitly convert type 'float' to 'bool'

Check failure on line 101 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Cannot implicitly convert type 'double' to 'float'. An explicit conversion exists (are you missing a cast?)

Check failure on line 101 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Cannot implicitly convert type 'float' to 'bool'
{
Roar(uid, comp);
QueueDel(uid);
}*/
_popup.PopupEntity(Loc.GetString("deltav-dragon-halftime-popup"), uid, uid);
}

if (comp.RiftAccumulator >= comp.RiftMaxAccumulator) // dragon is out of time
{
Roar(uid, comp);
Damageable.TryChangeDamage(uid, new DamageSpecifier(DamageType.Blunt, 400)); // gib time

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

The name 'Damageable' does not exist in the current context

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

The type or namespace name 'DamageSpecifier' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

The name 'DamageType' does not exist in the current context

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

The name 'Damageable' does not exist in the current context

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

The type or namespace name 'DamageSpecifier' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

The name 'DamageType' does not exist in the current context

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The name 'Damageable' does not exist in the current context

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'DamageSpecifier' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The name 'DamageType' does not exist in the current context

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The name 'Damageable' does not exist in the current context

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'DamageSpecifier' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The name 'DamageType' does not exist in the current context

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

The name 'Damageable' does not exist in the current context

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

The type or namespace name 'DamageSpecifier' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

The name 'DamageType' does not exist in the current context

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

The name 'Damageable' does not exist in the current context

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

The type or namespace name 'DamageSpecifier' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

The name 'DamageType' does not exist in the current context

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The name 'Damageable' does not exist in the current context

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'DamageSpecifier' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The name 'DamageType' does not exist in the current context

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The name 'Damageable' does not exist in the current context

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'DamageSpecifier' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 110 in Content.Server/Dragon/DragonSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The name 'DamageType' does not exist in the current context
}
// DeltaV - end Dragon changes
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ deltav-ghost-role-information-salvageantag-rules = You are a salvage mob.
You are allowed to attack the salvage shuttle.
You are NOT allowed to go to the station. If the salvagers go to the station, you can't follow them.
deltav-ghost-role-information-space-dragon-description = Call in 3 carp rifts and take over this quadrant!
deltav-ghost-role-information-space-dragon-description = Call in 3 carp rifts and take over this quadrant! You must place a rift every 10 minutes or suffer the consequences!
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
deltav-objective-carp-rifts-description = Use the rift action to open {$count} rifts and ensure they do not get destroyed.
deltav-objective-carp-rifts-description = Use the rift action to open {$count} rifts and ensure they do not get destroyed. You must place one every 10 minutes until you have three!
deltav-dragon-halftime-popup = You only have five minutes left to place a rift!
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
components:
- type: GhostRole
name: ghost-role-information-space-dragon-name
description: deltav-ghost-role-information-space-dragon-description # DeltaV - Dragons do not despawn
description: deltav-ghost-role-information-space-dragon-description # DeltaV - Dragons despawn in 10 mins
rules: ghost-role-information-space-dragon-rules
mindRoles:
- MindRoleGhostRoleTeamAntagonist
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Entities/Mobs/Player/dragon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
allowSpeech: true
makeSentient: true
name: ghost-role-information-space-dragon-name
description: deltav-ghost-role-information-space-dragon-description # DeltaV - Dragons do not despawn
description: deltav-ghost-role-information-space-dragon-description # DeltaV - Dragons despawn in 10 minutes
rules: ghost-role-information-space-dragon-rules
mindRoles:
- MindRoleGhostRoleTeamAntagonist
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
- Your [color=orange][italic]Dragon's Breath[/italic][/color] is a [bold]flaming projectile[/bold] which travels a straight flight path, exploding multiple times and igniting things along the way. Try not to hit your carps with this!
- You have the ability to [color=#4b7fcc][italic]Summon a Carp Rift[/italic][/color]. Rifts periodically spawn [bold]space carp[/bold] and charge up energy over a period of 5 minutes, [bold]which is when it's vulnerable.[/bold] After 5 minutes, it becomes invulnerable and will continue summoning carp as long as the dragon lives.
- You'll suffer a [bold]temporary debilitating feedback effect[/bold] if one of your rifts are destroyed before it's done charging.
- If a period of ten minutes passes since your spawn or since the last time a rift was charging, [bold]you'll die.[/bold]
- Dragons who have the maximum of 3 fully charged rifts will [bold]never disappear[/bold], but they are still mortal.

# Slimes and Spiders

Expand Down

0 comments on commit 72a972f

Please sign in to comment.