Skip to content

update:新增1.4.5版本鞭子适配挑战者#1151

Merged
ACaiCat merged 2 commits intoUnrealMultiple:masterfrom
AX-17:master
May 5, 2026
Merged

update:新增1.4.5版本鞭子适配挑战者#1151
ACaiCat merged 2 commits intoUnrealMultiple:masterfrom
AX-17:master

Conversation

@AX-17
Copy link
Copy Markdown
Contributor

@AX-17 AX-17 commented May 5, 2026

update:新增1.4.5版本鞭子适配挑战者

Summary by Sourcery

更新 Challenger 插件版本,并扩展鞭类处理逻辑以支持更多投射物。

增强内容:

  • 将插件版本从 1.1.8 提升到 1.1.9。
  • 将 Tiki 和 Spooky 护甲效果应用于 Terraria 1.4.5 中新增的鞭类投射物。
Original summary in English

Summary by Sourcery

Update Challenger plugin version and extend whip handling to support additional projectiles.

Enhancements:

  • Bump plugin version from 1.1.8 to 1.1.9.
  • Apply Tiki and Spooky armor effects to new whip projectiles introduced in Terraria 1.4.5.

@AX-17 AX-17 requested a review from a team as a code owner May 5, 2026 14:50
@ACaiCat ACaiCat added this pull request to the merge queue May 5, 2026
@ACaiCat ACaiCat removed this pull request from the merge queue due to a manual request May 5, 2026
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - 我发现了 1 个问题,并给出了一些整体性的反馈:

  • 在 switch 语句中不断增加的硬编码弹幕(projectile)ID,如果能分组为具名常量或枚举(例如 WhipProjectileIds),而不是使用带注释的裸数字字面量,会更容易维护和理解。
  • 建议把重复出现的 TikiArmorEffect / SpookyArmorEffect 调用提取到一个小的辅助方法中,这样可以让这个 switch 分支中的控制流更清晰,并在效果行为再次改变时减少重复代码。
给 AI Agent 的提示
Please address the comments from this code review:

## Overall Comments
- The growing list of hard-coded projectile IDs in the switch statement would be easier to maintain and reason about if they were grouped into named constants or an enum (e.g., `WhipProjectileIds`) instead of raw numeric literals with comments.
- Consider extracting the repeated `TikiArmorEffect` / `SpookyArmorEffect` calls into a small helper method to make the control flow in this switch case clearer and reduce duplication if the effect behavior changes again.

## Individual Comments

### Comment 1
<location path="src/Challenger/Challenger/Challenger.cs" line_range="1777-1786" />
<code_context>
             case 913:
             case 914:
             case 952:
-                this.TikiArmorEffect(null, args);
-                this.SpookyArmorEffect(args);
-                break;
+            case 1028:  // 蛛网鞭
+            case 1029:  // 魂笞
+            case 1030:  // 脉管
+            case 1031:  // 星坠
+            case 1032:  // 花儿的粗暴展示
+            case 1033:  // 电鳗
+            case 1034:  // 星座
+            case 1035:  // 支配之鞭
+            case 1104:  // 史莱姆鞭
             case 847:
             case 848:
             case 849:
             case 915:
+                this.TikiArmorEffect(null, args);
+                this.SpookyArmorEffect(args);
                 this.TikiArmorEffect(null, args, 1);
                 this.SpookyArmorEffect(args, 1);
                 break;
</code_context>
<issue_to_address>
**question (bug_risk):** Check whether the extra Tiki/Spooky effect calls for cases 913, 914, and 952 are intentional.

Previously, these cases only ran the first `TikiArmorEffect(null, args)` and `SpookyArmorEffect(args)` and then broke. Now they also run the stronger `TikiArmorEffect(null, args, 1)` and `SpookyArmorEffect(args, 1)` by falling through into the 847/848/849/915 block. Please confirm this behavioral change is intended; otherwise, consider reinstating the `break` or giving 913/914/952 their own block.
</issue_to_address>

Sourcery 对开源项目免费 —— 如果你觉得这些评审有帮助,请考虑分享 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进评审质量。
Original comment in English

