> For the complete documentation index, see [llms.txt](https://hider.somadocs.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hider.somadocs.fr/api-developpeur/regles-de-revelation.md).

# Règles de révélation

Par défaut, une zone masque tout le monde. Les règles de révélation redécouvrent certains joueurs pour certains observateurs. Elles se combinent en OU : un joueur est révélé dès qu'une règle correspond. Construisez-les avec `Reveal`, combinez-les avec `or`, `and` et `negate`.

### Révéler les coéquipiers

Chacun voit sa propre équipe en clair, le reste reste masqué.

```java
.groupResolver(player -> factionId(player))
.reveal(Reveal.sameGroup())
```

### Révéler une équipe à tout le monde

Utile pour un événement : une équipe désignée devient visible pour tous.

```java
.reveal(Reveal.group("rouge"))
```

Pour une valeur qui change en cours de partie, passez un `Supplier` :

```java
AtomicReference<String> enCapture = new AtomicReference<>();
// ...
.reveal(Reveal.group(enCapture::get))

// quand l'équipe qui capture change :
enCapture.set(factionId);
SomaHiderProvider.get().refresh();
```

### Permission de zone

Les observateurs qui portent une permission voient tout le monde.

```java
.reveal(Reveal.permission("soma.hider.bypass"))
```

### Combiner plusieurs règles

Les coéquipiers, plus l'équipe en capture.

```java
.reveal(
    Reveal.sameGroup()
        .or(Reveal.group(enCapture::get)))
```

### Votre propre condition

`Reveal.of` accepte n'importe quel test sur `(viewer, target)`.

```java
.reveal(Reveal.of((viewer, target) -> duel.opposent(viewer, target)))
```

{% hint style="info" %}
Après avoir changé une condition externe (une capture démarre, un duel commence), appelez `SomaHiderProvider.get().refresh()` pour que le changement tombe sur le même tick.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hider.somadocs.fr/api-developpeur/regles-de-revelation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
