fix: 修复理智药插件中变量名错误;调整文档中理智药相关说明 (#7147)

fix: 修复理智药插件中变量名错误;调整文档中理智药相关说明
This commit is contained in:
status102
2023-11-02 12:43:49 +08:00
committed by GitHub
6 changed files with 12 additions and 12 deletions

View File

@@ -27,7 +27,7 @@ icon: ic:baseline-article
- 主界面上的 `吃理智``吃石头``指定次数``指定材料` 四个选项为**短路开关(或门)**,即达成四个选项中的任一条件,均会视为任务完成,停止刷理智。
- 其中:
- `吃理智` 指定吃理智药**次数**(通常每次 1 份,即理智耗尽后开始作战时游戏默认选择的一份;小样由于理智较少可能会使用多次,请注意自行计算次数)。
- `吃理智` 指定吃几瓶理智药(一次可能吃多瓶)。
- `吃石头` 指定碎石多少次(每次 1 颗)。
- `指定次数` 指定刷多少次图(例如“刷 15 次后停止”)。
- `指定材料` 指定刷多少个指定的材料(例如“获取 5 个固源岩后停止”)。

View File

@@ -17,7 +17,7 @@
<!--For the re-engraved SS event, you can enter `SSReopen-XX` to clear XX-1 ~ XX-9 levels at one time. Such as `SSReopen-IC`.-->
- Fight options include `Use Sanity Potion`, `Use Originium`, `Perform Battles` and `Material`, you can specific any of them. The fight tasks stops once one of the specifications is met.
- `Use Sanity Potion` specifies the number of sanity potions to use at most. Note that the potion is usually used one at a time which is the one default by the game client when current sanity is not enough for the next fight. However, Santity Samplers offer a smaller amount of sanity and thus might be used more than one at a time. Pay attention to this when specifying the number of potions to use.
- `Use Sanity Potion` specifies the number of sanity potions to use at most. Multiple medicines may be used at a time.
- `Use Originium` specifies the number of Originium to use at most. It is used one at a time.
- `Perform Battles` specifies the number of battles to perform at most.
- `Material` specifies the number of materials to collect.

View File

@@ -28,7 +28,7 @@
- スタート画面の `理性剤使用数``割る源石の数``周回数指定``素材を限定` の4つのオプションはショートスイッチですので、**4つのオプションのいずれかを達成した場合**、それはタスクの完了と見なされます。
- 以下のうち:
- `理性剤使用数` 理性剤を飲む**回数**(普通は毎回 1 個使用しますが、理性が不足した際にデフォルトで選ばれる理性剤が選択されます(試供回復材など理性回復量が少ない場合もあるため、自分でも数を把握するようにしてください))
- `理性剤使用数` 理性剤使用数量制限(複数のボトルを一度に使用できます)
- `割る源石の数` 源石を割る回数を指定1回につき 1 個)
- `周回数指定` ステージを何回周回するか指定例“15 周 で停止”)
- `素材を限定` 特定の素材のドロップ数が手に入るまで周回例“5 個 初級源岩獲得で停止”)

View File

@@ -16,7 +16,7 @@
- `이성 회복제`, `순오리지늄`, `횟수 제한`, `드롭 제한` 네 가지의 스위치가 있습니다. 이 중 하나에 도달하면 작업이 완료된 것으로 처리되며 작전이 중지됩니다.
- 其中:
- `이성 회복제` 이성 회복제 사용의 **빈도** (일반적으로는 1개씩 사용하지만, 회복제 샘플과 같이 회복량이 적은 경우도 있기 때문에 어느 정도 갯수를 파악해둘 필요가 있습니다.)
- `이성 회복제` 정신건강약 사용 수량 제한 (한 번에 여러 병을 사용할 수 있습니다.)
- `순오리지늄` 사용 횟수 (1회당 1개)
- `횟수 제한` 스테이지를 플레이할 횟수를 지정합니다. (예시: 15회 플레이 후 중지)
- `드롭 제한` 지정된 재료의 드롭 수를 지정합니다. (예시: 5개의 원암 드롭 후 중지)

View File

@@ -27,7 +27,7 @@ icon: ic:baseline-article
- 主介面上的 `吃理智``吃石頭``指定次數``指定材料` 四個選項為 **短路開關(或門)**,即 **四個選項中的任一條件** 達到,均會視為任務完成,停止刷理智。
- 其中:
- `吃理智` 指定吃理智藥**次數**(通常每次 1 份,即理智耗盡後開始作戰時遊戲預設選擇的一份;小樣由於理智較少可能會使用多次,請注意自行計算次數
- `吃理智` 指定吃幾瓶理智藥(一次可能吃多瓶
- `吃石頭` 指定碎石多少次(每次 1 顆)
- `指定次數` 指定刷多少次圖(例如 “刷 15 次後停止”
- `指定材料` 指定刷多少個指定的材料(例如 “獲取 5 個固源岩後停止”

View File

@@ -124,11 +124,11 @@ std::optional<asst::MedicineCounterPlugin::InitialMedicineResult> asst::Medicine
return std::nullopt;
}
RegionOCRer inventry_ocr(image);
inventry_ocr.set_task_info(inventory_task);
inventry_ocr.set_bin_threshold(inventory_task->special_params[0], inventory_task->special_params[1]);
inventry_ocr.set_roi(inventory_rect);
if (!inventry_ocr.analyze()) {
RegionOCRer inventory_ocr(image);
inventory_ocr.set_task_info(inventory_task);
inventory_ocr.set_bin_threshold(inventory_task->special_params[0], inventory_task->special_params[1]);
inventory_ocr.set_roi(inventory_rect);
if (!inventory_ocr.analyze()) {
Log.error(__FUNCTION__, "medicine using count analyze failed");
return std::nullopt;
}
@@ -148,9 +148,9 @@ std::optional<asst::MedicineCounterPlugin::InitialMedicineResult> asst::Medicine
int using_count = 0, inventory_count = 0;
if (!utils::chars_to_number(using_count_ocr.get_result().text, using_count) ||
!utils::chars_to_number(inventry_ocr.get_result().text, inventory_count)) {
!utils::chars_to_number(inventory_ocr.get_result().text, inventory_count)) {
Log.error(__FUNCTION__, "unable to convert ocr result to int, use:", using_count_ocr.get_result().text,
", inventory:", inventry_ocr.get_result().text);
", inventory:", inventory_ocr.get_result().text);
return std::nullopt;
}
use += using_count;