Hey - I've found 1 issue, and left some high level feedback:

  • The growing list of hard-coded projectile IDs in the switch statement would be easier to maintain and reason about if they were grouped into named constants or an enum (e.g., WhipProjectileIds) instead of raw numeric literals with comments.
  • Consider extracting the repeated TikiArmorEffect / SpookyArmorEffect calls into a small helper method to make the control flow in this switch case clearer and reduce duplication if the effect behavior changes again.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The growing list of hard-coded projectile IDs in the switch statement would be easier to maintain and reason about if they were grouped into named constants or an enum (e.g., `WhipProjectileIds`) instead of raw numeric literals with comments.
- Consider extracting the repeated `TikiArmorEffect` / `SpookyArmorEffect` calls into a small helper method to make the control flow in this switch case clearer and reduce duplication if the effect behavior changes again.

## Individual Comments

### Comment 1
<location path="src/Challenger/Challenger/Challenger.cs" line_range="1777-1786" />
<code_context>
             case 913:
             case 914:
             case 952:
-                this.TikiArmorEffect(null, args);
-                this.SpookyArmorEffect(args);
-                break;
+            case 1028:  // 蛛网鞭
+            case 1029:  // 魂笞
+            case 1030:  // 脉管
+            case 1031:  // 星坠
+            case 1032:  // 花儿的粗暴展示
+            case 1033:  // 电鳗
+            case 1034:  // 星座
+            case 1035:  // 支配之鞭
+            case 1104:  // 史莱姆鞭
             case 847:
             case 848:
             case 849:
             case 915:
+                this.TikiArmorEffect(null, args);
+                this.SpookyArmorEffect(args);
                 this.TikiArmorEffect(null, args, 1);
                 this.SpookyArmorEffect(args, 1);
                 break;
</code_context>
<issue_to_address>
**question (bug_risk):** Check whether the extra Tiki/Spooky effect calls for cases 913, 914, and 952 are intentional.

Previously, these cases only ran the first `TikiArmorEffect(null, args)` and `SpookyArmorEffect(args)` and then broke. Now they also run the stronger `TikiArmorEffect(null, args, 1)` and `SpookyArmorEffect(args, 1)` by falling through into the 847/848/849/915 block. Please confirm this behavioral change is intended; otherwise, consider reinstating the `break` or giving 913/914/952 their own block.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines 1777 to +1786
case 913:
case 914:
case 952:
this.TikiArmorEffect(null, args);
this.SpookyArmorEffect(args);
break;
case 1028: // 蛛网鞭
case 1029: // 魂笞
case 1030: // 脉管
case 1031: // 星坠
case 1032: // 花儿的粗暴展示
case 1033: // 电鳗
case 1034: // 星座
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question (bug_risk): 请检查对 case 913、914 和 952 额外调用 Tiki/Spooky 效果是否是有意为之。

之前,这几个 case 只会执行第一次 TikiArmorEffect(null, args)SpookyArmorEffect(args) 然后直接跳出(break)。现在它们会继续向下落入 847/848/849/915 这个分支,从而额外执行更强力的 TikiArmorEffect(null, args, 1)SpookyArmorEffect(args, 1)。请确认这种行为变更是否是预期的;如果不是,建议恢复中间的 break,或者给 913/914/952 单独的分支块。

Original comment in English

question (bug_risk): Check whether the extra Tiki/Spooky effect calls for cases 913, 914, and 952 are intentional.

Previously, these cases only ran the first TikiArmorEffect(null, args) and SpookyArmorEffect(args) and then broke. Now they also run the stronger TikiArmorEffect(null, args, 1) and SpookyArmorEffect(args, 1) by falling through into the 847/848/849/915 block. Please confirm this behavioral change is intended; otherwise, consider reinstating the break or giving 913/914/952 their own block.

@ACaiCat
Copy link
Copy Markdown
Member

ACaiCat commented May 5, 2026

写一下更新日志,在插件的README下面

@AX-17
Copy link
Copy Markdown
Contributor Author

AX-17 commented May 5, 2026

好了

@ACaiCat ACaiCat added this pull request to the merge queue May 5, 2026
Merged via the queue into UnrealMultiple:master with commit 1b4e927 May 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants