Intercept ability

Discussions on development of both the EQ2Emulator LUA Script Engine and Script specifications

Moderator: Team Members

Post Reply
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Intercept ability

Post by John Adams » Fri Aug 09, 2013 3:56 pm

While do not intend to write every spell script myself (I just don't have that kind of time to spare) I do want to try a few that we haven't done before. Here's one I am not sure how to write. Intercept.
  • 100% chance to intercept all damage on target.
    • On a successful intercept caster takes 50% of attack damage, target takes (X)% of attack damage.
    • Spell ends after 1 successful intercept.
      • If over 50% Health
  • 100% chance to intercept all damage on target.
    • On a successful intercept caster takes 50% of attack damage, target takes (X)% of attack damage.
    • Spell ends after 2 successful intercept.
      • If over 50% Health or less
Here's what I am struggling with:
  • How do I know when the target of this spell has taken damage?
  • How do I count how many times they were damaged?
  • How to I terminate the spell within the spell? Just remove(spell) like normal?
Mostly looking to see if we need more LUA support in the code, and planning how soon.

User avatar
thefoof
Retired
Posts: 630
Joined: Wed Nov 07, 2012 7:36 pm
Location: Florida

Re: Intercept ability

Post by thefoof » Fri Aug 09, 2013 4:11 pm

As for checking how many times a player has been damaged, wherever we put the check to transfer damage with this, we'd just have to remove a trigger each time - and if each trigger gets used up before the spell expires cancel the spell...not sure if we support triggers yet or not honestly.

For the actual absorbing the damage I have no idea :D we might have to add some values onto entities like wards, for stoneskin and intercept, and run a check for these in damage calculations.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Intercept ability

Post by John Adams » Fri Aug 09, 2013 4:19 pm

Thanks, Foof. We already know SOE spells are hella complex... and we're probably barely at the tip of the iceberg with supporting stuff (like the sub-spells, if this, cast that, etc).

It's fun to see how this all works, but very distracting from what I'm supposed to be doing :D

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Intercept ability

Post by Jabantiz » Fri Aug 09, 2013 4:39 pm

Stoneskin is kind of like a ward so we can probably extend the ward system to handle stoneskin, as for intercept we may need to handle that with new code, not sure how it works, if it is just 1 intercept ability allowed at a time it should be easy to add.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Intercept ability

Post by John Adams » Fri Aug 09, 2013 5:41 pm

Here's an example of what I mean by a "sub-spell". An effect that either always or conditionally procs when a spell is cast, or some other event occurs while it is active:

Part of Fighter's Recklessness ability
"Grants Reckless to caster, halving all taunt values and caster cannot block incoming attacks"
"Reckless" would be another spell with it's own params and scripts, yes?

Part of Warriors Unyielding Will
"On death this spell will cast Death's Door on caster."
  • "Applies Exploding Heart on termination."
where "Exploding Heart" is a sub-spell of the sub-spell Death's Door in the spell Unyielding Will ~cries~

and etc... Can we cast spells within spells today? I think there's a CastSpell() LUA. But wasn't sure if that was for use inside a spell script or non-spell scripts only?

User avatar
thefoof
Retired
Posts: 630
Joined: Wed Nov 07, 2012 7:36 pm
Location: Florida

Re: Intercept ability

Post by thefoof » Fri Aug 09, 2013 5:46 pm

It should work through CastSpell() yes. I think all functions work inside other functions other than the ones that are called through code (such as cast will only work in spellscripts, spawn only works in spawnscripts ect).

User avatar
thefoof
Retired
Posts: 630
Joined: Wed Nov 07, 2012 7:36 pm
Location: Florida

Recklessness

Post by thefoof » Fri Aug 09, 2013 6:33 pm

Here's the screenshot for recklessness
You do not have the required permissions to view the files attached to this post.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests