Skip to content

闪耀!优俊少女(国服赛马娘)的辅助工具。用于自动化操作。

License

Notifications You must be signed in to change notification settings

Miltomo/Shining-BeautifulGirls-Tools

Repository files navigation

简介

SBGT(Shining!BeautifulGirls-Tools),是本人自用自制的手游《闪耀!优俊少女》(国服赛马娘)的辅助工具。 主要用途是自动化操作。减轻游玩负担,拒绝重复劳动。

  • 源代码
  • C#/.NET
  • WPF

软件获取方式

前往SBGT-Release直接下载发布版本或自行构建


贡献

★编写新的养成算法★

  1. src/girl/Logic文件夹下新建你的算法.cs或直接复制Template.cs
  2. 你需要在ShiningGirl类下新建一个属于你的算法类,并继承自ShiningGirl.Algorithm。具体代码如下:
    namespace Shining_BeautifulGirls
    {
        partial class ShiningGirl
        {
            class 你的算法 : Algorithm
            {
            }
        }
    }
  3. 编写算法主体:你最少需要实现ScoreSelect这两个函数:
    Score接受一个Plan变量,返回double,内容是为一个计划打分;
    Select为无参数函数,返回Plan,内容是选择一项合适的计划。
    整个算法的实现过程就是先为所有可能的项目打分,最后根据得分(或其他因素),选出最合适的要执行的项目。
    具体代码如下:
    class YourAlgorithm : Algorithm
    {
        // 构造函数
        public YourAlgorithm(ShiningGirl girl) : base(girl)
        {
        }
    
        // 实现你的打分逻辑
        protected override double Score(Plan info)
        {
            throw new NotImplementedException();
        }
    
        // 实现你的选择逻辑
        protected override Plan Select()
        {
            throw new NotImplementedException();
        }
    }
  4. 注册算法:找到Shining BeautifulGirls\src\girl\Logic\Base\AlgorithmItem.cs,在其中的代号Enum里添加新的代号
    然后找到public static AlgorithmItem[] Algorithms,在其中添加新项,AlgorithmItem.Build("算法名","算法介绍",AlgorithmItem.代号Enum.算法代号)
  5. API参考:详见..\girl\Logic\Base\Base.cs
    注意,作为规则,只能使用基类Algorithm提供的变量与函数,不可直接用girl调用,更一般的,除构造函数外,不应再访问girl变量。

About

闪耀!优俊少女(国服赛马娘)的辅助工具。用于自动化操作。

Resources

License

Stars

Watchers

Forks

Languages