[Update 2.48] Boss rankings, fight hooks, big integers and new trophies
Hi everyone!
Update 2.48 is here! Quite a few new things this time: rankings for the bosses, fight hooks to drive your loadouts from your AI, big integers in LeekScript, four new hats, 18 trophies, and a big batch of improvements to the editor, the arenas and the fight history.
Full details here: https://leekwars.com/release/2.48
Boss rankings
- The bosses finally have their rankings! For each of the 3 bosses, four separate leaderboards: the fastest fight, the one with the fewest leeks, the lowest total level, and the first ones to beat it. Time to race the bosses again.
- A direct link to the ranking is added under each boss in the garden, and each ranking row links to the matching fight.
- The bosses now hit with their new attacks, implemented and animated: Fireball, Shuriken, Kemuridama, Trebuchet and Thunder. Their fights instantly have a lot more character.
Fight hooks and loadouts
- Two new optional functions in your AIs:
beforeFight() (called before turn 1) and afterFight() (after the fight ends). Inside beforeFight() you can call setLoadout(name) to apply the loadout that fits the opponent, for this fight only. getWinner() lets you read the winner from afterFight().
- In the loadout editor, you can now set preferred forgotten weapons, ranked by priority: the first one you own a free copy of gets equipped.
Big integers and LeekScript
- New
big_integer type: integers of unlimited size, just add the L suffix to a number. No more overflow when your numbers blow up. (thanks to Batary)
- New annotations to document your code:
@unused, @deprecated, @pure, @override, @tailrec and @todo, with an explanation on hover.
- Also on the language side: optional chaining
object?.field, string indexing and slicing (s[i], s[a:b:c]), integer ranges in a set ` with setFilter(), bit functions (bitLength, setBit, bitCount`...), Map and Set keeping insertion order, narrowing on fields, and code analysis up to 2x faster on large AIs.
Hats, trophies and a new weapon
- Four new hats: the feather cap, the steampunk hat, the Navy bachi and the invisible hat. Some are bought, some are crafted, and the cap unlocks once you receive 20 likes.
- 18 new trophies to unlock: around git, quick loadouts, bosses beaten 1000 times, clover potions and likes received.
- A rare new weapon, the Plutonium Bazooka, with a passive that turns part of the damage taken into resistance.
Editor
- You can now clone a remote git repository straight from the editor (File > Clone a git repo), and connect your self-hosted instances (GitHub Enterprise, GitLab, Bitbucket DC, Forgejo).
- Also: reference count on global variables, dead-code warning in strict mode, syntax highlighting for
.md/.json/.yaml files, a "Compact the repository" button, and the problems panel closing automatically once everything is resolved.
Game life
- A live counter of players queuing for arenas now shows in the garden and the menu, and the arena waiting popup got richer (leek choice, preferred mode, live counter).
- The fight history has a new sortable table mode, and a detailed preview appears when you hover a fight (duration, talent gains, trophies, bonuses).
- Encyclopedia pages now render math formulas (LaTeX), and their titles have a clickable anchor to share a specific section. (thanks to hypernavet)
- Also: hat and color suggestions with a live preview on your leek, a new account verification banner, Clover Potion III announced in chat, the challenge seed and side remembered between fights, and a pile of fixes (Colossus, trophies, forum, chat, old Android browsers...).
Balancing
- Dome: shield duration reduced from 4 to 3 turns.
- Doping: the strength and damage buff no longer applies to the caster, only to allies and summons.
Quite a lot of work in this one, hope you enjoy it! More is brewing on the PvE side, but shhh. :)
Thanks to all of you for sticking around over the years, it really means a lot to keep growing the game together. Enjoy all the new stuff!
Pilow