Skip to content

V2 test#17

Merged
arumes31 merged 8 commits into
mainfrom
v2_test
Jun 7, 2026
Merged

V2 test#17
arumes31 merged 8 commits into
mainfrom
v2_test

Conversation

@arumes31
Copy link
Copy Markdown
Owner

@arumes31 arumes31 commented Jun 7, 2026

Summary by CodeRabbit

Release Notes

New Features

  • Auction house for trading items with other players
  • Environmental hazards that impact combat in different zones
  • Stealth mechanics allowing ambush attacks
  • Redesigned combat system with waves, combos, and position-based bonuses
  • Element-based damage matchups between attacker and defender gear

Rebalancing

  • Prestige stat bonus increased to 15% per prestige level (from 5%)
  • New scrap salvage system for unwanted loot
  • Gold economy with inflation-based scaling
  • Enhanced rarity-based item drops and equipment recommendations

@arumes31 arumes31 merged commit fdff9ff into main Jun 7, 2026
7 of 8 checks passed
@arumes31 arumes31 deleted the v2_test branch June 7, 2026 13:52
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 7, 2026

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b3bf70b2-b702-4cf4-a48d-2b0a0e9357ac

📥 Commits

Reviewing files that changed from the base of the PR and between ef5af54 and af5078c.

📒 Files selected for processing (37)
  • .gitignore
  • battle_simulation.py
  • cmd/simulation/chaos/main.go
  • cmd/simulation/main.go
  • internal/bot/auction.go
  • internal/bot/bot.go
  • internal/bot/bot_extra_test.go
  • internal/bot/loot_sync.go
  • internal/bot/prestige.go
  • internal/bot/prestige_test.go
  • internal/bot/xp.go
  • internal/bot/xp_extra_test.go
  • internal/bot/xp_fuzz_test.go
  • internal/bot/xp_test.go
  • internal/config/config_test.go
  • internal/content/artifacts.go
  • internal/content/artifacts_test.go
  • internal/content/hazards.go
  • internal/content/hazards_test.go
  • internal/content/mobs.go
  • internal/content/mobs_extra_test.go
  • internal/content/mobs_test.go
  • internal/content/skills.go
  • internal/content/skills_test.go
  • internal/content/stealth.go
  • internal/content/stealth_test.go
  • internal/content/unique_items_test.go
  • internal/content/zones.go
  • internal/content/zones_test.go
  • internal/db/migrations/0020_scrap_stack.down.sql
  • internal/db/migrations/0020_scrap_stack.up.sql
  • internal/db/migrations/0021_auction_house.down.sql
  • internal/db/migrations/0021_auction_house.up.sql
  • internal/leveling/leveling.go
  • internal/leveling/leveling_extra_test.go
  • internal/leveling/leveling_fuzz_test.go
  • internal/leveling/leveling_test.go

📝 Walkthrough

Walkthrough

This PR overhauls the combat system from basic attacks into a multi-layered engine with environmental hazards, stealth detection, elemental matchups, and positional mechanics. It introduces an auction house economy, increases prestige stat scaling, and refactors XP/loot reward distribution. The changes span Python simulation, Go bot framework, database schema, and comprehensive test coverage.

Changes

Core Combat System Expansion

Layer / File(s) Summary
Content Model & Type System Foundation
internal/content/artifacts.go, internal/content/mobs.go, internal/content/skills.go, internal/content/artifacts_test.go, internal/content/mobs_test.go, internal/content/mobs_extra_test.go, internal/content/skills_test.go
New Element and Position types enable elemental advantage and positional combat bonuses. Gear gains an Element field, Consumable.EffectValue becomes float64, and UserInCombat struct tracks runtime combat state (gold, equipped gear, position, stat modifiers). Mob gains separate CurrentHP/MaxHP, element affinity, temporary stat modifiers, and a Clone() method. UltimateSkill adds a Special field, and Rarity adds a Color() helper for BBCode rendering.
Hazard and Stealth Combat Systems
internal/content/hazards.go, internal/content/stealth.go, internal/content/zones.go, internal/content/hazards_test.go, internal/content/stealth_test.go, internal/content/zones_test.go, internal/content/unique_items_test.go
Complete environmental hazard system with zone-specific hazard selection, damage-over-time, stat reduction, and protective gear/consumable recommendations. Full stealth mechanic with player stealth calculation, mob detection profiles, probabilistic detection, and undetected attack bonuses. Zone effects expanded with named hazard entries (Lava Pools, Toxic Fumes, Sandstorm, Blizzard).
Combat Resolution & XP Rewards
internal/bot/xp.go, internal/bot/xp_extra_test.go, internal/bot/xp_fuzz_test.go, internal/bot/xp_test.go, battle_simulation.py
Multi-wave combat engine with element effectiveness via getElementMult, positional bonuses for backline, lifesteal from vampiric gear, ultimate skill activation/cooldown, and chain attacks. Reward distribution includes gold inflation based on global economy, dynamic level-scaling XP penalties, gear-based XP multipliers, and scrap salvage for unwanted loot. Python simulation rewritten with wave-based rounds, simplified healing, and element/position mechanics.
Bot Combat Batching and Messaging
internal/bot/bot.go, internal/bot/bot_extra_test.go, internal/bot/loot_sync.go
Bot cycle reads extended user state (prestige, gold), equips gear, and calls combat with additional parameters. Per-user loot distribution replaces channel-wide pool. Auction-house auto-purchase appends to notes. Channel descriptions now display formatted gold, colored HP bars, and increased truncation. FormatGold helper renders compact numeric formatting (B/M/k). Loot group sync refactored to use type strings (slot:<slot>, artifact, skill:<n>, pet) instead of slot enums.
Economy System & Prestige Balance
internal/bot/auction.go, internal/bot/prestige.go, internal/bot/prestige_test.go, internal/leveling/leveling.go, internal/leveling/leveling_extra_test.go
New AuctionItem struct and auction-house functions (autoListUnwantedItems, listAuctionItem, autoPurchaseUpgrades) enable player-to-player trading with 24-hour expiry and transactional buyer/seller updates. prestigeStatBonus increased from 0.05 to 0.15 (+15% per prestige). XP curve formula changed to static exponent Pow(level-1, 1.65) * 5.0 for smoother long-term scaling.

