Expand description
Native functions for the conditional_progress category — quest progress
behaviors (QuestTemplate::progress_behavior). Output is the new i64
progress value assigned to QuestInstance::current.
Quest progress collapses to ~12 patterns; per-quest constants (level
thresholds, dungeon/currency/rarity ids) are const parameters of generic
fns, registered once per shipped constant. Content uuids baked into
patterns are exported as consts and validated against the config at deploy
time (see [super::validate]).
Structs§
- Conditional
Progress Ctx - Inputs available to a
conditional_progressnative fn.
Constants§
Functions§
- always_
one - Always 1.
- boss_
win EndFightthe player won while the fight’s template isCampaignBossFightand the fight is NOT a dungeon run → +1; everything else unchanged. Dungeon bosses ride the same template type, but the quest is “Defeat a Campaign Boss” (BAL-035) and dungeon bosses grant no Mastery, so they must not tick it either. Quest dispatch runs while the fight is still present (the same contractraid_dungeon’s in-fight branch relies on).- complete_
daily_ quest - complete_
loop_ task_ quest - complete_
weekly_ quest - count_
equipped_ at_ rarity - On
PlayerEquipItem: the number of equipped inventory items whose rarityqis at least the target rarityR’sq; other events leave progress unchanged. - current_
chapter_ level character.current_chapter_level(raw, monotonic). Paired with a quest whoseprogress_targetis the TARGET chapter, so the quest completes exactly when the player reaches that chapter — one behavior gates ANY chapter without a per-threshold const registration (active_quest.current = progress, sois_completediscurrent_chapter >= progress_target). Used by the progress-pass (trophy road) tiers, which span the whole game (chapter-level 20→115; the pass button itself unlocks at chapter-level 20 pergatings.progress_pass_button_unlock_chapter).- increment_
by_ batch_ size quest.current + event.batch_size.- increment_
one quest.current + 1. Kill quests (subscribed toEntityDeath) skip ally deaths (§3).- log_
in_ today - +1 when the event references the log-in daily quest.
- loop_
task_ boss_ win - Loop-task-guarded boss win (
CompleteAllLoopTasksforce-completes toN). - loop_
task_ collect_ currency CompleteAllLoopTasks→ 100; other custom events → unchanged; otherwisequest.current + amountof the target currency in the event’s currency list, or 0 when the currency isn’t present (preserved from the shipped behavior — note: 0, notquest.current).- loop_
task_ increment_ batch - Loop-task-aware
+batch_sizewith completion valueN. - loop_
task_ increment_ one - Loop-task-aware
+1:CompleteAllLoopTasks→N(the completion target), other custom events → unchanged, else+1. - loop_
task_ pvp_ win - Loop-task-guarded PvP win. A
CompleteAllLoopTaskscustom event force- completes; otherwise the same player-won-PvP gate aspvp_win. - loop_
task_ raid_ dungeon - Loop-task-guarded dungeon raid.
- loop_
task_ reach_ chapter_ level - Loop-task-guarded reach-chapter-level.
- loop_
task_ reach_ level - Loop-task-guarded reach-level:
CompleteAllLoopTasks→ 1, other custom events → unchanged, elseevent.level >= T ? 1 : 0. - pvp_
revenge - «Реванш»: проиграй бой на арене, затем выиграй. Использовать с
progress_target: 2. - pvp_win
EndFightthat the player won in a PvP fight → +1, else unchanged. Theis_wingate is what distinguishes a “Win in the Arena” objective from mere participation — without it a loss would (wrongly) count as a win.- pvp_
win_ streak - Consecutive arena wins («выиграй N подряд»): win → +1, loss → reset to 0.
- quest_
current_ 0_ then_ 1_ else_ 2 - current 0 → 1, otherwise 2.
- quest_
event_ level_ 1_ then_ 2 - level 1 → 1, level 2 → 2, otherwise 0.
- raid_
dungeon - +1 on a
RaidDungeonevent for dungeonD, or while the active fight is in dungeonD; otherwise unchanged. - raid_
dungeon_ any - +1 on any
RaidDungeonregardless of type («пройди N рейдов данжей»). One raid ACTION = +1 (a multi-sweep still counts once — the same semantics asraid_dungeon). - raid_
dungeon_ difficulty_ at_ least - +1 on a
RaidDungeonwithdifficulty >= N(any dungeon type) — «пройди данж на сложности N+», полосные варианты. - reach_
chapter_ level character.current_chapter_level >= T ? 1 : 0(no guard).- reach_
level event.level >= T ? 1 : 0(no loop-task guard).- register
- Register this category’s native fns into the registry.
- upgraded_
abilities_ delta quest.current + Σ (final - current)overevent.upgraded_abilities.
Type Aliases§
- Conditional
Progress Fn - Signature of a
conditional_progressnative fn. Capturelessfnso it isCopyand storable in the registry; context arrives viaConditionalProgressCtx.