Feature: leaderboard hide, ability animations, card sounds, BGM, in-game settings
Server: - Account.IsHiddenFromLeaderboard: filter bots/devs from leaderboard - AbilityAnimationDefinition: type, effect, dimensions, asset/sound URLs per ability - CardAnimationBinding: CastSoundCdnUrl + ImpactSoundCdnUrl per card action - GameAudioConfig entity: admin-configurable BGM tracks per context - GetGameAudioConfigHandler (content.get_audio_config) + ServiceRegistration - Admin pages: AccountDetail toggle, AudioConfig CRUD, CardEditor + AbilityBuilder UI - Migrations: AddLeaderboardHide, AddCardActionSounds, AddGameAudioConfig Client: - Music.gd autoload: fetches BGM config, crossfades between context tracks - InGameSettings overlay: audio sliders, camera follow toggle, concede with confirm - GameScreen: gear button opens settings; ConcedeBtn moved into settings panel - project.godot: Music autoload registered Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
namespace SOR.Game.Abilities.Models;
|
||||
|
||||
/// <summary>The visual presentation style for an ability animation.</summary>
|
||||
public enum AbilityAnimationType
|
||||
{
|
||||
/// <summary>A projectile that arcs from caster to target.</summary>
|
||||
Projectile,
|
||||
/// <summary>A projectile that travels in a straight line from caster to target.</summary>
|
||||
LinearProjectile,
|
||||
/// <summary>A projectile that follows a parabolic arc from caster to target.</summary>
|
||||
ArcProjectile,
|
||||
/// <summary>A radial aura effect centered on the caster or target.</summary>
|
||||
Aura,
|
||||
}
|
||||
|
||||
/// <summary>Where the animation effect VFX is rendered.</summary>
|
||||
public enum AbilityAnimationEffect
|
||||
{
|
||||
/// <summary>Effect plays on the ability's source unit.</summary>
|
||||
Self,
|
||||
/// <summary>Effect plays on each selected target.</summary>
|
||||
Target,
|
||||
/// <summary>Effect plays on a subset of affected units.</summary>
|
||||
Some,
|
||||
/// <summary>Effect covers the entire board (e.g. board-wide clear).</summary>
|
||||
All,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Client-side animation and sound metadata for an ability.
|
||||
/// Stored inside AbilityDefinition.Animation (JSONB).
|
||||
/// Not used by server game logic — purely for the client renderer and audio system.
|
||||
/// </summary>
|
||||
public sealed class AbilityAnimationDefinition
|
||||
{
|
||||
public AbilityAnimationType Type { get; set; } = AbilityAnimationType.Projectile;
|
||||
public AbilityAnimationEffect Effect { get; set; } = AbilityAnimationEffect.Target;
|
||||
|
||||
/// <summary>CDN URL to the animation asset (particle effect, sprite sheet, etc.).</summary>
|
||||
public string? AssetUrl { get; set; }
|
||||
|
||||
/// <summary>Scale width multiplier for the effect (1.0 = default size).</summary>
|
||||
public float Width { get; set; } = 1f;
|
||||
|
||||
/// <summary>Scale height multiplier for the effect (1.0 = default size).</summary>
|
||||
public float Height { get; set; } = 1f;
|
||||
|
||||
/// <summary>Duration of the animation in seconds.</summary>
|
||||
public float Duration { get; set; } = 1f;
|
||||
|
||||
/// <summary>CDN URL to the sound played when the ability is cast/activated.</summary>
|
||||
public string? CastSoundUrl { get; set; }
|
||||
|
||||
/// <summary>CDN URL to the sound played on impact/effect resolution.</summary>
|
||||
public string? ImpactSoundUrl { get; set; }
|
||||
}
|
||||
@@ -50,4 +50,10 @@ public sealed class AbilityDefinition
|
||||
/// Used in the admin ability builder. Not used by game logic.
|
||||
/// </summary>
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional client-side animation and sound metadata.
|
||||
/// Not used by server game logic. Null means the client uses its default effect.
|
||||
/// </summary>
|
||||
public AbilityAnimationDefinition? Animation { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user