Expand description
Native ports for the start_cast_ability category — ability start_behavior
(run via run_start_cast_ability, returns Vec<StartCastAbilityResult>).
Unlike the data categories, these run combat logic that consumes the
authoritative RNG (try_cast’s multicast roll, attack rolls, …), drawing
values from the game Random in order.
The 27 shipped ability start_scripts are dominated by
ctx.try_cast(CasterEntity, "<self ability id>") — one parameterised native
fn (try_cast_self) covers them; the small attack-based tail gets its own
fns.
Structs§
- Start
Cast Ability Ctx start_behaviorsees (CasterEntity,Fight,Random) plus the cast ability id and config/lookups the combat API needs.- Start
Cast Ability Script Result - One pushed result from an ability
start_behavior— either an attack or a run. The native start-cast-ability port fills aVecof these, whichStartCastAbilityResult::vec_from_script_resultsclassifies into typedStartCastAbilityResults. - Start
Cast Projectile Ctx - Inputs available to a
start_cast_projectilenative fn — the subset of the scope (run_start_cast_projectileviahandle_start_cast_projectile) also bindsCasterEntity,Fight,ProjectileLevel,CurrentTick,FightDurationTicksand the event, but no shippedstart_behaviorreads anything beyond the caster/target coordinates; add fields here if a future script does. - Start
Cast Projectile Result
Enums§
Functions§
- attack_
first_ enemy - Port of the shared test
start_behavior(generate_start_ability_script): Attacks the first entity on the opposing team (anim 500). RNG-free. - distance_
x100 - Native port of the distance×100
start_behavior(the common case). - distance_
x380 - Native port of the distance×380
start_behavior(projectile0196a6b3-f885-7fdc-af8c-92a1ffb79ceb). - fixed_
200 - Native port of the fixed
Result.animation_duration_ticks = unsigned(200)start_behavior(projectile019aeeed-5bcc-7dcc-a74f-589031a6b8f2). - fixed_
500_ damage_ 300 - Port of the test projectile
start_behaviorResult.animation_duration_ticks = unsigned(500); Result.projectile_data.add("damage", 300);— fixed 500-tick anim with adamage=300entry inprojectile_data. Used bytest_fighting_abilities. - register
- Register both start-cast scopes (ability wind-up + projectile wind-up).
- self_
attack_ 400 - Port of
Result.push_attack(unsigned(0), unsigned(400), CasterEntity.id)— a single self-targeting attack (delay 0, anim 400 ticks). No RNG. Used by the one non-try_castability start_behavior (01955be6). - self_
attack_ 500 - Port of
Result.push_attack(unsigned(0), unsigned(500), CasterEntity.id);(the41ee5532-...test abilitystart_behavior) — a single self-targeting attack (delay 0, anim 500 ticks). RNG-free. - try_
cast_ self - Port of
ctx.try_cast(CasterEntity, "<self ability id>")— the dominant wrapper does (casts=1 default; identical RNG consumption: multicast roll, valid-target filtering, per-cast rolls), then classifies the pushed results.
Type Aliases§
- Start
Cast Ability Fn - Signature of a
start_cast_abilitynative fn. - Start
Cast Projectile Fn - Signature of a
start_cast_projectilenative fn. Freefn(no captured state) so it isCopyand trivially stored in the registry; runtime context arrives viaStartCastProjectileCtx.