55 lines
2.1 KiB
C#
55 lines
2.1 KiB
C#
#nullable enable
|
|
|
|
using System.Collections.Generic;
|
|
using ReplacedPerson.Core;
|
|
|
|
namespace ExampleGreedMod
|
|
{
|
|
public sealed class ExampleGreedRules : IReplacedPersonMod
|
|
{
|
|
public string Id => "example.greedy-training";
|
|
public string Version => "1.0.0";
|
|
|
|
public void Register(IReplacedPersonRegistry registry)
|
|
{
|
|
registry.RegisterCard(new ReplacedCardDefinition
|
|
{
|
|
Id = "example.audit",
|
|
Name = "审计",
|
|
Description = "测试卡:反击成功后额外恢复 1 COST。",
|
|
EffectType = ReplacedEffectType.Counter,
|
|
Cost = 2,
|
|
BaseValue = 4,
|
|
Factor = 2,
|
|
SpecialEffectId = "example.audit-refund"
|
|
});
|
|
registry.RegisterEffectResolver("example.audit-refund", new AuditRefundResolver());
|
|
registry.RegisterEnemy(new ReplacedEnemyDefinition
|
|
{
|
|
Id = "example.training",
|
|
Name = "训练用审计员",
|
|
MaxHealth = 18,
|
|
NormalDeck = new List<string>
|
|
{
|
|
"example.audit", "example.audit", "attack.kill", "attack.kill", "attack.elbow", "attack.elbow",
|
|
"dodge.flash", "dodge.flash", "counter.blood", "counter.blood", "greed.snob", "greed.snob"
|
|
},
|
|
EndDeck = new List<string> { "end.inherit", "end.ledger", "end.severance", "end.black" },
|
|
RewardIds = new List<string> { "example.audit" }
|
|
});
|
|
registry.RegisterReward("example.audit", "审计卡");
|
|
registry.RegisterStory("example.training.story", "审计训练", "账本上的每一行都在回望你。");
|
|
registry.RegisterCommand("example audit", _ => "audit-ready");
|
|
}
|
|
|
|
private sealed class AuditRefundResolver : IReplacedPersonEffectResolver
|
|
{
|
|
public ReplacedEffectResult Resolve(ReplacedEffectContext context) => new()
|
|
{
|
|
CostDelta = 1,
|
|
Log = "审计返还 1 COST"
|
|
};
|
|
}
|
|
}
|
|
}
|