mr:search_mechanic
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| mr:search_mechanic [2026/08/03 00:04] – wiki: Fix compliance issues in 5 random pages Bot | mr:search_mechanic [2026/08/03 00:07] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Search Mechanic - Code References ====== | ||
| + | ===== Java Classes ===== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | ===== Key Mechanics ===== | ||
| + | * **Intentional Search**: Player-initiated search (toolbar button) - uses full awareness formula | ||
| + | * **Passive Search**: Automatic search each turn - uses reduced awareness formula | ||
| + | * **Ring of Detection**: | ||
| + | |||
| + | ===== Search Algorithm ===== | ||
| + | ``` | ||
| + | search(boolean intentional): | ||
| + | distance = 1 + buffLevel(RING_OF_DETECTION) | ||
| + | | ||
| + | if intentional: | ||
| + | searchLevel = 2 * awareness - awareness^2 | ||
| + | else: | ||
| + | searchLevel = awareness | ||
| + | | ||
| + | if distance <= 0: | ||
| + | searchLevel /= 2 - distance | ||
| + | distance = 1 | ||
| + | | ||
| + | For each cell in radius ' | ||
| + | if cell is visible: | ||
| + | if intentional: | ||
| + | if intentional OR Random.Float() < searchLevel: | ||
| + | if cell has secret (trap/ | ||
| + | reveal secret | ||
| + | return true | ||
| + | ``` | ||
| + | |||
| + | ===== Awareness Calculation ===== | ||
| + | * Base awareness depends on hero class and level | ||
| + | * Awareness increases with hero level | ||
| + | * Ring of Detection buff level adds to search distance | ||
| + | |||
| + | ===== String Resources ===== | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | ===== Related mr Entities ===== | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | |||
| + | {{tag> mr code references mechanics search traps secrets}} | ||
mr/search_mechanic.txt · Last modified: by 127.0.0.1
