← Back to Game

Bonk Brawlers Documentation

Complete PFP Builder & Game Documentation Statistics

⚔️ Combat System

Battle Resolution Algorithm

// Rust implementation of battle resolution use rand::Rng; #[derive(Debug)] struct Gladiator { attack: u16, speed: u16, dexterity: u16, defence: u16, health: u16, equipment: Equipment, } impl Gladiator { fn calculate_damage(&self, target: &Gladiator) -> u16 { let base_damage = self.attack + self.equipment.weapon_rating; let armor_reduction = target.defence + target.equipment.armor_rating; let critical_chance = self.dexterity as f32 / 1000.0 * 0.2; let mut rng = rand::thread_rng(); let is_critical = rng.gen::() < critical_chance; let damage = if is_critical { (base_damage as f32 * 1.5) as u16 } else { base_damage }; std::cmp::max(1, damage.saturating_sub(armor_reduction / 2)) } fn calculate_initiative(&self) -> u16 { self.speed + (self.dexterity / 4) + self.equipment.boots_rating / 2 } } fn simulate_battle(mut fighter1: Gladiator, mut fighter2: Gladiator) -> u8 { fighter1.health = 1000 + (fighter1.defence * 2); fighter2.health = 1000 + (fighter2.defence * 2); let mut round = 0; while fighter1.health > 0 && fighter2.health > 0 && round < 100 { let init1 = fighter1.calculate_initiative(); let init2 = fighter2.calculate_initiative(); if init1 >= init2 { let damage = fighter1.calculate_damage(&fighter2); fighter2.health = fighter2.health.saturating_sub(damage); if fighter2.health == 0 { return 1; } let damage = fighter2.calculate_damage(&fighter1); fighter1.health = fighter1.health.saturating_sub(damage); } else { let damage = fighter2.calculate_damage(&fighter1); fighter1.health = fighter1.health.saturating_sub(damage); if fighter1.health == 0 { return 2; } let damage = fighter1.calculate_damage(&fighter2); fighter2.health = fighter2.health.saturating_sub(damage); } round += 1; } if fighter1.health > fighter2.health { 1 } else { 2 } }
Turn Order Calculation
Initiative = Speed + (Dexterity ÷ 4) + (Boot Rating ÷ 2)
Higher initiative attacks first each round
Critical Hit System
Crit Chance = (Dexterity ÷ 1000) × 20%
Crit Damage = Base Damage × 1.5
Max Crit Chance = 20%

📊 Character Statistics

Attack (1-1000)
Base physical damage output
• 1-250: Novice Fighter
• 251-500: Skilled Warrior
• 501-750: Elite Combatant
• 751-1000: Legendary Destroyer
Speed (1-1000)
Initiative and action economy
• Determines turn order
• Affects dodge chance
• Influences multi-hit abilities
• Critical for arena positioning
Dexterity (1-1000)
Precision and critical strikes
• Primary crit chance modifier
• Affects accuracy vs dodge
• Influences special abilities
• 850+ Dex = 17% crit chance
Defence (1-1000)
Damage reduction and survivability
• Reduces incoming damage
• Increases base health pool
• Health = 1000 + (Defence × 2)
• Armor synergy bonus

Advanced Stat Interactions

// Complex stat interaction calculations fn calculate_effective_power(gladiator: &Gladiator) -> f32 { let attack_weight = 0.25; let speed_weight = 0.20; let dex_weight = 0.25; let def_weight = 0.30; let normalized_attack = gladiator.attack as f32 / 1000.0; let normalized_speed = gladiator.speed as f32 / 1000.0; let normalized_dex = gladiator.dexterity as f32 / 1000.0; let normalized_def = gladiator.defence as f32 / 1000.0; let base_power = (normalized_attack * attack_weight) + (normalized_speed * speed_weight) + (normalized_dex * dex_weight) + (normalized_def * def_weight); // Equipment multipliers let equipment_bonus = calculate_equipment_synergy(&gladiator.equipment); base_power * (1.0 + equipment_bonus) } fn calculate_equipment_synergy(equipment: &Equipment) -> f32 { let total_rating: f32 = (equipment.weapon_rating + equipment.armor_rating + equipment.helmet_rating + equipment.boots_rating + equipment.gloves_rating) as f32; // Synergy bonus for high-tier equipment sets if total_rating > 4000.0 { 0.25 // 25% bonus for legendary sets } else if total_rating > 3000.0 { 0.15 // 15% bonus for epic sets } else if total_rating > 2000.0 { 0.10 // 10% bonus for rare sets } else { 0.05 // 5% bonus for common sets } }

