Skip to content

Feature: Add 121 strategy for 15-4 | 给15-4添加121策略 - #4946

Merged
LmeSzinc merged 4 commits into
LmeSzinc:devfrom
Metric-Void:dev
Jul 16, 2025
Merged

Feature: Add 121 strategy for 15-4 | 给15-4添加121策略#4946
LmeSzinc merged 4 commits into
LmeSzinc:devfrom
Metric-Void:dev

Conversation

@Metric-Void

Copy link
Copy Markdown
Contributor

Some new tutorials use the 1-2-1 strategy for 15-4, consisting of an overpowered fleet that handles all enemies and Boss 1 and 3. The secondary fleet handles Boss 2 only.

Thanks to the slicing in the following lines, adding a suffix to the main campaign map file name does not interfere with the level name extraction. Therefore, it's possible to add a new, hypothetical level 15-4-121 that executes the 1-2-1 strategy on 15-4.

if folder.startswith('campaign_'):
self.stage = '-'.join(name.split('_')[1:3])

This PR allows the user to enter 15-4-121 as the level name and run 121 strategy on 15-4.

This is a sketchy and dirty patch, but cleaner than adding yet more parameters to the config just for 15-4 (and -3).

Tested in CN server clear mode and non-clear mode ONLY. Did not test CLEAR_ALL mode.


有些新的15图教程使用了121策略,用一个动力强劲的一队解决所有敌人以及Boss 1,3,而二队仅解决Boss2。

因为这段主线关卡名检索逻辑,在文件名后面加后缀不会影响关卡名的检测,也就是说可以定义一个虚拟的15-4-121关卡,来在15-4图上跑121策略。

if folder.startswith('campaign_'):
self.stage = '-'.join(name.split('_')[1:3])

这个PR能让用户在主线图中任务中使用15-4-121作为关卡名称,使用121逻辑刷15-4。

这个解决方法有点潦草,但感觉比在设置界面里加个专门为15-4(和-3)的选项要简洁一点。

仅在CN服务器测试过周回以及非周回模式,暂未测试全清模式。

@LmeSzinc

Copy link
Copy Markdown
Owner

从原有的地图继承信息而不是维护两份

@Metric-Void

Copy link
Copy Markdown
Contributor Author

已更改

@LmeSzinc LmeSzinc added the feature request / 功能请求 New feature or requests label Jul 16, 2025
@LmeSzinc
LmeSzinc merged commit f99d149 into LmeSzinc:dev Jul 16, 2025
LmeSzinc added a commit that referenced this pull request Jul 17, 2025
* Fix: handle get items in research queue quit

* Fix: missing interval

* Opt: Awaken Favourite Ships Only (#4957)

* Feature: Add 121 strategy for 15-4 | 给15-4添加121策略 (#4946)

* Add 15-4 121 strategy

* Assign a different CampaignMap::name so load_campaign can differentiate 15-4 and 15-4(121)

* Fix campaign map name again to prevent unnecessary reloading

* Inherit map

* Fix: [ALAS] remove warnings from multiscreen devices

* Fix: [ALAS] Worker might graceful exited after killing

it cleaned up itself, so main thread can't delete it

* Fix: [CN] PRIVATE_QUARTERS_INTERACT button (#4964)

---------

Co-authored-by: sui_feng <115386623+sui-feng-cb@users.noreply.github.com>
Co-authored-by: MetricVoid <21335640+Metric-Void@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request / 功能请求 New feature or requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants