Page 1 of 21

New Spells >> show them off here

Posted: Wed Oct 03, 2012 5:01 pm
by Grimwold
Party Healing Spell
(now with different runes)

Here's a party healing spell I created... it requires Spellcraft level 24, costs 20 mana and heals 1.5 to 2 times the skill of the caster to all party members.
SpoilerShow

Code: Select all

-- Party Healing spell
defineSpell{
   name = "healing",
   uiName = "Healing",
   skill = "spellcraft",
   level = 24,
   runes = "BEF",
   manaCost = 20,
   onCast = function(caster, x, y, direction, skill)
   local heal_amount = math.random(6,8)/4*skill
      for i=1,4 do
          party:getChampion(i):modifyStat("health", heal_amount)
       end
   playSound("heal_party")
   party:playScreenEffect("frostburst")
   hudPrint(caster:getName() .. " healed the party by " .. heal_amount .. " points")
   end,
}
edit - now with playSound and playScreenEffect

-------------------------------------------------------------
EDIT BY KOMAG:

For reference to others reading this thread, here is a little pic that shows the rune letters:
Image

Re: New Spells >> show them off here

Posted: Wed Oct 03, 2012 5:14 pm
by HaunterV
can you attach a spell effect? like the little just teleported glow or something? or a recolored fireburst.

Re: New Spells >> show them off here

Posted: Wed Oct 03, 2012 5:19 pm
by Grimwold
HaunterV wrote:can you attach a spell effect? like the little just teleported glow or something? or a recolored fireburst.
I haven't really worked with FXs yet.. but I can give it a go, or someone else with experience could post.

edit - I've now added a sound to the original spell which I think improves it. Still not sure how to go about adding an effect.

Re: New Spells >> show them off here

Posted: Wed Oct 03, 2012 8:04 pm
by HaunterV
Grimwold wrote:
HaunterV wrote:can you attach a spell effect? like the little just teleported glow or something? or a recolored fireburst.
I haven't really worked with FXs yet.. but I can give it a go, or someone else with experience could post.

edit - I've now added a sound to the original spell which I think improves it. Still not sure how to go about adding an effect.
look at the thread about the flame skeleton. I think that gives an idea on how to attach effects.

Re: New Spells >> show them off here

Posted: Wed Oct 03, 2012 11:13 pm
by Neikun
Lemme just keep an eye on this one

Re: New Spells >> show them off here

Posted: Thu Oct 04, 2012 5:00 am
by Trap
party heal is cool, how hard would it be to modify it to heal a single character - to allow a "target" function.

Re: New Spells >> show them off here

Posted: Thu Oct 04, 2012 10:44 am
by Grimwold
Trap wrote:party heal is cool, how hard would it be to modify it to heal a single character - to allow a "target" function.
It would be pretty easy to have the spell heal only 1 character... the difficulty lies in selecting which character as there's no way for the player to pass that information to the spell. Other than doing a random character, The only thing I can think of at the moment is to use party.facing() so if you are facing North the spell heals character 1, East character 2 etc. Of course that would be very hard to do when you're in the middle of a fight!

edit - perhaps another way would be to cycle through the characters and see which has the lowest health... so the spell would always heal the closest to death.

Re: New Spells >> show them off here

Posted: Thu Oct 04, 2012 10:55 am
by Blichew
Maybe change it a bit so it heals a character with lowest health ? Or lowest % of total health ? That would make it heal one character, not random.

Re: New Spells >> show them off here

Posted: Thu Oct 04, 2012 11:23 am
by Grimwold
Blichew wrote:Maybe change it a bit so it heals a character with lowest health ? Or lowest % of total health ? That would make it heal one character, not random.
Yeah, I'd like to work on a single healing spell that heals the lowest health character.. If I can get that to work, then I plan on combining the two and testing "Skill" when the spell is cast... if the mage has a high enough spellcraft skill then it will do heal party.. otherwise it heals a single most-needy character.

PS - I managed to add a pretty visual effect to the spell above.

Re: New Spells >> show them off here

Posted: Thu Oct 04, 2012 11:41 am
by Blichew
You could go further and implement some kind of healing marker item.
Logic behind it:
onUse:
- get party member with lowest hp, save it to global lowestHP
- for the party member who used the marker set HP to lowestHP - 1.

He'll automatically become new healing target.

again, workaround, but you can (somewhat) choose who do you want to heal. Dunno how to implement it lore-wise thou ;)

EDIT: I know, make the item with syringe icon and call it an anesthetic or smth :P