🛡️ Equipment System

Equipment Categories & Effects

Equipment Type Primary Stat Bonus Secondary Effect Max Rating
Weapon +Attack Damage Crit chance modifier 1000
Armor +Defence Rating Health pool increase 1000
Helmet +Dexterity Accuracy bonus 1000
Boots +Speed Initiative bonus 1000
Gloves +Attack Speed Multi-hit chance 1000

Legendary Equipment Examples

Dragonslayer's Blade
Rating: 967/1000
+967 Attack Damage
+15% Critical Hit Chance
Special: Dragon's Fury (2x damage vs high-DEF targets)
Aegis of Eternity
Rating: 934/1000
+934 Defence Rating
+500 Base Health
Special: Damage Reflection (10% damage returned)
Windwalker Boots
Rating: 743/1000
+743 Speed Rating
+200 Initiative
Special: First Strike (Always attack first in Round 1)
Marksman's Crown
Rating: 698/1000
+698 Dexterity Rating
+25% Accuracy
Special: Precision Strike (Crits ignore 50% armor)

🧮 Advanced Damage Formulas

// Complete damage calculation system fn calculate_final_damage(attacker: &Gladiator, defender: &Gladiator) -> DamageResult { let base_attack = attacker.attack + attacker.equipment.weapon_rating; let base_defence = defender.defence + defender.equipment.armor_rating; // Accuracy vs Dodge calculation let hit_chance = calculate_hit_chance(attacker, defender); if !roll_hit(hit_chance) { return DamageResult::Miss; } // Critical hit calculation let crit_chance = calculate_crit_chance(attacker); let is_critical = roll_crit(crit_chance); // Base damage calculation let mut damage = base_attack as f32; // Apply critical multiplier if is_critical { damage *= 1.5; // Legendary weapons have enhanced crits if attacker.equipment.weapon_rating > 750 { damage *= 1.2; // Additional 20% for legendary weapons } } // Armor reduction (diminishing returns) let armor_effectiveness = calculate_armor_effectiveness(base_defence); damage *= (1.0 - armor_effectiveness); // Minimum damage threshold let final_damage = damage.max(1.0) as u16; DamageResult::Hit { damage: final_damage, is_critical, armor_reduced: (damage - final_damage as f32) as u16, } } fn calculate_armor_effectiveness(armor: u16) -> f32 { // Armor has diminishing returns to prevent invincibility let armor_f = armor as f32; armor_f / (armor_f + 1000.0) * 0.75 // Max 75% reduction } fn calculate_hit_chance(attacker: &Gladiator, defender: &Gladiator) -> f32 { let accuracy = attacker.dexterity + attacker.equipment.helmet_rating; let evasion = defender.speed + defender.equipment.boots_rating; let base_hit = 0.85; // 85% base hit chance let accuracy_bonus = (accuracy as f32 / 1000.0) * 0.15; // Up to 15% from accuracy let evasion_penalty = (evasion as f32 / 1000.0) * 0.10; // Up to 10% dodge (base_hit + accuracy_bonus - evasion_penalty).clamp(0.05, 0.95) }
Balance Note: All formulas are subject to balancing. Current values represent theoretical maximums. Real battle outcomes depend on RNG, equipment synergies, and meta-game factors.

🏆 Rating Tier System

Common (1-250)
Basic equipment and stats. Starting tier for new gladiators.
Drop Rate: 60% | Synergy Bonus: +5%
Rare (251-500)
Enhanced equipment with notable stat bonuses.
Drop Rate: 30% | Synergy Bonus: +10%
Epic (501-750)
High-tier equipment with special properties.
Drop Rate: 9% | Synergy Bonus: +15%
Legendary (751-1000)
Ultimate equipment with unique abilities and maximum stats.
Drop Rate: 1% | Synergy Bonus: +25%

Equipment Rating Distribution

// AI generation weights for equipment ratings const RATING_WEIGHTS: [(u16, u16, f32); 4] = [ (1, 250, 0.60), // Common: 60% (251, 500, 0.30), // Rare: 30% (501, 750, 0.09), // Epic: 9% (751, 1000, 0.01), // Legendary: 1% ]; fn generate_equipment_rating() -> u16 { let mut rng = rand::thread_rng(); let roll: f32 = rng.gen(); let mut cumulative = 0.0; for (min, max, weight) in RATING_WEIGHTS.iter() { cumulative += weight; if roll <= cumulative { return rng.gen_range(*min..=*max); } } // Fallback to common rng.gen_range(1..=250) } // Special legendary equipment has named bonuses fn apply_legendary_bonus(rating: u16) -> Equipment { match rating { 900..=1000 => Equipment::with_mythic_properties(), 850..=899 => Equipment::with_legendary_properties(), 800..=849 => Equipment::with_epic_plus_properties(), 751..=799 => Equipment::with_standard_legendary(), _ => Equipment::standard(), } }

