Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48cbb73b0b | ||
|
|
daec67f350 |
No files matched your search
@@ -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
|
||||||
@@ -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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user