fix(parser): bind Kentaro alternative cost to mana value - #7325
Conversation
|
Warning Review limit reached
Next review available in: 13 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughKentaro’s ChangesKentaro alternative cost
Estimated code review effort: 2 (Simple) | ~15 minutes Mergeability Score: 🟡 Moderate · up to The regression test does not distinguish Kentaro’s alternative cost from the spell’s normal cost, so an incorrect cast path could still pass. Merge readiness therefore depends on updating the test to require the colored normal cost to fail while the generic alternative cost succeeds. Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/engine/tests/integration/issue_5899_kentaro_alternative_cost.rs`:
- Around line 20-29: Update the test setup around the Test Samurai created by
add_creature_to_hand so its normal mana cost has mana value 3 but requires
colored mana, while preserving the pool of only three colorless mana; ensure the
cast therefore succeeds only through Kentaro’s resolved generic alternative
cost.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 8f628df9-0cf5-4688-8ad6-c495363ccbd8
📒 Files selected for processing (6)
crates/engine/src/game/casting.rscrates/engine/src/game/keywords.rscrates/engine/src/parser/oracle_static/cost_mod.rscrates/engine/src/parser/oracle_static/tests.rscrates/engine/tests/integration/issue_5899_kentaro_alternative_cost.rscrates/engine/tests/integration/main.rs
|
Generated for head Parse changes introduced by this PR · 1 card(s), 2 signature(s) (baseline: main
|
Fixes #5899.
Summary by CodeRabbit
Bug Fixes
{X}to correctly match the affected spell’s mana value.Tests