Expand description
Native ports for the cast_ability category — ability scripts (the
CastAbility event handler, run via run_event in
logic::fighting::handle_cast_ability, returning
Vec<OverlordEvent>).
These are the combat effect of casting an ability: most call
ctx.on_cast(CasterEntity) then either launch a projectile
(Result.push(OverlordEventStartCastProjectile(...))) or apply combat
primitives (ctx.attack, ctx.spell_heal, ctx.apply_entity_effect).
§RNG
Ability scripts consume the authoritative Random (via on_cast’s
bravery throw, attack’s evasion/counterattack/deceit/crit/block throws,
and stat_throw).
§Effect callbacks
on_cast / apply_entity_effect dispatch the applied effect’s on_apply
reaction. For the shipped effects those reactions push add_entity_stat_mod
(empower/weakness/protection/vulnerability) events; the native path
must replicate them, so we pass OverlordEffectCb rather than
NoopEffectCb.
§Scope (per the handle_cast_ability run_event call site)
CasterEntity, TargetEntity, Fight, Random, AbilityLevel,
AbilitySlotLevel, CurrentTick, FightDurationTicks, and the event.
Structs§
- Cast
Ability Ctx - ability
scriptscope the shipped scripts read.
Functions§
- apply_
bloodleak_ effect - Port of the
50260b1c-...test abilityscript: RNG-free; used bytest_effects::test_effect_with_interval. - apply_
low_ hp_ heal_ effect - Port of the
41ee5532-...test abilityscript:Result.push(OverlordEventEntityApplyEffect(Event.by_entity_id, uuid("3b136901-...")));Event.by_entity_idis the caster, so the effect is applied to the caster. RNG-free; used bytest_effects::test_effect_with_subscribe. - apply_
test_ effect 01955be6-...—ctx.apply_entity_effect(CasterEntity, "test_effect", 3). Noon_cast.test_effect’son_applyisprint-only (no events).- arcane_
blast_ cast - Arcane Blast (Mage,
019dfcfb): the nuke lands on the target and washes over every OTHER living enemy at a share of it — with no target cap (BAL-034), which is what makes the Mage the wave-clear class rather than a single-target one. - backstab_
cast - Backstab (Rogue,
019dfc4c): heavy crit gamble — likecrit_strikebut with the kit’s own budget/crit split. - band_
targets - §1 AoE cap: the band-eligible enemies of a forward 3-cell cone (
caster_x < x ≤ caster_x+3), capped to the firstmax_targetsin the deterministicfight.entitiesiteration order (None⇒ unlimited, legacy behaviour). No RNG, no sorting. Shared bycone_strike/ Rewind / War Cry / Holy Nova so the cap is byte-identical everywhere. - bare_
projectile_ bat 019a0246-cf87-...— bare push projectile019a0244-aad4.- bare_
projectile_ chipmunk 019a0246-5aaf-...— bare push projectile019a0244-7a0a.- bare_
projectile_ mushroom 019a0245-ff0c-...— bare push projectile019a0244-4675.- bare_
projectile_ shot 019c00a4-...— bare push projectile019c009c.- battle_
heal_ cast - Battle Heal (Priest,
019dfd02-0c6a): the WHOLE TEAM is healed and empowered (BAL-033). In solo that is the Priest alone, so the ability never reads as weaker than it did — it just stops being self-only the moment there is somebody to heal. - cone_
strike 019584f4-...— cone/AoE: on_cast, roll one shared crit, then attack every enemy in a forward 3-cell x-band with{ power, is_crit }.- crit_
strike 019584aa-...— on_cast + attack { power, crit_chance_bonus * 10000.0 }.- damage_
target_ 5 - Port of the shared test ability
script(generate_ability_script):Result.push(OverlordEventDamage(TargetEntity.id, unsigned(5), CustomEventData()));RNG-free; used by the test-config gacha/class abilities. - dot_
strike 01958efd-...— on_cast + attack { dot_power: ability_info.damage } (no instant power; pure DoT application).- fireball_
cast 01958172-...— on_cast + launch projectile01966cbc.- fireball_
projectile_ cast 019dfc4c-.../019dfc4f/019dfcfb/019dfcfe/019dfd00/019dfd01/019dfd02-0c6a/019dfd02-add4— all identical: on_cast + launch projectile01966cbc. (One shared native fn; config points all eight abilityscript_nativerefs at it.)- fortify_
cast - Fortify (Warrior,
019dfd00): Protection on self (received damage halved) plus an instant self-heal from the rest of the budget. - holy_
nova_ cast - Holy Nova (Priest,
019dfd02-add4): AoE smite plus exactly ONE heal for a share of the recipient’s Max HP — the ally with the lowest HP share, which in solo is the caster. - melee_
strike 0194d64e-...— on_cast + attack { power }.- mob_
melee_ average 019cc465-14b8-...— on_cast + attack { power }.- mob_
melee_ quick 019cc464-...— on_cast + attack { power }.- mob_
melee_ slow 019cc465-2f63-...— on_cast + attack { power }.- multi_
projectile 019589e6-...— on_cast + launchability_info.projectilesprojectiles, each delayedi * 150.- night_
pounce_ projectile_ cast - Pet-ult deliveries: same combat math as the instant versions
(
crit_strike/cone_strike/dot_strike), moved onto a projectile so the pet’s cast is readable in combat. The damage resolves in the pairedprojectile_pet_*fn on arrival. - odd_
flame_ projectile_ cast - register
- Register this category’s native fns.
- rewind_
cast - rust_
wave_ projectile_ cast - self_
hot_ heal 01958ed0-...— on_cast +spell_heal(caster, caster, #{ hot_power }).- strike_
then_ empower 01958a30-...— on_cast + attack { power }; if damage dealt (!= ()), applyempowerforability_info.effect_duration.- strike_
then_ vulnerability 01958ef2-...— on_cast + attack { power }; if damage dealt, applyvulnerabilityon the TARGET forability_info.effect_duration.- sword_
slash 019bff40-...— on_cast + attack { power }.- test_
band_ strike - Test-config only: an AoE strike whose payload, coverage and support stones
all come from the CAST ability’s own template, so the fixture can exercise
the coverage and shape supports end to end without a bespoke
content::ability_infoclosure. - test_
swing - A real swing for the test config: runs
mechanics::fight::attackwith a fixedpowerand a forced non-crit. - test_
swing_ aoe - The AoE counterpart of
test_swing: one cast, one swing per living enemy, all inside the cast’s own tick. - thousand_
cuts_ cast - Thousand Cuts (Rogue,
019dfc4f): a flurry ofprojectilesdirect cuts on the target — each rolls its own crit/evasion, so the flurry FEELS like a storm of numbers rather than one hit. - vampiric_
touch_ cast 019589f7-...— on_cast + launch projectile0196a6b4(vampiric strike).- war_
cry_ cast - War Cry (Warrior,
019dfd01): AoE shout ++30%outgoing damage on self while any enemy was struck.
Type Aliases§
- Cast
Ability Fn - Signature of a
cast_abilitynative fn.