The length of the flick is the strength of the aim, and you can see it leave
The rally flick was read as three lanes: sideways past 0.38 of its own length took the whole corner, a hair under it took dead centre, and nothing lived in between — "sometimes applied very strong, sometimes it barely does anything", with no way to tell which one you had asked for. swayOf reads the swipe's LENGTH as a continuous strength, exactly as the serve already did, and doHit spends that instead of the lane vote. Keys keep the full lane; the opponent's aim has no length and is untouched. That is also what hands the OUT back: going out was never a choice, because every aimed shot took the full width and then the scatter on top. Below about 0.7 of a full swipe — the line minus aimError, over the width timing can earn — the worst mistiming in the game cannot sail it now, and above it the old risk curve is exactly as tested. And the aim is drawn while the thumb is still moving: the placement ring is a receipt that arrives with the ball already gone, so the same ring is shown live with a ray from the player's feet, cream while the ask is safe and hot once the sway crosses that derived threshold. The receipt goes red when the shot really is out, so the two rings together are the lesson. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
99b2dec3bf
commit
f3d6f71144
8 files changed
+144
-14
No files matched your search
+18
-4
@@ -123,10 +123,23 @@ function zombieTarget(aim) {
|
||||
return best;
|
||||
}
|
||||
|
||||
// A FLICK'S LENGTH IS ITS STRENGTH. The rally aim read the gesture as three LANES — sideways past
|
||||
// 0.38 of its own length took the whole corner, a hair under it took dead centre — so one flick came
|
||||
// out "applied very strong" and the next "barely does anything", with nothing in between and no way
|
||||
// to tell which you had asked for. Length scales the sway continuously now, exactly as it already
|
||||
// did on the serve: a short swipe is a safe half-court ball, a committed one hunts the line. That is
|
||||
// also what hands the OUT back to the player — the scatter can only sail a shot that was already
|
||||
// aimed near the line, so going out becomes a risk you chose rather than one that was rolled for you.
|
||||
// Keys have no length; they keep the full lane.
|
||||
export const swayOf = aim => aim.mag === undefined ? aim.ax
|
||||
: aim.fx * Math.min(1, Math.max(0, (aim.mag - TUNE.flickMin) / (TUNE.flickFull - TUNE.flickMin)));
|
||||
|
||||
// A return that left with a direction on it resets the flick lesson; a flat one is one more piece of
|
||||
// evidence that the player does not know the gesture is there. Exported for the suite — the touch
|
||||
// flick cannot be pressed headlessly, and this rule is the whole of the lesson's trigger.
|
||||
export const flatCount = (streak, aim) => (aim && aim.ax ? 0 : streak + 1);
|
||||
// It reads the same sway the shot does, so a swipe too short to bend the ball is honestly counted
|
||||
// as flat rather than resetting the lesson it just failed to use.
|
||||
export const flatCount = (streak, aim) => (aim && Math.abs(swayOf(aim)) > 0.15 ? 0 : streak + 1);
|
||||
|
||||
function doHit(ch, quality, aim) {
|
||||
// aim: {ax: -1|0|1, az: -1|0|1} from held keys / flick at contact (az -1 = deep, 1 = short)
|
||||
@@ -142,7 +155,7 @@ function doHit(ch, quality, aim) {
|
||||
ball.x = ch.x + ch.facing * 0.5;
|
||||
ball.z = ch.z + (toFar ? -0.3 : 0.3);
|
||||
const err = () => (Math.random() * 2 - 1) * TUNE.aimError * (1 - quality);
|
||||
let tx, tz, aimedLane = false;
|
||||
let tx, tz, aimedLane = false, sway = 0;
|
||||
let s = TUNE.baseShotSpeed + quality * TUNE.qualityShotSpeed;
|
||||
const ft = G.mode !== 'tennis' && !G.interlude && ch.side === 'P' // the duel aims like tennis: lanes, not free-aim
|
||||
? (aim && aim.fx !== undefined ? flickTarget(ch, aim) : { zt: zombieTarget(aim) }) : null;
|
||||
@@ -164,7 +177,8 @@ function doHit(ch, quality, aim) {
|
||||
// timed flick is the full 3.3 with no scatter left on it at all. Placement is still earned;
|
||||
// it just stops being a coin toss you are punished for calling.
|
||||
const reach = ch.side === 'P' ? TUNE.flickReach + (1 - TUNE.flickReach) * quality : 1;
|
||||
tx = aim.ax * (toFar ? TUNE.flickWidth : 2.7) * reach + err();
|
||||
sway = swayOf(aim); // -1..1, continuous on touch — see swayOf
|
||||
tx = sway * (toFar ? TUNE.flickWidth : 2.7) * reach + err();
|
||||
const tzBase = aim.az < 0 ? SHOT_DEPTH.deep : aim.az > 0 ? SHOT_DEPTH.short : SHOT_DEPTH.mid;
|
||||
tz = (toFar ? tzBase : COURT.L - tzBase) + err() * 0.8;
|
||||
// A FORWARD FLICK IS A SMASH. Up-screen is the far court, so flicking INTO the court asked for
|
||||
@@ -201,7 +215,7 @@ function doHit(ch, quality, aim) {
|
||||
// It carries `q` now, so the ring also says HOW MUCH OF THE FLICK LANDED — tight and hot when your
|
||||
// timing earned the full reach, wide and dim when it barely applied. Without that the new
|
||||
// quality-scaled reach above is invisible: the shot simply goes less wide and nothing says why.
|
||||
if (aimedLane && ch.side === 'P' && aim && (aim.ax || aim.az)) {
|
||||
if (aimedLane && ch.side === 'P' && aim && (sway || aim.az)) {
|
||||
G.placeMark = { x: tx, z: tz, t: 0.8, q: quality };
|
||||
}
|
||||
// topspin: quality shots dive under extra effective gravity, which is what lets real
|
||||
|
||||
Reference in new issue
Block a user