Page 1 of 3

Code for Ressurection Spell

Posted: Sat Nov 24, 2012 9:50 pm
by LordGarth
Here it is

defineSpell{
name = "rez_spell",
uiName = "Ressurection",
runes = "BDEFH",
skill = "spellcraft",
level = 50,
manaCost = 500,
onCast = function(caster, x, y, direction, skill)
for i=1,4 do
party:heal()
end
playSound("heal_party")
party:playScreenEffect("teleport_screen")
hudPrint(caster:getName() .. "Casted Ressurection")
end,

}

LG

Re: Code for Ressurection Spell

Posted: Sat Nov 24, 2012 11:57 pm
by msyblade
Oooooh, people have a balance issue with this spell, however:

A: I know you're working on a 75 level dungeon, and I'm sure balance(As we know it) goes out the window around level 15-20.I Cannot IMAGINE where the scale ends for you.

B: I'm gonna put this in Hotel Hades 3, and connect some remains_of_you guys that must be sacrificed to control how/when it can be used.

C: That also reminds me, You need nominated for the common lore "Creators" thread. I'm gonna suggest "Gluttony/Excess" for you if you don't mind being an "evil" protagonist in some mod down the road.

Re: Code for Ressurection Spell

Posted: Sun Nov 25, 2012 12:23 am
by LordGarth
No problem at all.

:twisted: :evil: :lol:

I would hope to make this rez spell need an item to use but I dont know how to use it.
skill needed is spellcraft and I will put in a skill lvl needed of 50.

LG

Re: Code for Ressurection Spell

Posted: Sun Nov 25, 2012 3:27 am
by SharinaDarkstar
By the way, just to be pedantic lol, the past tense of cast is cast, not casted.
Ie: Sharina cast fireball (past tense)
Or: Sharina casts fireball (present tense)

:)

Re: Code for Ressurection Spell

Posted: Sun Nov 25, 2012 5:53 am
by JohnWordsworth
Nice spell! Sure, it could be construed as over powered, but you've given it an epic (and appropriate) cost! Players deserve some awesome if they get to that level.

Some thoughts re: the Lua...

1. You have the party:heal() method call in a for loop, but I believe you only have to call it once for the whole party.

2. You mention you would like to make this spell need an item... In your onCast method, you could search the party's inventory with some code and then return early if they do not have a given item in there. Something like the following should work with a 'Gem of Resurrection' for instance (untested and mashed into an ipad)...
SpoilerShow

Code: Select all

onCast = function(caster, x, y, direction, skill)
local champWithGem = nil;
local gemItemSlot = 0;

for i=1, 4 do
  if (party:getChampion(i) ~= nil) then
    local champion = party:getChampion(i);

    for j=1,31 do
      local item = champion:getItem(j);

      if (item ~= nil and item.name == "resurrection_gem") then
        champWithGem = champion;
        gemItemSlot = j;
      end
  end
end

if (champWithGem == nil or gemItemSlot < 1 or gemItemSlot > 31) then
  hudPrint("You need a Gem of Resurrection to cast this spell!");
  return false;
end

local item = champWithGem:getItem(gemItemSlot);

if (item:getStackSize() > 1) then 
  item:setStackSize(item:getStackSize() - 1);
else
  champWithGem:removeItem(gemItemSlot);
end

party:heal();
playSound("heal_party");
party:playScreenEffect("teleport_screen");
hudPrint(caster:getName() .. "Cast Resurrection");
end

Re: Code for Ressurection Spell

Posted: Sun Nov 25, 2012 11:00 am
by Xanathar
I agree with doubts on the balance but I genuinely wonder how LOL1 could have this spell castable by - sometimes - even more than 1 character and still manage to be difficult as hell!

Re: Code for Ressurection Spell

Posted: Sun Nov 25, 2012 3:24 pm
by JohnWordsworth
@Xanathar: Haha, yeah - I remember having some areas of Lands of Lore where you would resurrect your party only for them all to die again in about 3 seconds. There are an awful lot of monsters that can dish out 1-hit kills if you're unlucky in LOL1. Awesome game though.

Re: Code for Ressurection Spell

Posted: Sun Nov 25, 2012 6:04 pm
by LordGarth
What I was really hoping for was a rez spell that brings them all back from the dead and no health or energy refill.

This spell can be cast over and over again because of the energy refill.

LG

Re: Code for Ressurection Spell

Posted: Sun Nov 25, 2012 6:27 pm
by msyblade
We need to get Grimwold in on this. Betting he can drain the energy after the heal(). Maybe even get returns on the living champions and revert to their initial HP/EP immediately after casting, so it only affects 1 dead character, and uses the energy. (I know I cant do it!)

Re: Code for Ressurection Spell

Posted: Sun Nov 25, 2012 6:40 pm
by LordGarth
Hoping for no energy increase for anyone. No hp increase for those already alive and those that are dead are brought back with maybe a 1/4 of their max health.

LG