🏛️ Arena Battle Mechanics

Tournament Structure

Tournament Type Participants Format Duration Rewards
Daily Skirmish 32 gladiators Single Elimination 24 hours Glory Points + XP
Weekly Championship 128 gladiators Double Elimination 7 days Legendary Equipment
Monthly Grand Prix 512 gladiators Swiss + Top 8 30 days Exclusive Titles
Seasonal Colosseum 2048 gladiators League Format 90 days Hall of Fame

Battle Outcome Probabilities

// Monte Carlo simulation for battle predictions fn predict_battle_outcome(fighter1: &Gladiator, fighter2: &Gladiator, simulations: u32) -> BattlePrediction { let mut fighter1_wins = 0; let mut total_rounds = 0; for _ in 0..simulations { let result = simulate_battle(fighter1.clone(), fighter2.clone()); if result.winner == 1 { fighter1_wins += 1; } total_rounds += result.rounds; } let win_rate = fighter1_wins as f32 / simulations as f32; let avg_rounds = total_rounds as f32 / simulations as f32; BattlePrediction { fighter1_win_rate: win_rate, fighter2_win_rate: 1.0 - win_rate, expected_rounds: avg_rounds, confidence_interval: calculate_confidence_interval(win_rate, simulations), } } // Elo rating system for gladiator rankings fn update_elo_ratings(winner: &mut Gladiator, loser: &mut Gladiator) { const K_FACTOR: f32 = 32.0; let winner_expected = 1.0 / (1.0 + 10_f32.powf((loser.elo - winner.elo) / 400.0)); let loser_expected = 1.0 - winner_expected; winner.elo += (K_FACTOR * (1.0 - winner_expected)) as i16; loser.elo += (K_FACTOR * (0.0 - loser_expected)) as i16; // Prevent negative Elo winner.elo = winner.elo.max(100); loser.elo = loser.elo.max(100); }
Power Rating Formula
Power = (ATK + SPD + DEX + DEF) ÷ 4
Equipment Bonus = Total Equipment Rating ÷ 5
Final Power = Power + Equipment Bonus
Matchmaking Algorithm
Power difference < 100: Fair Match
Power difference 100-200: Slight Advantage
Power difference 200+: Major Upset Potential
Elo ±50 preferred matching
Victory Conditions
Standard: Reduce opponent HP to 0
Timeout: Higher % HP wins after 100 rounds
Perfect: Win without taking damage (+Bonus)
Legendary equipment increases perfect chance
Experience & Progression
Win XP = 50 + (Opponent Power ÷ 10)
Loss XP = 25 + (Own Power ÷ 20)
Perfect Win = 2x XP
Championship wins = 5x XP multiplier

Advanced Battle Mechanics

// Complex battle state machine #[derive(Debug, Clone)] enum BattleState { PreBattle, RoundStart(u8), InitiativeRoll, ActionPhase { attacker: u8, defender: u8, }, DamageResolution { damage: u16, is_critical: bool, effects: Vec<StatusEffect>, }, StatusEffectPhase, RoundEnd, BattleEnd { winner: u8, total_rounds: u8, final_stats: BattleStats, }, } #[derive(Debug)] struct BattleStats { total_damage_dealt: [u16; 2], critical_hits: [u8; 2], dodged_attacks: [u8; 2], max_single_hit: [u16; 2], rounds_survived: u8, } impl BattleEngine { fn process_battle_state(&mut self, state: BattleState) -> BattleState { match state { BattleState::PreBattle => { self.apply_pre_battle_effects(); BattleState::RoundStart(1) }, BattleState::RoundStart(round) => { if round > 100 { return self.resolve_timeout_victory(); } BattleState::InitiativeRoll }, BattleState::InitiativeRoll => { let (first, second) = self.calculate_turn_order(); BattleState::ActionPhase { attacker: first, defender: second, } }, BattleState::ActionPhase { attacker, defender } => { let damage_result = self.calculate_attack(attacker, defender); BattleState::DamageResolution { damage: damage_result.damage, is_critical: damage_result.is_critical, effects: damage_result.status_effects, } }, BattleState::DamageResolution { damage, is_critical, effects } => { self.apply_damage(damage); self.track_battle_stats(damage, is_critical); if self.check_victory_condition() { self.end_battle() } else { BattleState::StatusEffectPhase } }, BattleState::StatusEffectPhase => { self.process_status_effects(); BattleState::RoundEnd }, BattleState::RoundEnd => { self.increment_round(); BattleState::RoundStart(self.current_round) }, BattleState::BattleEnd { .. } => state, // Terminal state } } fn calculate_battle_score(&self, winner: u8) -> BattleScore { let stats = &self.battle_stats; let loser = if winner == 1 { 2 } else { 1 }; let domination_score = if stats.total_damage_dealt[winner as usize - 1] > stats.total_damage_dealt[loser as usize - 1] * 2 { 1.5 } else { 1.0 }; let efficiency_score = 100.0 / stats.rounds_survived as f32; let critical_bonus = stats.critical_hits[winner as usize - 1] as f32 * 0.1; BattleScore { base_score: 100.0, domination_multiplier: domination_score, efficiency_bonus: efficiency_score, critical_bonus, final_score: 100.0 * domination_score + efficiency_score + critical_bonus, } } } // Tournament bracket generation fn generate_tournament_bracket(participants: Vec<Gladiator>) -> TournamentBracket { let mut sorted_participants = participants; sorted_participants.sort_by(|a, b| b.elo.cmp(&a.elo)); let bracket_size = next_power_of_two(sorted_participants.len()); let mut bracket = TournamentBracket::new(bracket_size); // Seed participants to avoid early top-tier matchups for (index, gladiator) in sorted_participants.iter().enumerate() { let seed_position = calculate_seed_position(index, bracket_size); bracket.place_participant(gladiator.clone(), seed_position); } bracket } fn calculate_seed_position(rank: usize, bracket_size: usize) -> usize { // Standard tournament seeding algorithm if rank == 0 { return 0; } if rank == 1 { return bracket_size - 1; } let half = bracket_size / 2; if rank < half { calculate_seed_position(rank - 2, half) * 2 } else { calculate_seed_position(rank - half, half) * 2 + 1 } }

🎁 Reward System & Economics

Glory Point Economy

Achievement Glory Points Elo Change Special Rewards
Victory (Regular) +10-50 $KEYWAR +15-35 Random Equipment
Perfect Victory +100 $KEYWAR +45 Guaranteed Rare+
Tournament Win +500 $KEYWAR +100 Legendary Equipment
Championship +2000 $KEYWAR +200 Unique Title
Loss +5 $KEYWAR -10-25 Participation Reward

Leaderboard & Rankings

// Global leaderboard calculation system #[derive(Debug, Serialize)] struct LeaderboardEntry { gladiator_id: String, name: String, elo: i16, wins: u32, losses: u32, win_rate: f32, glory_points: u32, highest_streak: u16, tournament_wins: u16, power_rating: u16, rank: u32, tier: RankTier, } #[derive(Debug)] enum RankTier { Bronze, // 0-1199 Elo Silver, // 1200-1499 Elo Gold, // 1500-1799 Elo Platinum, // 1800-2099 Elo Diamond, // 2100-2399 Elo Master, // 2400-2699 Elo Grandmaster, // 2700+ Elo } impl LeaderboardEntry { fn calculate_comprehensive_score(&self) -> f32 { let elo_weight = 0.4; let winrate_weight = 0.25; let glory_weight = 0.2; let tournament_weight = 0.15; let normalized_elo = (self.elo as f32 / 3000.0).min(1.0); let winrate_bonus = if self.wins + self.losses > 10 { self.win_rate } else { 0.5 // Default for new players }; let normalized_glory = (self.glory_points as f32 / 10000.0).min(1.0); let tournament_bonus = (self.tournament_wins as f32 / 10.0).min(1.0); (normalized_elo * elo_weight) + (winrate_bonus * winrate_weight) + (normalized_glory * glory_weight) + (tournament_bonus * tournament_weight) } fn get_rank_tier(&self) -> RankTier { match self.elo { 0..=1199 => RankTier::Bronze, 1200..=1499 => RankTier::Silver, 1500..=1799 => RankTier::Gold, 1800..=2099 => RankTier::Platinum, 2100..=2399 => RankTier::Diamond, 2400..=2699 => RankTier::Master, _ => RankTier::Grandmaster, } } } // Seasonal reset mechanism fn apply_seasonal_reset(leaderboard: &mut Vec<LeaderboardEntry>) { for entry in leaderboard.iter_mut() { let decay_factor = match entry.get_rank_tier() { RankTier::Bronze | RankTier::Silver => 0.9, RankTier::Gold | RankTier::Platinum => 0.8, RankTier::Diamond | RankTier::Master => 0.7, RankTier::Grandmaster => 0.6, }; entry.elo = ((entry.elo as f32 * decay_factor) as i16).max(1000); entry.glory_points = (entry.glory_points as f32 * 0.5) as u32; // Preserve some tournament achievements if entry.tournament_wins > 5 { entry.elo += 100; // Legacy bonus } } }
Anti-Exploitation Measures: The system includes safeguards against win-trading, statistical anomaly detection, and automated battle verification to maintain competitive integrity.

📈 Meta Analysis & Strategy

Current Meta Trends

Speed Meta (35% of top 100)
High Speed + High Dex builds
Focus: First strike advantage
Counter: High Defence tanks
Win Rate: 67% vs balanced builds
Glass Cannon (25% of top 100)
Max Attack + Dex, minimal Defence
Focus: Quick decisive victories
Counter: Speed builds, armor penetration
High risk, high reward strategy
Balanced Builds (40% of top 100)
Even stat distribution
Focus: Adaptability and consistency
Counter: Specialized builds
Stable 55% overall win rate

Equipment Tier List

// Meta equipment analysis based on tournament data const META_EQUIPMENT_TIERS: &[(&str, &str, f32)] = &[ // S-Tier (950+ rating, game-changing) ("Dragonslayer's Blade", "Weapon", 0.89), ("Aegis of Eternity", "Armor", 0.86), ("Chronos Boots", "Boots", 0.84), // A-Tier (850-949 rating, very strong) ("Voidripper Sword", "Weapon", 0.78), ("Titanforged Plate", "Armor", 0.76), ("Shadowstep Boots", "Boots", 0.74), ("Crown of Dominion", "Helmet", 0.73), // B-Tier (750-849 rating, solid choices) ("Flamebrand", "Weapon", 0.65), ("Guardian's Mail", "Armor", 0.63), ("Swift Stride Boots", "Boots", 0.61), // C-Tier (650-749 rating, situational) ("Veteran's Blade", "Weapon", 0.55), ("Reinforced Leather", "Armor", 0.53), ]; fn calculate_equipment_meta_score(equipment: &Equipment) -> MetaScore { let mut total_score = 0.0; let mut equipment_count = 0; for (name, eq_type, win_rate) in META_EQUIPMENT_TIERS { if equipment.has_equipment_type(eq_type) { total_score += win_rate; equipment_count += 1; } } let average_score = if equipment_count > 0 { total_score / equipment_count as f32 } else { 0.5 // Default score for unknown equipment }; let synergy_bonus = calculate_set_synergy(equipment); MetaScore { base_score: average_score, synergy_modifier: synergy_bonus, final_score: (average_score + synergy_bonus).min(1.0), tier: classify_meta_tier(average_score + synergy_bonus), } } #[derive(Debug)] enum MetaTier { S, // 0.85+ A, // 0.75-0.84 B, // 0.65-0.74 C, // 0.55-0.64 D, // Below 0.55 }

🔄 Version History & Updates

// Latest balance changes and system updates Version 1.2.3 - "Arena Overhaul" (Current) ======================================== + Added equipment synergy bonuses + Implemented advanced matchmaking algorithm + New legendary equipment with unique abilities + Tournament bracket seeding improvements * Balanced armor effectiveness (max reduced to 75%) * Critical hit chance cap increased to 20% * Speed now affects dodge calculation - Fixed infinite battle loop bug - Removed temporary invincibility exploit Version 1.2.2 - "The Great Rebalancing" ===================================== * Attack scaling reduced by 10% * Defence effectiveness curve adjusted * Equipment rating distribution rebalanced + Added battle prediction system + Implemented Elo decay for inactive accounts Version 1.2.1 - "Critical Strike Update" ====================================== + New critical hit system implementation + Enhanced damage calculation formulas * Dexterity now affects accuracy vs evasion * Equipment tier thresholds adjusted - Fixed equipment duplication bug Version 1.2.0 - "Foundation Release" ================================== + Core battle system implemented + Basic tournament structure + Equipment generation system + Initial balance framework
Development Roadmap: Upcoming features include guild systems, cross-chain battles, equipment trading, and advanced AI opponents. All mechanics subject to community feedback and competitive balance.