Skip to content

Conversation

@daveey
Copy link
Contributor

@daveey daveey commented Dec 10, 2025

Enhanced Attack System

  • 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.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@datadog-official

This comment has been minimized.

@cursor
Copy link

cursor bot commented Dec 11, 2025

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.

@daveey daveey requested a review from sasmith December 11, 2025 04:24
@openhands-ai
Copy link

openhands-ai bot commented Dec 11, 2025

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Test and Benchmark

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #4313 at branch `claude/extract-attack-system-013Fd6xd9xPLzvsNNDpAspZ5`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

@daveey daveey changed the base branch from main to graphite-base/4313 December 16, 2025 08:03
@daveey daveey force-pushed the claude/extract-attack-system-013Fd6xd9xPLzvsNNDpAspZ5 branch from 20578b4 to 6d4c201 Compare December 16, 2025 08:03
@daveey daveey changed the base branch from graphite-base/4313 to claude/extract-vibe-actions-01MfWh6jg2PF1rWY8G2f8P71 December 16, 2025 08:03
Copy link
Contributor Author

daveey commented Dec 16, 2025

@daveey daveey force-pushed the claude/extract-vibe-actions-01MfWh6jg2PF1rWY8G2f8P71 branch from 2825fe3 to f7d72ce Compare December 16, 2025 08:10
@daveey daveey force-pushed the claude/extract-attack-system-013Fd6xd9xPLzvsNNDpAspZ5 branch from 6d4c201 to 4497545 Compare December 16, 2025 08:10
@daveey daveey changed the title Extract and refactor enhanced attack system Enhance attack system with armor, weapons, and configurable loot Dec 16, 2025
@daveey daveey force-pushed the claude/extract-attack-system-013Fd6xd9xPLzvsNNDpAspZ5 branch from 4497545 to 670fe9a Compare December 16, 2025 18:57
@daveey daveey force-pushed the claude/extract-vibe-actions-01MfWh6jg2PF1rWY8G2f8P71 branch from 2543691 to c44cd44 Compare December 21, 2025 20:33
@daveey daveey force-pushed the claude/extract-attack-system-013Fd6xd9xPLzvsNNDpAspZ5 branch from a0e5c88 to 8c37079 Compare December 21, 2025 20:33
@daveey daveey force-pushed the claude/extract-vibe-actions-01MfWh6jg2PF1rWY8G2f8P71 branch from c44cd44 to dc87b1d Compare December 22, 2025 18:23
@daveey daveey force-pushed the claude/extract-attack-system-013Fd6xd9xPLzvsNNDpAspZ5 branch from 8c37079 to 2d77cf2 Compare December 22, 2025 18:23
@daveey daveey force-pushed the claude/extract-attack-system-013Fd6xd9xPLzvsNNDpAspZ5 branch from 2d77cf2 to 8a849ed Compare December 23, 2025 04:18
@daveey daveey force-pushed the claude/extract-vibe-actions-01MfWh6jg2PF1rWY8G2f8P71 branch from 39544d8 to abfd8d9 Compare December 23, 2025 04:40
@daveey daveey force-pushed the claude/extract-attack-system-013Fd6xd9xPLzvsNNDpAspZ5 branch 2 times, most recently from 0883f93 to dc3fc68 Compare December 25, 2025 15:51
@daveey daveey force-pushed the claude/extract-vibe-actions-01MfWh6jg2PF1rWY8G2f8P71 branch from abfd8d9 to 3587ab3 Compare December 25, 2025 15:51
@daveey daveey force-pushed the claude/extract-vibe-actions-01MfWh6jg2PF1rWY8G2f8P71 branch from 3587ab3 to 5b8809f Compare December 25, 2025 16:05
@daveey daveey force-pushed the claude/extract-attack-system-013Fd6xd9xPLzvsNNDpAspZ5 branch from dc3fc68 to 3a2f74d Compare December 25, 2025 16:05
claude and others added 6 commits December 29, 2025 13:28
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.
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.

4 participants