-
Notifications
You must be signed in to change notification settings - Fork 48
Enhance attack system with armor, weapons, and configurable loot #4313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: claude/extract-vibe-actions-01MfWh6jg2PF1rWY8G2f8P71
Are you sure you want to change the base?
Enhance attack system with armor, weapons, and configurable loot #4313
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This comment has been minimized.
This comment has been minimized.
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on January 11. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
20578b4 to
6d4c201
Compare
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
2825fe3 to
f7d72ce
Compare
6d4c201 to
4497545
Compare
4497545 to
670fe9a
Compare
2543691 to
c44cd44
Compare
a0e5c88 to
8c37079
Compare
c44cd44 to
dc87b1d
Compare
8c37079 to
2d77cf2
Compare
2d77cf2 to
8a849ed
Compare
39544d8 to
abfd8d9
Compare
0883f93 to
dc3fc68
Compare
abfd8d9 to
3587ab3
Compare
3587ab3 to
5b8809f
Compare
dc3fc68 to
3a2f74d
Compare
This extracts the enhanced attack system from the daveey-cvc-arena branch: - armor_resources: Target resources that reduce incoming damage (weighted) - weapon_resources: Attacker resources that increase damage (weighted) - loot: Configurable list of resources to steal (or steal all, or steal nothing) - Vibe-based bonus: Vibing a resource gives +1 effective armor for that type Defense calculation: weapon_power = sum(attacker_inventory[item] * weapon_weight) armor_power = sum(target_inventory[item] * armor_weight) damage_bonus = max(weapon_power - armor_power, 0) cost_to_defend = defense_resources + damage_bonus Also includes unit tests for the enhanced attack system.
- Shorten loot field description to fit within 120 char limit - Apply ruff formatting to mettagrid_c_config.py
Two issues fixed: 1. initial_vibe not passed to CppAgentConfig - The initial_vibe field from Python AgentConfig was not being passed to the C++ config, causing the vibe armor bonus test to fail since agents always had vibe=0 regardless of initial_vibe setting. 2. Empty defense_resources bug (PR review) - When defense_resources was empty but armor_resources/weapon_resources were configured, attacks would always be blocked for free because the loop over empty defense_resources returned true immediately. Fixed by requiring defense_resources to be non-empty before checking defense capability. Armor/weapon resources only modify the defense cost, they don't enable defense by themselves.
AttackActionConfig now requires armor_resources and weapon_resources parameters after the enhanced attack system changes.
3a2f74d to
c4847af
Compare
5b8809f to
bbccc06
Compare

Enhanced Attack System
Defense calculation:
weapon_power = sum(attacker_inventory[item] * weapon_weight)
armor_power = sum(target_inventory[item] * armor_weight)
damage_bonus = max(weapon_power - armor_power, 0)
cost_to_defend = defense_resources + damage_bonus
Also includes unit tests for the enhanced attack system.