Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soul Shard #541

Merged
merged 28 commits into from
Mar 25, 2024
Merged

Soul Shard #541

merged 28 commits into from
Mar 25, 2024

Conversation

SoulMuncher
Copy link
Collaborator

@SoulMuncher SoulMuncher commented Mar 5, 2024

Closes #478

The caster splits a piece of their soul into the target. All damage that would be dealt to the shard bearer is instead redirected to the shard owner (I.E. the caster), but if the shard owner dies, they will reincarnate in the body of the nearest shard-bearer, and all of their soul shards will be consumed.

TODO

- Soul Shard should no longer cause infinite loops
- Soul Shard will not resurrect at dead units (prevents player from Soul-Sharding themselves and becoming unkillable)
@SoulMuncher SoulMuncher marked this pull request as ready for review March 7, 2024 04:16
@jdoleary
Copy link
Owner

jdoleary commented Mar 8, 2024

A few thoughts / change requests:

  • Let's make Soul Shard only be castable on allies. Otherwise, you can essentially instakill any enemy you shard when you yourself die
  • When the caster dies, let's have a particle (like when summoners teleport) flies to the one they will reincarnate in and when it arrives, they die and the caster reincarnates
  • When you die, only one (not all) of the sharded NPCs should die. The one you reincarnate in.
  • When you reincarnate, maybe you should keep the mana you had when you die? I'm unsure on this one

@SoulMuncher
Copy link
Collaborator Author

SoulMuncher commented Mar 8, 2024

Let's make Soul Shard only be castable on allies. Otherwise, you can essentially instakill any enemy you shard when you yourself die

I really like the idea of the spell being castable on enemies too. It leaves room for more creative use and emergent gameplay. At the same time though, maybe you're right. I'm not sure how we'd balance it without significantly redesigning the spell.

When the caster dies, let's have a particle (like when summoners teleport) flies to the one they will reincarnate in and when it arrives, they die and the caster reincarnates.

Sounds good! This is going to be a little tricky due to end game logic firing before the resurrect happens. Are you close to finishing the OnDeath awaits? @jdoleary

When you die, only one (not all) of the sharded NPCs should die. The one you reincarnate in.

It should already do this. I can't repro any other behavior

When you reincarnate, maybe you should keep the mana you had when you die? I'm unsure on this one

Yeah maybe, I'm not really sure either. I lean towards no, and also having the player revive at 1 hp?

@jdoleary
Random idea combining points 1 and 4: Another implementation of the spell would have it redirect the damage you take to the sharded entities, and then when the sharded entity dies it triggers the teleport/res/heal/mana restoration. May not fit the use case you have in mind? Maybe we turn these into two separate spells, Soul Shard and Soul Shield, and tweak each accordingly to be offensive/defensive. I actually really like that... Could be colored red/blue

SoulMuncher and others added 3 commits March 8, 2024 13:41
- Warning: This commit breaks the spell -> Causes game over instead of resurrecting = TO BE FIXED
when about to resurrect in a soul sharded npc
@jdoleary
Copy link
Owner

jdoleary commented Mar 8, 2024

Like you mentioned in Discord, if we allow you to cast soul shard on enemies you totally become unkillable. If you cast it on an ally, you will potentially run out of allies and lose the level.
Does this not solve that problem?
Also I agree, 1 hp and no mana, it's too powerful to not have a consequence.
The offensive idea is cool but isn't that essentially Soul Bind?

I can't repro any other behavior

Okay retested: Soul Shard shows prediction death for all sharded NPCs if you self kill, but will correctly only kill one.

  • Prediction should only show that the one that you kill dies.

I added a little commit that prevents the game over screen from coming up just by setting unit = alive at the top of the soul shard onDeath event (I abandoned awaiting onDeath cause it was super messy and I fixed the main issue elsewhere)

  • Ran into a bug: the onDeath isn't persisted though a save. If you soul shard a unit, save and then load and then die. You just die (not reincarnate) and the soul sharded npc is invincible cause they redirect all damage to your dead character.

@SoulMuncher
Copy link
Collaborator Author

SoulMuncher commented Mar 8, 2024

Okay retested: Soul Shard shows prediction death for all sharded NPCs if you self kill, but will correctly only kill one.
Prediction should only show that the one that you kill dies.

Okay, I did some more extensive testing and I'm seeing this now. I only see it when I'm targeting and damaging a bunch of sharded enemies. Might have to do with prediction awaiting the on death effect differently and resolving before the next unit.takeDamage or something when the actual game loop doesn't do that. I'll check it out 👍

@jdoleary
Copy link
Owner

jdoleary commented Mar 9, 2024

