[ad_1]
This Week’s Tasks:
As I mentioned last week, the Piercing-Elemental synergy has needed some reworking and refactoring. Because it’s designed to duplicate the current projectile instead of spawning some new projectile, the behavior depends on the original crystal. I ended up making a separate script for each Piercing crystal, rather than just having one script that attaches to each projectile and covers all cases.
It’s not as elegant of a solution as the other synergies, but I think it was necessary for both readability and functionality. Each of the scripts have the same general idea, and the Update looks something like this:
![](http://journalismcore.com/wp-content/uploads/2024/03/1709568277_653_Conquering-Ciros-Week-7-Piercing-Elemental-Synergy-Rework-Conquering-Ciros.png)
Some crystals also have code to manage rotation and speed more directly (like Slash and Bounce, which need to rotate). The code was adapted from the original ability scripts, but couldn’t just use the entire script because of how many dependencies it has on non-existent things. For example, the duplicated projectile wouldn’t have a crystal as a parent or any connected crystals. I also moved the calculation of closestEnemy into Update for Slash and Bounce to give them strong homing effects.
This also means I have to use a switch to add each script, as shown here:
![](http://journalismcore.com/wp-content/uploads/2024/03/1709568278_687_Conquering-Ciros-Week-7-Piercing-Elemental-Synergy-Rework-Conquering-Ciros.png)
I think the functionality is pretty good at this point, but it may need adjustment in the future, and would need maintaining if we decide to add new crystals. That was my biggest concern with this implementation, since the other synergies should work for any crystal, even if we add it later on in development.
GIFs of each projectile:
There is still a lot of room to tweak the specifics. For example, Bounce doesn’t feel very strong because it despawns after hitting one enemy, so that could be changed. Critical Hit also needs its speed and rotation to be tweaked eventually.
![](http://journalismcore.com/wp-content/uploads/2024/03/Conquering-Ciros-Week-7-Piercing-Elemental-Synergy-Rework-Conquering-Ciros.gif)
![](http://journalismcore.com/wp-content/uploads/2024/03/1709568279_714_Conquering-Ciros-Week-7-Piercing-Elemental-Synergy-Rework-Conquering-Ciros.gif)
![](http://journalismcore.com/wp-content/uploads/2024/03/1709568279_621_Conquering-Ciros-Week-7-Piercing-Elemental-Synergy-Rework-Conquering-Ciros.gif)
[ad_2]
Source link