Testing & Simulation Infrastructure

Layer / File(s) Summary
Python and Go Simulation Frameworks
cmd/simulation/chaos/main.go, cmd/simulation/main.go
New runChaosSim runs concurrent goroutine-based combat across users with atomic counters tracking wins/losses/XP/gold/prestiges, applies inflation multiplier, and prints aggregated statistics. runLootSim performs Monte Carlo rarity rolls and prints per-rarity distribution. Linter suppression added for RNG initialization.
Content and Bot Unit Tests
internal/content/artifacts_test.go, internal/content/hazards_test.go, internal/content/mobs_test.go, internal/bot/bot_extra_test.go, internal/bot/xp_extra_test.go, internal/bot/xp_fuzz_test.go, internal/bot/xp_test.go
Comprehensive test suite covering rarity colors/combat ratings, hazard application/resistance, mob spawning/display, bot helpers (FormatGold, composePM, composePoke), streak/server multipliers, and fuzz tests for element matchups, gold formatting, and loot box XP. Full resolveChannelCombat mock test with victory/defeat subtests.
Leveling and Configuration Tests
internal/leveling/leveling_test.go, internal/leveling/leveling_extra_test.go, internal/leveling/leveling_fuzz_test.go, internal/config/config_test.go, internal/content/skills_test.go, internal/content/zones_test.go, internal/content/unique_items_test.go
Leveling tests validate XP/level round-trips, level name parsing, and Roman numeral helpers via table-driven and fuzz approaches. Config tests verify environment parsing, .env file loading with precedence, and DRM filter list parsing. Content tests validate skill scoring, ultimate skill logic, zone generation, and unique item generation.

Configuration & Database Schema

Layer / File(s) Summary
Build Configuration and Linting
.gitignore, cmd/simulation/main.go
Updated .gitignore expands Python simulation ignores (add monte_carlo_simulation.py, remove others), adds general *.env with example.env exception, reorganizes AI-assistant metadata ignores, includes IDE directories (.idea/, .vscode/), and expands top-level simulation binary ignores (/sim, /chaos_sim, .exe variants). Linter suppression // #nosec G404 added for RNG code.
Database Schema Extensions
internal/db/migrations/0020_scrap_stack.{up,down}.sql, internal/db/migrations/0021_auction_house.{up,down}.sql
Migration 0020 adds users.scrap_stack INTEGER NOT NULL DEFAULT 0 for salvage tracking. Migration 0021 adds users.gold BIGINT NOT NULL DEFAULT 0 and creates auction_house table with seller/buyer FK references, JSONB item data, timestamp constraints, and partial index on active listings.

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly Related PRs

  • arumes31/ts3news#10: Both PRs modify internal/content/mobs.go's mob scaling/spawn logic including level/difficulty-based stat/XP scaling and spawn-count calculations.

  • arumes31/ts3news#12: Both PRs directly overlap on .gitignore updates and substantial additions to cmd/simulation/main.go for simulation framework changes.

  • arumes31/ts3news#11: Both PRs modify the core combat/XP system in internal/bot/xp.go (combat/element/heal/reward logic) and post-battle messaging in internal/bot/bot.go (user outcome handling and prestige flow).

🐰 Waves, combo chains, and hazards galore,
Elements clash on combat's floor,
Prestige blooms thrice as bright,
Auction houses, loot, and stealth in night—
What epic tales unfold in store!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch v2_test

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.

1 participant