Variables

float healthPoints

float maxHealthPoints

float impulsionWhenHit

float invincibilityDelay

float hitStopDelay

float victoryConditionSpeedRange

float victoryConditionSpeedMelee

float waitDelayAfterPlayerDeath

Comportement

Un joueur prend des dégâts lorsqu’un bloc dont l’owner n’est pas lui-même frappe son Cœur :

graph TD;
    A["Un bloc frappe le C[œ](<https://tricolor-sailor-03e.notion.site/C-ur-du-Golem-192dda1c3b308057aa81f50a308e61f6>)ur de Player 1"]
    A -- À distance --> B{"Vitesse du bloc > **victoryConditionSpeedRange ?**"};
    A -- Au corps-à-corps --> C{"Vitesse du bloc > **victoryConditionSpeedMelee ?**"};
    
    B -- Oui --> Z;
    C -- Oui --> Z["Hit stop d'une durée égale à **hitStopDelay**"]-->D;
    
    D{"**healthPoints == maxHealthPoints &&** Vitesse du bloc >= **maxHealthPoints ?**"};
    
    D -- Oui --> E["**healthPoints = 1**"] --> H
    D -- Non --> F["**healthPoints = healthPoints -** Vitesse du bloc"] --> G
    
    G{"**healthPoints <= 0 ?**"};
    
    G -- Oui --> M["Mort de Player 1"];
    G -- Non --> H
    
    H["Player 1 est repoussé dans la direction du coup reçu avec une force égale à **impulsionWhenHit"]-->I
    
    I["Player 1 est invincible pendant invincibilityDelay secondes"];**

Mort