Compare commits

...
4 Commits
Author SHA1 Message Date
cthangover ff8fb41649 Mod cover 2026-10-22 17:09:45 +02:00
cthangover 13c72bc91c Own the texts of the action cards
The action cards are defined here, but their names and descriptions lived
in cthangover_game, so any other game showed the raw keys in battle.
2026-10-21 14:58:56 +02:00
cthangover 48cbb73b0b Line endings: LF everywhere
.gitattributes forces LF (CRLF only for .bat/.cmd), core.autocrlf is off;
files that differed only by CRLF are normalized.
2026-10-21 13:29:31 +02:00
cthangover daec67f350 Scenario action party.add
Lets a game without C# give the player a character from a scenario.
2026-10-21 13:22:18 +02:00
5 changed files with 71 additions and 0 deletions

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
+6
View File
@@ -1,2 +1,8 @@
mod_characters_base_name = Characters Engine mod_characters_base_name = Characters Engine
mod_characters_base_desc = Engine characters subsystem: character and action-card factories, the avatar factory and the character panel UI. Kernel resolves templates through ICharacterTemplateProvider/IActionTemplateProvider/IAvatarProvider contracts. mod_characters_base_desc = Engine characters subsystem: character and action-card factories, the avatar factory and the character panel UI. Kernel resolves templates through ICharacterTemplateProvider/IActionTemplateProvider/IAvatarProvider contracts.
characters/action/physics_attack/name = Basic attack
characters/action/physics_attack/description = Attacks an enemy with a weapon, with a damage multiplier of <g>1.0</g>
characters/action/defence/name = Defence
characters/action/defence/description = Protects the target with a defence multiplier of <g>1.0</g>
characters/action/stun/name = Stun
characters/action/stun/description = Stuns the target for 2 turns
+6
View File
@@ -1,2 +1,8 @@
mod_characters_base_name = Движок персонажей mod_characters_base_name = Движок персонажей
mod_characters_base_desc = Подсистема персонажей движка: фабрики персонажей и боевых карточек, фабрика аватаров и панель персонажа. Ядро получает шаблоны через контракты ICharacterTemplateProvider/IActionTemplateProvider/IAvatarProvider. mod_characters_base_desc = Подсистема персонажей движка: фабрики персонажей и боевых карточек, фабрика аватаров и панель персонажа. Ядро получает шаблоны через контракты ICharacterTemplateProvider/IActionTemplateProvider/IAvatarProvider.
characters/action/physics_attack/name = Простая атака
characters/action/physics_attack/description = Атакует врага оружием, с коэффициентом урона <g>1.0</g>
characters/action/defence/name = Защита
characters/action/defence/description = Защищает цель с коэффициентом защиты <g>1.0</g>
characters/action/stun/name = Ошеломление
characters/action/stun/description = Ошеломляет цель на 2 хода
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

+29
View File
@@ -0,0 +1,29 @@
using Cthangover.Core.Actions;
namespace Cthangover.Mods.Characters
{
/// <summary>
/// <c>action party.add id=hero</c> — puts a character template into the
/// player's party and battle set. Lets a game without C# give the player
/// their starting party from its first scenario (a new game resets the
/// party and replays that scenario). A character already in the roster keeps
/// their level and health and only returns to the battle set.
/// </summary>
public class PartyAddAction : IScenarioAction
{
/// <summary>DSL name.</summary>
public string Name => "party.add";
/// <summary>Reads <c>id</c> and adds the character.</summary>
public void Run(IActionContext ctx)
{
var id = ctx.GetParam("id");
if (string.IsNullOrWhiteSpace(id))
{
ctx.LogWarning("EVENT", "party.add: missing 'id'");
return;
}
ctx.Character.AddToParty(id.Trim());
}
}
}