Refactor Amulet system 重构护符系统 - #5042
QiuShui1012 wants to merge 4 commits into
Conversation
…ctAmuletEffect to GiveMobEffectAmuletEffect
|
⏳ Retrying in 2.2s (attempt 1/3)... |
|
⏳ Retrying in 5.7s (attempt 2/3)... |
|
❌ API failed after 3 retries — HTTP 503: Service temporarily unavailable |
|
API call failed after 3 retries: HTTP 503: Service temporarily unavailable |
|
⏳ Retrying in 2.3s (attempt 1/3)... |
|
⏳ Retrying in 5.0s (attempt 2/3)... |
|
❌ API failed after 3 retries — HTTP 503: Service temporarily unavailable |
|
API call failed after 3 retries: HTTP 503: Service temporarily unavailable |
|
验证工作已完成。以下是审查结论。 代码审查摘要 — PR #5042(Draft)操作: edited | 当前状态:draft(草稿),mergeable_state=clean ✅ 已独立核对的项(不阻塞)
|
| 被测目标 | 推荐场景 | 优先级 |
|---|---|---|
AmuletManager.getActiveEffects / isAmuletActive |
同时佩戴 GEM 与 EMERALD(引用去重:效果只触发一次、raffle 概率不重复给);只戴 EMERALD 时 GEM 判为未激活 | 🔴 |
AmuletAbilitiesEventListener.onInventoryTick 的 disabled pass |
摘下 ANVIL 后击退抗性修饰符必须被移除;客户端侧不应产生残留状态(双端一致性) | 🔴 |
GiveMobEffectAmuletEffect 时长/上下界 |
RUBY 不在岩浆→时长累加并在 3600 封顶;REFRESH_TICKS=2 的刷新型 buff 在条件持续时永不超时、条件消失后 ≤2 tick 内消失 |
🔴 |
LivingEntityMixin.letAmuletProcess |
ABNORMAL 护符进食负面效果不生效、正面效果仍生效;非进食路径的 addEffect 不受影响 |
🟡 |
IgnoreMobTargetAmuletEffect + 各 mixin |
ARMADILLO↔蜘蛛、DOG↔全部骷髅、CAT↔苦力怕/幻翼、EMERALD↔铁傀儡(含 setLastHurtByMob) |
🟡 |
DiscountAmuletEffect |
表达式 x*0.8 叠加与 IExpression.of(0.3);rate>1 时价格兜底不为 0/负 |
🟡 |
WrapOtherAmuletEffect.flatten 惰性缓存 |
注册表加载前调用一次后再调用,验证缓存不残留空集 | 🟢 |
由 Hermes Agent 审查(diff: patch-diff.githubusercontent.com;mixin/库 API 用 Mojang 1.21.1 mappings + 混淆客户端字节码、anvillib 2.0.0+snapshot.534 jar 常量池逐项核对)
|
💾 Self-improvement review: Patched SKILL.md in skill 'offline-pr-evidence-verification' (1 replacement). · Patched SKILL.md in skill 'registry-driven-refactor-pr-review' (1 replacement). |
提供移植指南:AMULET_REFACTOR_MIGRATION.md