Ledger v3 · C# · Godot 4.7 Get started

Slow

A slow and a haste that reach casts already running as well as the feet

✓ 3 plays, 36 steps, all passingFrom ARPG, content\arena.ledger
phases clockstat ... default- N%+ N%

A slow and a haste that reach a cast as well as the feet, lifted from the ARPG slice's content\arena.ledger (Chilled, Hasted and its phases line), with the caster's hex from content\enemies.ledger to show a windup slowed. Every phase of every ability runs on its caster's CastSpeed, so a chill stretches a windup already running and a haste shortens it. Movement is the game's: it reads MoveSpeed each frame.

content/cookbook/mechanics/slow.ledgerthe content
1# A slow and a haste that reach a cast as well as the feet, lifted from the ARPG slice's content\arena.ledger (Chilled,
2# Hasted and its phases line), with the caster's hex from content\enemies.ledger to show a windup slowed. Every phase
3# of every ability runs on its caster's CastSpeed, so a chill stretches a windup already running and a haste shortens
4# it. Movement is the game's: it reads MoveSpeed each frame.
5
6rate 60
7stat MaxHealth
8stat MoveSpeed
9stat CastSpeed default 1
10pool Health max MaxHealth
11damage Health
12link team
13allegiance team
14tags Unit Spell Frost
16phases clock CastSpeed
18effect Chilled
19 tags Frost
20 stack refresh
21 lasts 2s
22 CastSpeed - 40%
23 MoveSpeed - 40%
25effect Hasted
26 stack refresh
27 lasts 6s
28 CastSpeed + 50%
29 MoveSpeed + 30%
31ability Hex
32 tags Spell
33 target one enemy having Unit within 11
34 cooldown 4s
35 windup 1.5s
36 deal 15 to target
38archetype Side
40archetype Caster
41 tags Unit
42 base MaxHealth 35
43 base MoveSpeed 3
44 full Health
45 grants Hex
content/cookbook/mechanics/slow.playwhat it must do
1catalog slow.ledger
2
3# The slow's numbers, from Chilled (40% off CastSpeed and MoveSpeed for 2 s) and Hasted (50% on CastSpeed, 30% on
4# MoveSpeed), and Hex's 1.5 s windup at CastSpeed 1. The world runs 60 ticks a second.
5
6play "chilled: the feet at 60%, and a windup of 1.5 s takes 2.5"
7 make r Side
8 make b Side
9 make a Caster with team = r at 0 0
10 make t Caster with team = b at 5 0
11 apply Chilled to a
12 expect a.MoveSpeed = 1.8 from content: the Caster's 3 less Chilled's 40%
13 act a Hex at t
14 expect done
15 advance 1.5s
16 expect t.Health = 35 from content: 1.5 s of the world is 0.9 s of a caster at CastSpeed 0.6; nothing landed yet
17 save
18 advance 1s
19 expect t.Health = 20 from content: 1.5 s / 0.6 = 2.5 s, the windup through: 35 less 15
21play "hasted: the feet at 130%, and the windup takes 1 s"
22 make r Side
23 make b Side
24 make a Caster with team = r at 0 0
25 make t Caster with team = b at 5 0
26 apply Hasted to a
27 expect a.MoveSpeed = 3.9 from content: the Caster's 3 and Hasted's 30%
28 act a Hex at t
29 expect done
30 advance 1s
31 expect t.Health = 20 from content: 1.5 s / 1.5 = 1 s: 35 less 15
33play "chilled mid-windup: the half done stands, the rest runs slow"
34 make r Side
35 make b Side
36 make a Caster with team = r at 0 0
37 make t Caster with team = b at 5 0
38 act a Hex at t
39 expect done
40 advance 0.75s
41 apply Chilled to a
42 expect a active Hex elapsed 0.75s from content: half of the 1.5 s windup at CastSpeed 1
43 advance 1.2s
44 expect t.Health = 35 from content: 0.75 s left at CastSpeed 0.6 takes 1.25 s; 1.2 s isn't enough
45 advance 0.05s
46 expect t.Health = 20 from content: 0.75 + 1.25 = 2 s: 35 less 15

Run it yourself

ledger check content/cookbook/mechanics/slow.ledger content/cookbook/mechanics/slow.play
ledger play content/cookbook/mechanics/slow.play