24 Commits

Author SHA1 Message Date
Red
930caa30b3 Magic spell refactor part 2 (#1757)
* DoAfter support for Actions (#38253)

* Adds Action DoAfter Events

* Adds DoAfterArgs fields to DoAfterComp

* Adds a base doafter action

* Adds Attempt action doafter logic

* Adds doafter logic to actions

* Changes Action Attempt Doafter and action doafter to take in Performer and the original use delay. Use delay now triggers when a repeated action  is cancelled.

* Readds the TryPerformAction method and readds request perform action into the action doafter events

* Adds a force skip to DoAfter Cancel so we can skip the complete check

* Adds a Delay Reduction field to the comp and to the comp state

* Fixes doafter mispredict, changes doafter comp check to a guard clause, sets delay reduction if it exists.

* Cancels ActionDoAfter if charges is 0

* Serializes Attempt Frequency

* Comment for rework

* Changes todo into a comment

* Moves doafterargs to doafterargscomp

* Adds DoAfterArgs comp to BaseDoAfterAction

* Removes unused trycomp with actionDoAfter

* Replaces DoAfterRepateUseDelay const with timespan.zero

* Removes unused usings

* Makes SharedActionsSystem partial, adds DoAfter partial class to ActionSystem, moves ActionDoAfter logic to the SharedActionsSystem.DoAfter class

* Cleanup and prediction

* Renames OnActionDoAfterAttempt to OnActionDoAfter, moves both to Shared Action DoAfter

* Removes ActionAttemptDoAfterEvent and moves its summaries to ActionDoAfterEvent. Converts OnActionDoAfterAttempt into TryStartActionDoAfter

* Removes Extra check for charges and actiondoafters

* Sloptimization

* Cleanup

* Cleanup

* Adds param descs

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>

* Refactor CP14 action emote and speech handling

Moved emote and speech logic from magic spell components to dedicated CP14 action components and systems. Removed CP14MagicEffectEmotingComponent and related event handling, introducing CP14ActionEmotingComponent and updating event subscriptions. Updated resource consumption and performed logic to use new action-based components. Adjusted affected prototypes and removed obsolete code.

* kicking in

* Refactor athletic spell actions and remove mana cost calc

Reworked dash and sprint spell YAMLs to use modular effect events and updated their action properties. Removed the unused CalculateManacost method from CP14SharedMagicSystem.cs. Also removed the startDelay property from the kick action.

* fix cooldown and resource cost

* casting visuals adapt

* telegraphy adapt

* slowdown adaption

* Remove Lumera and Merkas demigod spells and skills

Deleted all spell and skill prototypes related to the Lumera and Merkas demigods, including their actions, effects, and skill trees. Updated athletic sprint and second wind spells, and refactored portal_to_city spell to use modular effects. Also added a debug category to the admin skill reset verb.

* fuck...

* done

* some refactor hell

* light + lurker process

* meta process

* mobs process

* vampire

* finish

* no clientside

* Update water_creation.yml

* fixes

* Update ice_ghost.yml

* а

* viator review

* fix lurker

---------

Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com>
Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2025-09-17 22:13:10 +03:00
Red
4debb114e5 Magic system refactor part 1 (#1709)
* Refactor pacified block logic to action system

Moved pacified block functionality from magic spell components to the new CP14ActionSystem and related components. Removed CP14MagicEffectPacifiedBlockComponent and its logic, and introduced CP14ActionDangerousComponent for handling pacified checks. Updated examine and checks logic to use the new action-based components, improving separation of concerns between magic and action systems.

* finish pacified

* mobtargetstate refactor

* skillpoint cost refactor

* somaticAspect refactor

* material cost refactor

* mana cost now

* stamina cost

* SSD + verbal aspect

* religion

* music tool refactor

* vampire

* get rid of this event

* manacost refac

* Remove magicType field from spell definitions

Eliminated the 'magicType' property from all CP14MagicEffect components in spell YAML files across Electric, Fire, Life, Light, and Water categories. This streamlines spell configuration and may reflect a change in how magic types are handled in the system.

* Remove mana cost reduction effects from skill tiers

Eliminated the ModifyManacost effects from tier 2 and tier 3 skills in electromancy, healing, hydrosophistry, illusion, and pyrokinetic. This change standardizes skill progression and may be part of a balance update to mana cost mechanics.

* comment out T3 tiers

* namespace refactor

* fix hands
2025-08-25 20:40:10 +03:00
Red
906033633e Vampire clan battle gamemode (#1672)
* vampire returns + transformstions redo

* carcat fangs fix + greetings music update

* vampire skill trees

* Blood essence gathering

Introduces the vampire blood essence mechanic, including the CP14SpellVampireGatherEssence spell, new skill point consumable component, and related UI/localization updates. Adds clientside effects for spell casting, new vampire skill and action, and refines skill point gain/loss popups. Also restructures vampire components, updates spell logic for client/server prediction, and removes unused parallax files.

* perma damage

* Add skill point cost to magic system and vampire essence spell

Introduced CP14MagicEffectSkillPointCostComponent to allow magic effects to consume skill points. Updated the shared magic system to handle skill point checks and consumption. Added a new vampire spell for creating blood essence, including new icons and localization. Adjusted vampire component to grant and remove skill points, and updated related skill tree and spell prototypes. Minor fixes and refactoring in spell logic and descriptions.

* blood step + blood vision skills

* vampire clans icons

* 50 players limit + vampire objectives

* fixes

* devourers altar transmutation

* Remove StealTarget component from animal, dino, and mole NPCs

The StealTarget component and associated stealGroup were removed from boar, dinosaur, and mole NPC definitions. This likely disables these entities from being targeted for stealing, possibly to adjust gameplay balance or fix unintended behavior.

* fix

* essence creation improve

* altars

* voice masks

* transmutation fix

* teleportation glyph

* crimson candles

* candle crafting

* fix pointer predictions

* Add Vampire Clan Battle gamemode and update vampire roles

Introduces the 'Vampire Clan Battle' gamemode with new localization in English and Russian, updated game preset definitions, and secret weights. Refactors vampire antagonist briefings and objectives for multiple clans, adjusts vampire role preferences and team settings, and reduces the damage of the Vampire Gather Essence spell. Also includes minor improvements to spell and game mode descriptions, and corrects file naming for game preset locales.

* powerful kicks in

* time gates + vampire tree

* vampire proto faction

* fix

* fixes

* tree progression

* search enemy

* Update CP14SharedVampireSystem.cs

* blood essence gathering redo

* essence gathering refactor 2

* blood healing

* Update secret_weights.yml

* tree planting

* boodgrass

* tree upgrade announcement

* construction graph integration

* delete transmutation system

* workbench crafting returns

* cloaks crafting + cloak invisibility

* make vampire tree is generic red tree (sad)

* clan heart sprite

* Refactor vampire tree to clan heart system

Replaces the CP14VampireTreeComponent with CP14VampireClanHeartComponent, updating all related logic, appearance, and localization. Adjusts skill requirements, examination, and level progression to use the new clan heart system. Updates entity prototypes, visuals, and adds new orb sprites for clan heart levels. Localization strings and logic are updated to reflect the new terminology and mechanics.

* Update SpeciesBlacklist.cs

* Refactor vampire clan heart and remove tree spell

Refactored the vampire clan heart to support essence regeneration over time and adjusted level thresholds. Removed the vampire tree planting spell and related prototype fields, as well as unused tree system code. Updated localization, entity prototypes, and faction definitions to reflect these changes.

* Add clan heart construction for vampire clans

Introduces construction graphs, entities, and conditions for building unique clan hearts for each vampire clan (Unnameable, Devourers, NightChildrens). Adds new construction conditions (all clan vampires required, singleton enforcement), updates skill tree to unlock constructions, and removes the now-obsolete CP14MagicEffectAllVampireClanRequiredComponent. Also adds new frame sprites and updates localization and prototype files accordingly.

* level up vfx

* VFX + lobby track

* orb resprite

* sprites

* Add vampire altar mechanics and improve clan heart behavior

Introduces the CP14VampireAltarComponent and altar entity, which doubles blood essence extraction when victims are strapped to the altar. Adds a custom explosion behavior for vampire clan hearts upon destruction, updates construction graphs and recipes for altars, and improves localization. Also refines skill description handling and adjusts vampire bite action text.

* essence get when heart destruction

* Add clan heart damage and destruction announcements

Introduces announcements for when a vampire clan heart is damaged or destroyed, with cooldown to prevent spam. Refactors examination logic and updates localization files for both English and Russian to support new messages and sender formatting.

* glyph adaptation

* resurrection

* Add round end summary for Vampire Clan Battles

Implemented detailed round end text for the Vampire Clan Battles game mode, displaying victory, defeat, or draw outcomes based on surviving factions and population percentage. Refactored alive player percentage logic into a shared method and updated localization files with new outcome messages in English and Russian. Also removed an unused field from the defence condition component.

* Update vampire_cloak.yml

* fix

* fix

* Update portal_glyph.yml
2025-08-22 18:46:28 +03:00
Red
777c5f9a29 Electromancy magic branch (#1485)
* basic electromancy tree

* electric strike

* Update CP14SpellProjectile.cs

* fix throwing
2025-06-29 12:20:47 +03:00
Ed
518b439c0f integrate 2025-04-30 20:50:03 +03:00
Ed
b437be5cf8 Random bullfix go! (#1197)
* some fixes for AI pathfinding

* cobblestone tile

* stonebrick update

* fix #1194

* fix #1193

* Update stonebricks_square_carved.png
2025-04-18 22:47:17 +03:00
Tornado Tech
52f31e4403 refactor: Magic system (#1138)
Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
2025-04-14 17:32:41 +03:00
Ed
517bc5418b Wendigo demiplane antag (#1174)
* wendigo

* ritual3

* Update sky_lightning.yml
2025-04-12 17:32:53 +03:00
Ed
1e36a61339 Skill progression system [Draft] (#1056)
* fuck all

* clean up

* remove knowledge books

* Update base.yml

* cl

* fix #991

* fix

* Update subgamemodes.yml

* manual migration + recipes fix

* Update comoss.yml

* setup data

* setup skills systems

* more blacksmithing skills

* Update base.yml

* Create CP14SkillEffectAction.cs

* skill button returns

* base graph UI window

* skill tree drawing

* UI improve

* pyro setup

* skill trees selection, dragging control

* refactor skill system: rename Skills to LearnedSkills, add experience tracking and learning logic

* Create available.png

* skill description generation setup

* auto parsing skill names and descriptions

* Hydrosophistry

* water light fire and metamagic ported to skill tre

* ice dagger spell returns

* Update ice_dagger.yml

* delete old files

* Update modular_garde.yml

* ice arrow spell

* link graph with parallax

* show experience counter

* polish

* puf

* p

* pipap

* finally ready to merg?

* fix

* fix 2
2025-03-27 17:20:20 +03:00
Ed
0b5712ce97 Vampire antag (#988)
* new blood types

* vampire systems setup

* death under sun

* vampire blood nutrition

* alerts

* autolearn skills

* base bite actions

* suck blood spell

* polish

* Update blood.yml

* unshitcode

* vampire hunger visual

* nerf speed

* hypnosis + map update

* darkness demiplane warning
2025-03-07 14:52:43 +03:00
Ed
ba901d5e0e Crystals Update (#925)
* portal frame

* resprited sharpening stone

* portal frame entity

* darkness -> dimension magic type

* thaumaturgy platforms, some refactor

* magic energy refactor

* Update AirlockPryingTest.cs

* transfering tweaks

* fixed magic manipulation
2025-02-25 23:37:05 +03:00
Ed
3e26334c53 healing bard spell (#938) 2025-02-25 15:44:22 +03:00
Ed
ffa565484c Modular weapon inlay (#903)
* slots lists

* blade inlay

* tadam
2025-02-16 11:41:43 +03:00
Ed
73b4060c65 passport (#886) 2025-02-12 17:20:50 +03:00
Ed
b5eb3a3dc1 Kick stamina spell (#844)
* kick spell

* kick fix
2025-02-06 12:38:20 +03:00
Ed
50c502f598 AOE Spells (#758)
* AoE gameplay

* Update T1_fire_rune.yml

* test

* add cool AoE visual
2025-01-17 01:01:44 +03:00
MetalSage
a6847c08e8 Add "Mana Wasting" trait (#732)
* add trait

* Update Resources/Locale/ru-RU/_CP14/magicEnergy/magic-spells.ftl

* fix magic item using

---------

Co-authored-by: MetalSage <metalsage.official@gmail.com>
Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
Co-authored-by: Ed <edwardxperia2000@gmail.com>
2025-01-12 13:10:45 +03:00
Ed
36d02fdf6e Magic spells code expansion (#692)
* split manacost in separate component

* stamina spells

* toggleable actions

* swap activeCasting on ActiveDoAfter

* remove dublication

* Update CP14SharedMagicSystem.ToggleableActions.cs

* EntityWoldTarget

* mana glove done

* fix spell scrolls interrupting

* fix cooldown problem

* clean up, edit stamina system
2025-01-04 21:35:59 +03:00
Ed
ebac4a2eec Spellcasting upgrade (#543)
* move to gurps magic types

* spell traits, categorize spells

* Update TraitSystem.cs

* magic spells item provider

* Update twoHandedStaffs.yml

* Update CP14MagicManacostModifySystem.cs

* Update CP14SpellStorageSystem.cs

* some funny shit

* fix problems 1

* FIX

* more funny broken shit

* predict slowdown, fixes funny

* EntityTarget action

* fixes

* Update T1_sphere_of_light.yml

* fix demiplan loot centering

* predict movement!
2024-11-07 16:04:49 +03:00
Ed
a9bdab0705 Magic types, magic clothing (#539)
* magic types + auto magic spell description

* manacost calculation event

* manacost ffect clothing

* Update orbs.yml

* magic type not required
2024-11-06 08:44:03 +03:00
Ed
b5df675187 Spellcaster slowdown, mole nerf, new shoulder slot, healing staff (#538)
* healing staff sprite

* new back slot and move all big things to whis slot

* replace ring to staff

* caster sowdown! Mole rebalance

* loadouts fix

* fix weapon rotation

* Update spawners.yml
2024-11-05 19:05:40 +03:00
Ed
599c599a4e Some shit (#380)
* telegraphy effects

* shadow step spell backend

* add component spell

* predict sharpening

* Update ring.yml

* locale sync

* Update entities.ftl

* icon shadow step
2024-08-02 13:51:54 +03:00
Ed
31c9485e3b Magic rings (#378)
* flame creation spell backend

* flame creation visuals

* flame creation spell visual

* tweak

* some tweaks

* ice dagger spell

* move spells to rings

* Update ring.yml

* fix server crash
2024-08-02 00:48:36 +03:00
Ed
56da23925f Magic Items (#370)
* attuning to items start

* verbs attuning, forgot oldest attuning

* Update CP14SharedMagicAttuningSystem.cs

* some fixes

* add deattuning

* fix popups on owner

* file restructurization

* MORE FOLDER RENAMING GODD

* magic via holding yea!

* fix deattuning

* vfx bugfixs

* wearing magic items

* Cure wounds spell

* refactor spells

* more redo

* finish refactor
2024-08-01 11:52:27 +03:00