F11 : controle rotation, aller-retour du regard autour d'un coup (rotation silencieuse)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cette révision appartient à :
gastineltetClaude Opus 5.5 a révisé 2026-10-14 09:16:22 +02:00
1 Parent 16a9bd6ee0
révision e2322fbdf4
7 fichiers modifiés
+165 -1

Aucun fichier ne correspond à votre recherche

+39
Voir le fichier
@@ -415,4 +415,43 @@ class AuditFaillesTest {
}
assertFalse(vuCheval, "cheval honnête : rien");
}
// ---------------------------------------------------------------- F11
/**
* Killaura à rotation silencieuse : avant chaque coup, un paquet de rotation vers la cible (90° à côté du
* regard), le coup, puis le regard revient au tick suivant. L'excédent d'angle au coup est 0 : seul le
* contrôle de rotation le voit.
*/
@Test
void F11_rotation_silencieuse_vue() {
boolean vu = false, vuAngle = false;
for (int tick = 0; tick < 200; tick++) {
long now = tick * 50L;
if (tick % 7 == 3) {
vu |= contient(moteur.regard(j, now, EtatJoueur::normal, 90f, 0f), Controle.ROTATION);
List<Verdict> v = moteur.attaque(j, now, EtatJoueur.normal(), 0.0, 100 + tick % 3, true);
vuAngle |= contient(v, Controle.KILLAURA_ANGLE);
} else {
vu |= contient(moteur.regard(j, now, EtatJoueur::normal, 0f, 0f), Controle.ROTATION);
}
}
assertFalse(vuAngle, "regard parfait au moment du coup : killaura-angle ne voit rien (rappel de F11)");
assertTrue(vu, "aller-retour du regard autour de chaque coup : vu");
}
/** Joueurs honnêtes : virage rapide vers une cible puis on la suit ; tour complet en frappant ; regard fixe. */
@Test
void F11_rotations_honnetes_sans_alerte() {
boolean vu = false;
float yaw = 0;
for (int tick = 0; tick < 400; tick++) {
long now = tick * 50L;
int phase = tick % 40;
if (phase < 3) yaw += 40f; // virage de 120° en 3 ticks vers une nouvelle cible
else if (phase >= 20 && phase < 30) yaw += 36f; // tour complet en 10 ticks
vu |= !moteur.regard(j, now, EtatJoueur::normal, yaw, 10f).isEmpty();
if (phase == 3 || phase == 6 || phase == 25) vu |= !moteur.attaque(j, now, EtatJoueur.normal(), 0, 5, true).isEmpty();
}
assertFalse(vu, "rotations honnêtes : rien");
}
}