185 Commits

Author SHA1 Message Date
2e96ec821d Add cooldown handling for spells and display in UI
- Implement cooldown tracking in SpellcasterBehavior
- Decrease cooldowns at end of each round in turn order
- Prevent casting spells on cooldown in spell.cast
- Show cooldown overlay and block click on skill buttons
- Adjust font sizes for better UI consistency
2026-03-18 05:09:35 +03:00
ec816eb666 Refactor spell cast and task returns for optional tasks 2026-03-18 04:05:04 +03:00
d84fc4a7c2 Add path preview and refactor spells with new Spell API
- Add path preview support to Spell with update and draw methods
- Refactor spell:cast to always return a Task
- Simplify spell.new constructor and apply distance constraint uniformly
- Replace walk spell with new Spell-based implementation supporting path
  preview
- Remove debug print from target_test.lua
2026-03-18 03:53:27 +03:00
ecec540251 Improve target validation logic in spell casting function 2026-03-18 02:03:30 +03:00
a6578ec8dd Refactor target distance check using query intersection
Replace manual distance check with combined targetQuery and
distance query intersection for cleaner spell targeting logic

Fix query combinators to correctly reference self in closures
2026-03-18 02:01:59 +03:00
ef5ff5f847 tweak light effects in spells 2026-03-18 01:47:09 +03:00
0d2ed101d6 Refactor light animation in regenerateMana spell using easing 2026-03-18 00:56:19 +03:00
4431934e6b Refactor spell target selection to use composable queries
Introduce SpellTargetQuery abstraction for flexible target filtering.
Replace fixed target types with query-based system supporting union,
intersection, and exclusion of target conditions. Update spells
accordingly.
2026-03-17 23:09:36 +03:00
e0b08b07ec Remove residentsleeper behavior from light effect in regenerateMana
spell
2026-03-17 20:39:30 +03:00
2e6155aea4 Add target validation and refactor spells with new cast logic 2026-02-13 01:28:36 +03:00
95f2230302 Add simple spell framework and refactor dev_attack spell to use it 2026-02-13 00:43:54 +03:00
08cfcca756 Remove unused utils require and clean trailing whitespace in tiled
behavior
2026-02-12 00:04:57 +03:00
2fc9bdf6a6 Clean up trailing whitespace in audio crossfade function 2026-02-12 00:01:43 +03:00
00f1c7f7ee fix(audio): remove duplicated logic and fix fader lifecycle in crossfade 2026-02-08 04:33:13 +01:00
78776ec0dd Refactor mana regeneration to add flash effect callback 2026-02-08 06:28:24 +03:00
163906c289 Import lerp from utils module and remove duplicate function definition 2026-02-08 06:20:22 +03:00
7695fe7698 Fix formatting and add type annotations to task completer function 2026-02-08 06:18:26 +03:00
52db521107 Animate camera and activate AI on turn change in turnOrder.next() 2026-02-08 06:16:11 +03:00
4277c6c310 refactor: replace AnimationNode with Task system (tweens/async) 2026-02-05 09:06:51 +01:00
0017b6e104 refactor: integrate tweens into Task system and simplify camera animations 2026-02-02 02:39:28 +01:00
7f1c31f67e Merge pull request 'feature/task' (#29) from feature/task into main
Reviewed-on: #29
2026-02-02 02:36:30 +03:00
4f436a3d3f Merge pull request 'fix/death-logic' (#28) from fix/death-logic into main
Reviewed-on: #28
2026-02-02 01:56:51 +03:00
752fe00910 refactor: implement turnOrder:remove by filtering/rebuilding queues instead of O(n) PriorityQueue:remove 2026-02-01 23:36:09 +01:00
2d29d35f96 fix: implement character death cleanup in turn order and queues 2026-02-01 23:26:14 +01:00
958d3bc245 fix: correctly add values to self.__grid instead of the grid class table 2026-02-01 22:57:33 +01:00
1986228670 Refactor spell casts to use task utilities and simplify callbacks
Add task.chain utility for chaining asynchronous tasks
2026-02-01 03:56:18 +03:00
403ba5a03f Add Task.wait to combine multiple tasks into one
Add TestRunner for running asynchronous tests with update support

Add test for Task.wait to verify concurrent task completion

Add set method to Counter for explicit value assignment
2026-01-31 02:11:55 +03:00
e02c221e31 make all 3 demo spells work with tasks 2026-01-30 00:55:08 +03:00
59cc0fba0b rewrite sprite:animate, residentsleeper:sleep, attack:cast to use
callback trees
2026-01-30 00:32:05 +03:00
86a599723e TLDR: higher-order functions my beloved
Add counter utility and chain async animations in spell cast

Introduce a Counter module to coordinate multiple asynchronous
animation callbacks and update spellbook cast to run chained
animations sequentially. Also lock selector during AI turns.
2026-01-29 02:32:58 +03:00
93a4961419 high-order functions my beloved 2026-01-25 07:05:45 +03:00
3f694ccec9 attempt to save our souls (callback hell my beloved)
Co-authored-by: Ivan Yuriev <ivanyr44@gmail.com>
2026-01-24 01:46:05 +03:00
d48f1af1af micro refactoring 2026-01-23 15:57:10 +03:00
9489cd0488 we can move under another (closest!!!!!!!!!) character
cool!!!!
2026-01-23 15:56:36 +03:00
8ad68f914d make walk:cast stateless 2026-01-19 13:03:47 +03:00
a4e2a2f257 Improve audio effects handling and update spell sound filter type 2026-01-19 00:45:04 +03:00
fc5a39b1d2 refactor audio.crossfade 2026-01-19 00:21:21 +03:00
9ad6c8bdfa Merge branch 'feature/audioengine' 2026-01-18 17:56:06 +03:00
99b176342f fix effects in audio:play 2026-01-18 14:03:03 +03:00
dee4ed9719 added effects to audio:play 2026-01-18 14:01:20 +03:00
70ec74ebe3 added filters to audio:play 2026-01-18 13:53:59 +03:00
ae03ee3adb add looping to music 2026-01-18 13:32:45 +03:00
2c8b65e1ae im undone, CROSSFADE DONE 2026-01-18 01:24:24 +03:00
26633db3c3 implement LightBehavior:animateColor
(to show that animations do work, actually)
2026-01-18 01:03:35 +03:00
ab37f6816d add demo dynamic light on dev_mana cast 2026-01-17 18:26:13 +03:00
e088fddf48 implement character:die() 2026-01-17 17:43:29 +03:00
f900e89a82 I HAVE AN ANIMATIONNODE
I HAVE AN UPDATE
OHHHHHHHHHHHHHHHHHH
animationNode:update(dt)

I HAVE A TREE
I HAVE AND AUDIO
OHHHHHHHHHHHHHHHHHHHHH
Tree.audio

I HAVE AN animationNode:update(dt)
I HAVE A Tree.audio
OHHHHHHHHHGKHGKGHKGgghkgh
Tree.audio.animationNode:update(dt)

TUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDUTUTUDUDU
2026-01-17 17:24:04 +03:00
7ff7e47a90 add PositionedBehavior 2026-01-17 14:49:08 +03:00
4ee7b62ae4 trying to update to main branch, and SWEAR TO GOD THIS SOMETHING BREAK 2026-01-17 10:57:38 +03:00
ac03a014f6 suck my ass stupid animations, im done 2026-01-17 10:49:53 +03:00