Line endings: LF everywhere

.gitattributes forces LF (CRLF only for .bat/.cmd), core.autocrlf is off;
files that differed only by CRLF are normalized.
This commit is contained in:
cthangover committed 2026-10-21 13:29:42 +02:00
1 parent 18616852e1
commit ad57e6e634
6 files changed
+1345 -1315

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
# Line endings: LF everywhere, on every OS, whatever core.autocrlf says.
* text=auto eol=lf
# cmd.exe misreads labels and goto in LF batch files, so they stay CRLF.
*.bat text eol=crlf
*.cmd text eol=crlf
# Binaries: never converted, never diffed as text.
*.png binary
*.jpg binary
*.jpeg binary
*.webp binary
*.svg text
*.ogg binary
*.wav binary
*.mp3 binary
*.ttf binary
*.otf binary
*.woff binary
*.woff2 binary
*.dll binary
*.so binary
*.dylib binary
*.pdb binary
*.exe binary
*.zip binary
*.pck binary
*.moc3 binary
*.res binary
*.scn binary
+37 -37
View File
@@ -1,37 +1,37 @@
# Godot 4.x
.godot/
.idea/
sdk/
bin/
obj/
#ai
.omo/
.opencode/
gen/
obj/
bin/
*.tres~
*.tscn~
# GDScript LSP
.godot/
# Export
*.exe
*.dmg
*.apk
*.aab
*.pck
*.zip
*.log
# OS
.DS_Store
Thumbs.db
# Editor
*.import
*.godot.uid
# Godot 4.x
.godot/
.idea/
sdk/
bin/
obj/
#ai
.omo/
.opencode/
gen/
obj/
bin/
*.tres~
*.tscn~
# GDScript LSP
.godot/
# Export
*.exe
*.dmg
*.apk
*.aab
*.pck
*.zip
*.log
# OS
.DS_Store
Thumbs.db
# Editor
*.import
*.godot.uid
+56 -56
View File
@@ -1,56 +1,56 @@
using Cthangover.Core.Cards.StatusEffect;
using Cthangover.Core.Characters;
using Cthangover.Core.Utils;
using Godot;
namespace Cthangover.FFBattle.Actions
{
/// <summary>
/// Executes a physical attack action. Calculates damage as
/// <c>action.Attack × user.Attack</c>, then routes through
/// <see cref="StatusEffectQueue.OnDealDamage"/> and
/// <see cref="StatusEffectQueue.OnTakeDamage"/> for status-effect
/// hooks. Subtraction is applied defence-first: <see cref="CharacterAttributes.Defence"/>
/// absorbs damage point-for-point before health is reduced.
/// Registered under ID <c>"physics/attack"</c>.
/// </summary>
public class FFDamageExecutor : ActionBase
{
/// <summary>Hub registry key for this executor.</summary>
public override string ID => "FFDamageExecutor";
/// <summary>Applies attack damage with status hooks and defence absorption; consumes the action's required points.</summary>
public override ChangedAttributes Execute(ActionCharacter action, Character user, Character target)
{
if (target == null || user == null || !CheckRequiredAndUsePoint(action, user))
return new ChangedAttributes { Result = false };
var damageDelta = Mathf.RoundToInt(action.GetFloat("Attack", 1f) * user.Attributes.Attack.Value);
StatusEffectService.Of(target).OnTakeDamage(user, ref damageDelta);
StatusEffectService.Of(user).OnDealDamage(target, ref damageDelta);
var defenceDelta = 0;
var ignoreArmor = user.HasPassiveEffect("IgnoreArmor");
if (!ignoreArmor && target.Attributes.Defence.Value > 0)
{
defenceDelta = target.Attributes.Defence.Value >= damageDelta
? damageDelta
: target.Attributes.Defence.Value;
damageDelta -= defenceDelta;
}
target.Attributes.Defence.Value -= defenceDelta;
target.Attributes.Health.Value -= damageDelta;
GameLogger.Log("FF_BATTLE",
$"{user.Name} attacks {target.Name}: damage={damageDelta} defence={defenceDelta}",
LogLevel.Debug);
return new ChangedAttributes
{
Result = true,
Target = { Damage = damageDelta, Defence = -defenceDelta }
};
}
}
}
using Cthangover.Core.Cards.StatusEffect;
using Cthangover.Core.Characters;
using Cthangover.Core.Utils;
using Godot;
namespace Cthangover.FFBattle.Actions
{
/// <summary>
/// Executes a physical attack action. Calculates damage as
/// <c>action.Attack × user.Attack</c>, then routes through
/// <see cref="StatusEffectQueue.OnDealDamage"/> and
/// <see cref="StatusEffectQueue.OnTakeDamage"/> for status-effect
/// hooks. Subtraction is applied defence-first: <see cref="CharacterAttributes.Defence"/>
/// absorbs damage point-for-point before health is reduced.
/// Registered under ID <c>"physics/attack"</c>.
/// </summary>
public class FFDamageExecutor : ActionBase
{
/// <summary>Hub registry key for this executor.</summary>
public override string ID => "FFDamageExecutor";
/// <summary>Applies attack damage with status hooks and defence absorption; consumes the action's required points.</summary>
public override ChangedAttributes Execute(ActionCharacter action, Character user, Character target)
{
if (target == null || user == null || !CheckRequiredAndUsePoint(action, user))
return new ChangedAttributes { Result = false };
var damageDelta = Mathf.RoundToInt(action.GetFloat("Attack", 1f) * user.Attributes.Attack.Value);
StatusEffectService.Of(target).OnTakeDamage(user, ref damageDelta);
StatusEffectService.Of(user).OnDealDamage(target, ref damageDelta);
var defenceDelta = 0;
var ignoreArmor = user.HasPassiveEffect("IgnoreArmor");
if (!ignoreArmor && target.Attributes.Defence.Value > 0)
{
defenceDelta = target.Attributes.Defence.Value >= damageDelta
? damageDelta
: target.Attributes.Defence.Value;
damageDelta -= defenceDelta;
}
target.Attributes.Defence.Value -= defenceDelta;
target.Attributes.Health.Value -= damageDelta;
GameLogger.Log("FF_BATTLE",
$"{user.Name} attacks {target.Name}: damage={damageDelta} defence={defenceDelta}",
LogLevel.Debug);
return new ChangedAttributes
{
Result = true,
Target = { Damage = damageDelta, Defence = -defenceDelta }
};
}
}
}
+34 -34
View File
@@ -1,34 +1,34 @@
using Cthangover.Core.Characters;
using Cthangover.Core.Utils;
namespace Cthangover.FFBattle.Actions
{
/// <summary>
/// Executes a defensive action (buff/barrier). Increases the target's
/// <see cref="CharacterAttributes.Defence"/> by the value stored in
/// the <c>"Defence"</c> property on the action (default 4).
/// Defence acts as a shield against incoming physical damage in the
/// <see cref="FFDamageExecutor"/>. Registered under ID <c>"physics/defence"</c>.
/// </summary>
public class FFDefenceExecutor : ActionBase
{
/// <summary>Hub registry key for this executor.</summary>
public override string ID => "FFDefenceExecutor";
/// <summary>Adds the action's "Defence" value (default 4) to the target's defence shield.</summary>
public override ChangedAttributes Execute(ActionCharacter action, Character user, Character target)
{
if (target == null || user == null || !CheckRequiredAndUsePoint(action, user))
return new ChangedAttributes { Result = false };
var defenceDelta = action.GetInt("Defence", 4);
target.Attributes.Defence.Value += defenceDelta;
GameLogger.Log("FF_BATTLE",
$"{user.Name} defends → +{defenceDelta} defence for {target?.Name}",
LogLevel.Debug);
return new ChangedAttributes { Result = true, Target = { Defence = defenceDelta } };
}
}
}
using Cthangover.Core.Characters;
using Cthangover.Core.Utils;
namespace Cthangover.FFBattle.Actions
{
/// <summary>
/// Executes a defensive action (buff/barrier). Increases the target's
/// <see cref="CharacterAttributes.Defence"/> by the value stored in
/// the <c>"Defence"</c> property on the action (default 4).
/// Defence acts as a shield against incoming physical damage in the
/// <see cref="FFDamageExecutor"/>. Registered under ID <c>"physics/defence"</c>.
/// </summary>
public class FFDefenceExecutor : ActionBase
{
/// <summary>Hub registry key for this executor.</summary>
public override string ID => "FFDefenceExecutor";
/// <summary>Adds the action's "Defence" value (default 4) to the target's defence shield.</summary>
public override ChangedAttributes Execute(ActionCharacter action, Character user, Character target)
{
if (target == null || user == null || !CheckRequiredAndUsePoint(action, user))
return new ChangedAttributes { Result = false };
var defenceDelta = action.GetInt("Defence", 4);
target.Attributes.Defence.Value += defenceDelta;
GameLogger.Log("FF_BATTLE",
$"{user.Name} defends → +{defenceDelta} defence for {target?.Name}",
LogLevel.Debug);
return new ChangedAttributes { Result = true, Target = { Defence = defenceDelta } };
}
}
}
+37 -37
View File
@@ -1,37 +1,37 @@
using Cthangover.Core.Cards.StatusEffect;
using Cthangover.Core.Characters;
using Cthangover.Core.Utils;
namespace Cthangover.FFBattle.Actions
{
/// <summary>
/// Applies a stun status effect to the target for a configurable number of turns.
/// Reads the turn count from the <c>"Turn"</c> property on the action (default 3).
/// Stunned characters are skipped during turn iteration in
/// <see cref="FFBattleCore.TryNextCharacterOrEndTurn"/> and
/// <see cref="FFBattleCore.RunEnemyTurn"/>. Registered under ID <c>"physics/stun"</c>.
/// </summary>
public class FFStunExecutor : ActionBase
{
/// <summary>Hub registry key for this executor.</summary>
public override string ID => "FFStunExecutor";
/// <summary>Adds the stun effect for the action's "Turn" count (default 3); stun-immune targets consume the points but stay un-stunned.</summary>
public override ChangedAttributes Execute(ActionCharacter action, Character user, Character target)
{
if (target == null || user == null || !CheckRequiredAndUsePoint(action, user))
return new ChangedAttributes { Result = false };
if (target.HasPassiveEffect("StunImmune"))
return new ChangedAttributes { Result = true };
var turns = action.GetInt("Turn", 3);
StatusEffectService.Of(target).Add("effect/physics/stun", turns);
GameLogger.Log("FF_BATTLE",
$"{user.Name} stuns {target.Name} for {turns} turns",
LogLevel.Debug);
return new ChangedAttributes { Result = true };
}
}
}
using Cthangover.Core.Cards.StatusEffect;
using Cthangover.Core.Characters;
using Cthangover.Core.Utils;
namespace Cthangover.FFBattle.Actions
{
/// <summary>
/// Applies a stun status effect to the target for a configurable number of turns.
/// Reads the turn count from the <c>"Turn"</c> property on the action (default 3).
/// Stunned characters are skipped during turn iteration in
/// <see cref="FFBattleCore.TryNextCharacterOrEndTurn"/> and
/// <see cref="FFBattleCore.RunEnemyTurn"/>. Registered under ID <c>"physics/stun"</c>.
/// </summary>
public class FFStunExecutor : ActionBase
{
/// <summary>Hub registry key for this executor.</summary>
public override string ID => "FFStunExecutor";
/// <summary>Adds the stun effect for the action's "Turn" count (default 3); stun-immune targets consume the points but stay un-stunned.</summary>
public override ChangedAttributes Execute(ActionCharacter action, Character user, Character target)
{
if (target == null || user == null || !CheckRequiredAndUsePoint(action, user))
return new ChangedAttributes { Result = false };
if (target.HasPassiveEffect("StunImmune"))
return new ChangedAttributes { Result = true };
var turns = action.GetInt("Turn", 3);
StatusEffectService.Of(target).Add("effect/physics/stun", turns);
GameLogger.Log("FF_BATTLE",
$"{user.Name} stuns {target.Name} for {turns} turns",
LogLevel.Debug);
return new ChangedAttributes { Result = true };
}
}
}
+1151 -1151
View File
File diff suppressed because it is too large. Load diff