New idea for the VFX:
When soul shard is cast, have a particle (color of the player's robes) travel from the caster to the targets as if it's pieces of the player's soul.
When the shard-haver dies, I notice their corpse is kind of covering the player, so let's clean up the corpse and just leave behind a huge blood splatter as if you reincarnated out of their body. You should be able to customize startBloodParticleSplatter something like: startBloodParticleSplatter(underworld, targetVec2, unit, { maxRotationOffset: Math.PI * 2, numberOfParticles: 300 });

Also some balancing: since soul shard is so powerful, maybe it should cost some max health. Like 10% every cast? Thoughts?

@SoulMuncher
Copy link
Collaborator Author

SoulMuncher commented Mar 10, 2024

New idea for the VFX: When soul shard is cast, have a particle (color of the player's robes) travel from the caster to the targets as if it's pieces of the player's soul.

Sounds very cool! Might be nice if it made the unit played their damage animation on soul arrival as well? This idea reminds me of the 2nd phase transition for the final boss in Diablo 3

.

Also some balancing: since soul shard is so powerful, maybe it should cost some max health. Like 10% every cast? Thoughts?

Hm, I'm not sure. Max-stat penalties feel bad. People have commented on this with Death Wager and Mana Vampires. I don't think it's too op with the 1hp/0 mana respawn, high mana cost/scaling, and only targeting allies.

@jdoleary
Copy link
Owner

Yes! Totally play the unit damage animation on arrival, that's a great idea.
I agree, no max stat penalty

- Increased mana cost and can no longer soul shard self
@SoulMuncher
Copy link
Collaborator Author

@jdoleary The offensive idea is cool but isn't that essentially Soul Bind?

In the same way that Soul Shard is essentially Soul Bind, I guess.

My idea was:
Soul Shard: Redirects damage you take to them. If they die, you resurrect in their place.
Soul Shield: Redirects damage they take to you. If they die, they resurrect in your place.

They can be further distinguished by incentivizing offensive/defensive behaviors. Ex.

  • Soul Shard gives you full hp/mp/stamina when the sharded entity dies
  • Soul Shield gives you a full turn of invulnerability

Not totally convinced on the idea myself though, just brainstorming something that sounded cool thematically 😄

@SoulMuncher
Copy link
Collaborator Author

Did some testing with Soul Shard. It feels preeeetty bad. The onDeath behavior is very unreliable, and instantly resurrecting still has its own weird edge cases. Ex. Dying to ancients, dying to mid-flight ghost arrows, dying to bloat (sometimes), stuff like that. The worst part is when something unexpected happens, instead of being a "woah that was weird" moment, you just straight up lose the game.

Possible solution: Just resurrect the player at the start of their next turn. I can easily socket this modifier into the game-end logic and have it continue the game loop if they would be revived. This is how I imagine any kind of "undying" modifier would work anyway. I feel like this would be much cleaner and also allow for a neat resurrect animation.

I'll go ahead and start on it! @jdoleary

@jdoleary
Copy link
Owner

jdoleary commented Mar 12, 2024

Hmm good thought, I'm curious to see how it turns out! Thank you for being so thorough with your testing!

- Resurrect with full health
- Consumes all soul shards on resurrect
- Can target any unit with equal or less max HP than you
@SoulMuncher SoulMuncher force-pushed the Soul-Shard branch 3 times, most recently from 2e8b80c to 0eeacc3 Compare March 13, 2024 01:51
@SoulMuncher
Copy link
Collaborator Author

SoulMuncher commented Mar 13, 2024

Okay, lots of changes in, let me know what you think @jdoleary
I'm might do a little more testing and tweaking for balance.

@jdoleary
Copy link
Owner

Just spent some time playing around with this and it is AWESOME! Such a cool spell. I think we may have to have some kind of effect to show that the damage is being transferred though cause I guarantee players will use it and then be confused why they're taking damage. (The shard moving animations are awesome btw). So let's do something different for the damage transfer: how about we use the lightning effect from Bolt but change the color to the same dark red you've been using? (and make it last less long, like 200ms)

src/entity/Unit.ts Outdated Show resolved Hide resolved
src/modifierSoulShardOwner.ts Outdated Show resolved Hide resolved
src/cards/soul_shard.ts Outdated Show resolved Hide resolved
@jdoleary
Copy link
Owner

Note to self: Left TODO:
Multicolor replace filter for the teleport fx and the bolt fx

@SoulMuncher
Copy link
Collaborator Author

TODO: Verify that Soul Shard works with contaminate. It may not spread the shard owner id, which could cause problems.

#570

the same color as the soul shard magic
so that it can draw from multiple units simultaneously
so it gets passed onto getAllShardBearers
@jdoleary jdoleary merged commit b219ec2 into master Mar 25, 2024
@jdoleary jdoleary deleted the Soul-Shard branch March 25, 2024 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Spell: Soul Shard
2 participants