New Spells >> show them off here

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: New Spells >> show them off here

Post by Grimwold »

Nice work flatline... a neat idea and some interesting spells... I especially like the idea of Detect Monster
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: New Spells >> show them off here

Post by akroma222 »

Really exciting stuff Flatline!!
I think the light/dark path idea is fantastic (I had just dumped both light and dark spells into spellcraft but now I am thinking your system may well be the go!)
... couple of things....
1. I think you may have forgotten the manashield particle effect? and possibly the item scripts for wand of light and dark? (I just cloned whitewood wand with their names - but were there special item scripts you had made?)
2. I might try to play around with the teleport spell sound effects, it gets kinda cut off which does not sound that cool... BUT! I love the spell!! Definitely using that one :D
3. Was there a projectile dark spell you were working on?? I have created one which I was about to post - and I would be very happy for you to alter it to require the wand of darkness (anyways, I will post it below - you are welcome to it, as all are ;) )
4. I am also very keen for a missile/projectile shield spell - I am working on it atm, will post when I have something decent...
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: New Spells >> show them off here

Post by akroma222 »

DARK MISSILE
Ok, here is a projectile spell (for the dark arts?) that I have simply named dark missile. It will do only average damage, and also damage the caster and sap some of their food counter. However, once spellcraft is raised up to 42 or more the spell will change (visually) and will do major damage based on the casters current HP.
To set up:
1.Get spell_projectile2.model and lightning_ball texture from here:
http://ge.tt/9JRv7eR
The place them in your model/texture files in mod_assets.

2.Paste this into objects.lua:
SpoilerShow

Code: Select all

defineSpell{
   name = "dark_missile",
   uiName = "Dark Missile",
   skill = "spellcraft",
   level = 0,
   runes = "BCDF",
   manaCost = 10,
   onCast = function(caster, x, y, direction, skill)
       mymod_spells.castDarkMissile(caster,x,y,direction,skill)
   end
}
2. Paste this into spells and items.lua
SpoilerShow

Code: Select all

defineObject{
      name = "dark_missile",
      class = "Item",
      uiName = "Dark Missile",
      model = "mod_assets/models/spell_projectile2.fbx",
      gfxIndex = 109,
      attackPower = 60,
      impactSound = "lightning_bolt_hit",
      particleEffect = "dark_missile",
      stackable = false,
      sharpProjectile = false,
      projectileRotationY = 0,
      weight = 0,
}

defineObject{
      name = "dark_missile_greater",
      class = "Item",
      uiName = "Dark Missile",
      model = "mod_assets/models/spell_projectile2.fbx",
      gfxIndex = 109,
      attackPower = 60,
      impactSound = "lightning_bolt_hit",
      particleEffect = "dark_missile_greater",
      stackable = false,
      sharpProjectile = false,
      projectileRotationY = 0,
      weight = 0,
}
3.Paste this into particles.lua:
SpoilerShow

Code: Select all

defineParticleSystem{
	name = "dark_missile",
	emitters = {
		-- sparks
		{
			emissionRate = 50,
			emissionTime = 0,
			maxParticles = 100,
			boxMin = {-0.015, 0.02, 0.015},
			boxMax = { 0.015, 0.1,  -0.015},
			sprayAngle = {0,180},
			velocity = {0.1, 2.4},
			texture = "assets/textures/particles/glow.tga",
			lifetime = {0.25, 0.85},
			colorAnimation = false,
			color0 = {1.5, 1.5, 1.5},
			opacity = 0.8,
			fadeIn = 0.15,
			fadeOut = 0.3,
			size = {0.01, 0.05},
			gravity = {0,0,0},
			airResistance = 1.0,
			rotationSpeed = 1,
			blendMode = "Additive",
			depthBias = -0.0005,
			objectSpace = true,
		},

		--dust
		{
			emissionRate = 100,
			emissionTime = 0,
			maxParticles = 100,
			boxMin = {-1.0, 0.0,-1.0},
			boxMax = { 1.0, 0.0, 1.0},
			sprayAngle = {0,50},
			velocity = {0.1,1},
			texture = "assets/textures/particles/fog.tga",
			lifetime = {2,5.5},
			color0 = {0.05, 0.05, 0.05},
			opacity = 0.8,
			fadeIn = .15,
			fadeOut = .75,
			size = {0.4, 0.7},
			gravity = {0,0,0},
			airResistance = 0.1,
			rotationSpeed = 1,
			blendMode = "Translucent",
		},
		
		--glow
		{
         		spawnBurst = true,
         		emissionRate = 1,
         		emissionTime = 0,
         		maxParticles = 1,
         		boxMin = {0,0,-0.1},
         		boxMax = {0,0,-0.1},
         		sprayAngle = {0,30},
         		velocity = {0,0},
         		texture = "assets/textures/particles/glow.tga",
         		lifetime = {1000000, 1000000},
         		colorAnimation = false,
         		color0 = {0.5, 0.5, 1.5},
         		opacity = 0.5,
         		fadeIn = 0.1,
         		fadeOut = 0.1,
         		size = {1.8, 2.2},
         		gravity = {0,0,0},
         		airResistance = 1,
         		rotationSpeed = 2,
         		blendMode = "Additive",
         		objectSpace = true,
      		},
		  -- lightning core
      		{
         		emissionRate = 20,
         		emissionTime = 0,
         		maxParticles = 3,
         		boxMin = { 0,0,0 },
         		boxMax = { 0,0,0 },
         		sprayAngle = {0,360},
         		velocity = {0,0},
         		texture = "mod_assets/textures/lightning_ball.tga",
         		lifetime = {0.4,0.5},
         		colorAnimation = false,
         		color0 = {0.5, 0.5, 1.2},
         		opacity = 0.5,
         		fadeIn = 0.1,
         		fadeOut = 0.3,
         		size = {0.7, 0.75},
         		gravity = {0,0,0},
         		airResistance = 5,
         		rotationSpeed = -2,
         		blendMode = "Translucent",
         		objectSpace = true,
      		},
		
	}
}

defineParticleSystem{
	name = "dark_missile_greater",
	emitters = {
		-- sparks
		{
			emissionRate = 100,
			emissionTime = 0,
			maxParticles = 100,
			boxMin = {-0.015, 0.02, 0.015},
			boxMax = { 0.015, 0.1,  -0.015},
			sprayAngle = {0,280},
			velocity = {0.1, 2.4},
			texture = "assets/textures/particles/glow.tga",
			lifetime = {0.25, 0.85},
			colorAnimation = false,
			color0 = {1.5, 1.5, 1.5},
			opacity = 0.8,
			fadeIn = 0.15,
			fadeOut = 0.5,
			size = {0.01, 0.05},
			gravity = {0,0,0},
			airResistance = 1.0,
			rotationSpeed = 1,
			blendMode = "Additive",
			depthBias = -0.0005,
			objectSpace = true,
		},

		--dust
		{
			emissionRate = 100,
			emissionTime = 0,
			maxParticles = 100,
			boxMin = {-1.0, 0.0,-1.0},
			boxMax = { 1.0, 0.0, 1.0},
			sprayAngle = {0,50},
			velocity = {0.1,1},
			texture = "assets/textures/particles/fog.tga",
			lifetime = {2,5.5},
			color0 = {0.05, 0.05, 0.05},
			opacity = 0.8,
			fadeIn = .15,
			fadeOut = .75,
			size = {0.4, 0.7},
			gravity = {0,0,0},
			airResistance = 0.1,
			rotationSpeed = 1,
			blendMode = "Translucent",
		},
		
		--glow
		{
         		spawnBurst = true,
         		emissionRate = 1,
         		emissionTime = 0,
         		maxParticles = 1,
         		boxMin = {0,0,-0.1},
         		boxMax = {0,0,-0.1},
         		sprayAngle = {0,30},
         		velocity = {0,0},
         		texture = "assets/textures/particles/glow.tga",
         		lifetime = {1000000, 1000000},
         		colorAnimation = false,
         		color0 = {0.3, 0.3, 0.8},
         		opacity = 0.5,
         		fadeIn = 0.1,
         		fadeOut = 0.1,
         		size = {2.3, 2.7},
         		gravity = {0,0,0},
         		airResistance = 1,
         		rotationSpeed = 2,
         		blendMode = "Additive",
         		objectSpace = true,
      		},
		  -- lightning core
      		{
         		emissionRate = 20,
         		emissionTime = 0,
         		maxParticles = 3,
         		boxMin = { 0,0,0 },
         		boxMax = { 0,0,0 },
         		sprayAngle = {0,360},
         		velocity = {0,0},
         		texture = "mod_assets/textures/lightning_ball.tga",
         		lifetime = {0.4,0.5},
         		colorAnimation = false,
         		color0 = {0.7, 0.3, 1.2},
         		opacity = 0.5,
         		fadeIn = 0.1,
         		fadeOut = 0.3,
         		size = {1.2, 1.5},
         		gravity = {0,0,0},
         		airResistance = 5,
         		rotationSpeed = -2,
         		blendMode = "Translucent",
         		objectSpace = true,
      		},
		-- stars
      		{
         		emissionRate = 200,
         		emissionTime = 4,
         		maxParticles = 1000,
         		boxMin = {-0.6, -1,-0.6},
         		boxMax = { 0.6, 1, 0.6},
         		sprayAngle = {0,360},
         		velocity = {0.2,0.2},
         		objectSpace = true,
         		texture = "assets/textures/particles/teleporter.tga",
         		lifetime = {0.5,1},
         		color0 = {1.0,3.0,3.0},
         		opacity = 1,
         		fadeIn = 0.1,
         		fadeOut = 0.4,
         		size = {0.1, 0.15},
         		gravity = {0,0,0},
         		airResistance = 0.1,
         		blendMode = "Additive",
		},
		-- flames
      		{
         		emissionRate = 100,
         		emissionTime = 0,
         		maxParticles = 100,
         		boxMin = {-0.03, -0.03, 0.03},
         		boxMax = { 0.03, 0.03,  -0.03},
         		sprayAngle = {0,360},
         		velocity = {0.5, 0.7},
         		texture = "assets/textures/particles/torch_flame.tga",
         		frameRate = 35,
         		frameSize = 64,
         		frameCount = 16,
         		lifetime = {0.8, 0.8},
         		colorAnimation = true,
         		color0 = {1, 1, 1},
         		color1 = {0.7, 0.2, 0.9},
         		color2 = {0.8, 0.4, 0.15},
         		color3 = {0.6, 0.6, 0.9},
         		opacity = 0.5,
         		fadeIn = 0.15,
         		fadeOut = 0.4,
         		size = {0.45, 0.55},
         		gravity = {0,0,0},
         		airResistance = 1,
         		rotationSpeed = 1,
         		blendMode = "Translucent",
         		objectSpace = true,
      		}
	}
}
4. Create a script entity in you dungeon named "mymod_spells" and paste this into it:
SpoilerShow

Code: Select all

----------------------Dark Missile---------------------------------------

function castDarkMissile(caster,x,y,direction,skill)
	playSound("generic_spell", party.level, x, y)
	playSound("fireball_launch", party.level, x, y)
    local dx,dy = getForward(party.facing)
    local e = caster:getStat("health")
    if skill >= 42 then
    	shootProjectile("dark_missile_greater", party.level, x,y, direction, 20, 0, 0, 0, 0, 0, e * 10, party, true)
      else
        shootProjectile("dark_missile", party.level, x,y, direction, 20, 0, 0, 0, 0, 0, 60, party, true)
	end
	caster:damage(30, "physical")
	caster:modifyFood(-300)
	spellCaster = caster:getOrdinal()
end
------------------------------------------------------------------------

function customSpellOnProjectileHitHook(monster,projectile)
if projectile.name == 'dark_missile' or 'dark_missile_greater' then
      local originator = 2 ^ (spellCaster+1) -- calculate the originator of the spell
      local damage = math.random(60,90) --
      damageTile(monster.level,monster.x,monster.y,(monster.facing + 2)%4,originator+1, 'physical',damage)
	  playSoundAt("shockburst",monster.level,monster.x,monster.y)
      return false
   end
5. In monsters.lua, set up a test snail for the spell using this script (you will need to do this for all monsters in your mod/use a for loop with a monster list- still on the to do list sorry)
SpoilerShow

Code: Select all

cloneObject{
      name = "snail",
      baseObject = "snail",
      onProjectileHit = function(monster,projectile)
         return mymod_spells.customSpellOnProjectileHitHook(monster,projectile)
      end
}
That should be it!! Damage tile set up to award correct experience too. Let me know if I forgot something! :)
flatline

Re: New Spells >> show them off here

Post by flatline »

akroma222 wrote:Really exciting stuff Flatline!!
1. I think you may have forgotten the manashield particle effect? and possibly the item scripts for wand of light and dark? (I just cloned whitewood wand with their names - but were there special item scripts you had made?)
2. I might try to play around with the teleport spell sound effects, it gets kinda cut off which does not sound that cool... BUT! I love the spell!! Definitely using that one :D
3. Was there a projectile dark spell you were working on?? I have created one which I was about to post - and I would be very happy for you to alter it to require the wand of darkness (anyways, I will post it below - you are welcome to it, as all are ;) )
4. I am also very keen for a missile/projectile shield spell - I am working on it atm, will post when I have something decent...
1. Ooops, here it is: (it's really just the teleport effect added to the party for the spells duration)

Code: Select all

defineParticleSystem{
	name = "manashielded",
	emitters = {
		-- fog
		{
			emissionRate = 10,
			emissionTime = 40,
			maxParticles = 1000,
			boxMin = {-0.5, 0.0,-0.5},
			boxMax = { 0.5, 2.5, 0.5},
			sprayAngle = {0,360},
			velocity = {0.1,0.2},
			objectSpace = true,
			texture = "assets/textures/particles/fog.tga",
			lifetime = {3,3},
			color0 = {0.152941, 0.352941, 0.803922},
			opacity = 0.5,
			fadeIn = 2.2,
			fadeOut = 2.2,
			size = {1.5, 1.5},
			gravity = {0,0,0},
			airResistance = 0.1,
			rotationSpeed = 0.3,
			blendMode = "Additive",
		},

		-- stars
		{
			emissionRate = 200,
			emissionTime = 40,
			maxParticles = 1000,
			boxMin = {-0.6, 0.3,-0.6},
			boxMax = { 0.6, 2.5, 0.6},
			sprayAngle = {0,360},
			velocity = {0.2,0.2},
			objectSpace = true,
			texture = "assets/textures/particles/teleporter.tga",
			lifetime = {3,3},
			color0 = {3.0,3.0,3.0},
			opacity = 1,
			fadeIn = 0.1,
			fadeOut = 0.1,
			size = {0.05, 0.13},
			gravity = {0,0,0},
			airResistance = 0.1,
			rotationSpeed = 2,
			blendMode = "Additive",
		}
	}
}
2. Yep, sound effects, Icons and such are to be added before the next release. Feel free to add your own and suggest some. Btw, Was experimenting with letting monsters follow you through the portal, chaotic and fun but somewhat unstable.

3. Well no I haven't worked on any projectiles, the elemental schools are already full of projectile spells. I thought curses should be more up close and personal to make them different but I'll have a look at yours.

4. There is a cheap version of arrowshield/spellshield that use OnHitProjectile to nullify hits, but becomes too similar to manashield, I think. I want it to block players arrows going out at the same time. Drawbacks always makes for more interesting spells.
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: New Spells >> show them off here

Post by akroma222 »

Flatline-
Thanks for the particle system!
Letting monsters through the portal could indeed be chaotic! Very interesting hehe

Do you know which thread deals with the cheap arrowshield onProjectileHit spell?? I have not found it yet in my searches....
The cheap version is all I am after really... but you do make a good point, not being able to fire off your own arrows would be much better


Grimwold-
I have got the Leech spell working well! Great stuff :D
I have tried the freeze monster spell - pasting all of those scripts into both spells and objects.lua but on casting it keeps crashing the editor....
Any idea on that one? (or is it just me?? hehehe) ;)
flatline

Re: New Spells >> show them off here

Post by flatline »

akroma222 wrote:Flatline-
Thanks for the particle system!
Letting monsters through the portal could indeed be chaotic! Very interesting hehe

Do you know which thread deals with the cheap arrowshield onProjectileHit spell?? I have not found it yet in my searches....
The cheap version is all I am after really... but you do make a good point, not being able to fire off your own arrows would be much better


Grimwold-
I have got the Leech spell working well! Great stuff :D
I have tried the freeze monster spell - pasting all of those scripts into both spells and objects.lua but on casting it keeps crashing the editor....
Any idea on that one? (or is it just me?? hehehe) ;)
There is no such arrowshield spell yet, but I'll make one. Brb.
*EDITED*
OK, here's the temporary, boring arrowshield. It protects 100% against all projectiles for 30 seconds right now. Feel free to balance that while I put Grimrock aside for a few hours to work. Maybe a Light spell?

put in a ingame script called randomscript:

Code: Select all

function arrowtest()
if findEntity("arrowshieldobj") == nil then
return true
else
hudPrint("Projectile deflected")
return false
end
end
put in an ingame script called arrowstest:

Code: Select all

function arrowtest()
if findEntity("arrowshieldobj") == nil then
return true
else
hudPrint("Projectile deflected")
return false
end
end
put in spells.lua

Code: Select all

defineSpell{
name = "RROWTest",
uiName = "Arrow Shield",
skill = "spellcraft",
level = 1,
runes = "EFGH",
manaCost = 1,
onCast = function(champ, skill)
  spawn("timer", party.level, party.x, party.y, party.facing, "arrowshieldobj")
		:addConnector("activate", "randomscript", "reset")
        :setTimerInterval(30)
        :activate()
end,
}
Last edited by flatline on Thu Nov 22, 2012 11:33 am, edited 3 times in total.
User avatar
Xanathar
Posts: 629
Joined: Sun Apr 15, 2012 10:19 am
Location: Torino, Italy
Contact:

Re: New Spells >> show them off here

Post by Xanathar »

A bit necroing this but:
'd like to have special spell like : cure disease, cure poison but, I don't want these spells to be "too easy" to use.
So, I had an idea : The spell caster need 1 item in a hand to make the spell work.
Consider that these considerations apply to how the main game is balanced; if your mod drastically changes the effect of conditions or resting, of course they don't apply anymore! :)

Cure-disease-potion and disease itself are little more than flavor, the potion isn't worth the bottle it's in (I think all the ones I drinked were to free the bottle for better potions). I wouldn't worry about it as long as the spell is providing flavor and not removing it; most likely the spell wouldn't be worth the energy it costs (why cast cure disease when you can use magic to kill the monsters in the first place ? if there aren't monsters, then just rest).

Poison is a little bit more powerful, but just a little; in the main game it's a gain a minor annoyance as spiders have such an high attack power that the poison contributes too little to the damage. As for disease, the best way to cure in the main game is resting, but at the very least with poison you have some pressure in finding a safe place to rest, while with disease you can take it easy. Here the potion can be useful, depending on the situation (you won't drink a potion everytime you are poisoned, but some). I think the spell is viable anyway and wouldn't break the game as long as you put it in earth school and not in spellcraft (which fits as flavor, btw). In this way it's available only to a real minority of parties (those with an investment in earth) and would bring some power to the weakest-by-far spell school. I wouldn't pick it anyway, but better than before.

Of course these are just my 2 cents :)
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com

The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563

My preciousss: http://www.moonsharp.org
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: New Spells >> show them off here

Post by Grimwold »

akroma222 wrote:Grimwold-
I have got the Leech spell working well! Great stuff :D
I have tried the freeze monster spell - pasting all of those scripts into both spells and objects.lua but on casting it keeps crashing the editor....
Any idea on that one? (or is it just me?? hehehe) ;)
I honestly don't know why it's not working... I created a blank dungeon just now... pasted in only those two scripts, directly from the post here, to objects.lua and spells.lua and it worked fine. Is it possible something in your dungeon already is interfering with the it? I'd certainly be interested to know the cause, but unfortunately I am unable to duplicate the problem.
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: New Spells >> show them off here

Post by akroma222 »

Grimwold-
thought it might be a 'me' problem... I will tinker and get back to you ;)

Xanathar- good words...
I agree with your 2 cents, poison can be critical in the wrong situation.... disease much less so.. In my humble opinion, I would put cure poison in earth, cure disease in air and cure paralysis in water (given original game balancing - and the need for a cure paralysis potion would have to be generated by more monsters that actually paralyzed you and for a lot longer)

Poor old earth magic... I have given each skill (including staves) 6-8 new spells as my mod length requires it. Among the spells added to earth were spells that did physical damage (eg whipping rocks), protection spells and create food (which kinda messes with a main game mechanic).... hopefully this means people will reconsider going the earthy road ;)

Flatline-
That is super, I will have to try it tomorrow.... I was possibly going to tweak it so math.random determined whether or not a projectile made it through... then again, there isn't that many projectile throwers out there so it may not really matter....
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: New Spells >> show them off here

Post by Grimwold »

@flatline

I've been testing your spells and I've run into a problem. All the spells I've tried will only take effect if the appropriate wand is in slot 7.. if 7 is empty, but and the wand is in slot 8 the spell is cast, but nothing happens.
So far this has happened with Caliginous Curse; Vengeful Curse; Curse of Darkness and Holy Vigor.

I think it is to do with how you are testing for the presence of the wand... I've fixed them by using a single if test as follows:

Code: Select all

if champ:getItem(7) ~= nil and champ:getItem(7).name == "wand_of_darkness" or champ:getItem(8) ~= nil and champ:getItem(8).name == "wand_of_darkness"  then
  DO THE SPELL
else
  hudPrint("You are not Schooled")
end
There's a couple of other suggestions I would like to make too... it's always safer to put your spell code in a script entity in the dungeon because that way you get an error message instead of a crash if it goes wrong. This happened to me a couple of times trying to fix the above problem, until I moved the spells into a script entity.

Also, you can put all spells in the same script entity e.g. flatline_spells and then reference the appropriate function for the relevant spell. As well as being a bit neater, it makes it easier for others to include your spells in their dungeon.
e.g.

Code: Select all

    defineSpell{
       name = "curse",
       uiName = "Caliginous Curse",
       skill = "staves",
       level = 16,
       runes = "DEH",
       manaCost = 10,
       onCast = function(champ, x, y, direction, skill)
         return flatline_spells.caliginousCurse(champ,x,y,direction,skill)
       end,
    }


    defineSpell{
       name = "cursedark",
       uiName = "Summon Darkness",
       skill = "spellcraft",
       level = 20,
       runes = "CDEH",
       manaCost = 10,
       onCast = function(champ, x, y, direction, skill)
        return flatline_spells.curseDark(champ,x,y,direction,skill)
       end,
    }

    defineSpell{
       name = "curserage",
       uiName = "Vengeful Curse",
       skill = "staves",
       level = 8,
       runes = "AEH",
       manaCost = 10,
       onCast = function(champ, x, y, direction, skill)
         return flatline_spells.vengefulCurse(champ,x,y,direction,skill)
       end,
    }

    defineSpell{
       name = "holyvigor",
       uiName = "Holy Vigor",
       skill = "staves",
       level = 12,
       runes = "BCE",
       manaCost = 10,
       onCast = function(champ, x, y, direction, skill)
         return flatline_spells.holyVigor(champ,x,y,direction,skill)
       end
    }

I have been working on moving everything into a single script entity, but I've only done these 4 spells so far, and I have to go into a meeting now.
I'll include them here for completeness
SpoilerShow

Code: Select all

function caliginousCurse(champ,x,y,direction,skill)
    if champ:getItem(7) ~= nil and champ:getItem(7).name == "wand_of_darkness" or champ:getItem(8) ~= nil and champ:getItem(8).name == "wand_of_darkness"  then
      hudPrint(champ:getName().." pulls life force to strengthen the spell")
      damageTile(party.level, party.x, party.y, party.facing, 1, "physical", (5+(skill/2)))
      spawn("curseburst", party.level, party.x, party.y-1, party.facing)
      spawn("curseburst", party.level, party.x+1, party.y, party.facing)
      spawn("curseburst", party.level, party.x, party.y+1, party.facing)
      spawn("curseburst", party.level, party.x-1, party.y, party.facing)
      damageTile(party.level, party.x, party.y-1, party.facing, 101111, "physical", math.random(1,10)*(skill*2))
      damageTile(party.level, party.x-1, party.y, party.facing, 101111, "physical", math.random(1,10)*(skill*2))
      damageTile(party.level, party.x, party.y+1, party.facing, 101111, "physical", math.random(1,10)*(skill*2))
      damageTile(party.level, party.x+1, party.y, party.facing, 101111, "physical", math.random(1,10)*(skill*2))
      party:playScreenEffect("party_crush")
    else
      hudPrint("You are not schooled in the Dark Arts")
    end
end

function curseDark(champ,x,y,direction,skill)
    if champ:getItem(7) ~= nil and champ:getItem(7).name == "wand_of_darkness" or champ:getItem(8) ~= nil and champ:getItem(8).name == "wand_of_darkness"  then
      spawn("darkburst", party.level, party.x, party.y, party.facing)
      damageTile(party.level, party.x, party.y, party.facing, 1, "physical", (5+(skill/2)))
      for slot=1,4 do
        if party:getChampion(slot) ~= nil then
          party:getChampion(slot):setCondition("invisibility", skill);
        end
      end
    else
      hudPrint("You are not schooled in the Dark Arts")
    end
end

function vengefulCurse(champ,x,y,direction,skill)
    if champ:getItem(7) ~= nil and champ:getItem(7).name == "wand_of_darkness" or champ:getItem(8) ~= nil and champ:getItem(8).name == "wand_of_darkness"  then
      spawn("curseburst", party.level, party.x, party.y, party.facing)
      damageTile(party.level, party.x, party.y, party.facing, 1, "physical", (5+(skill/2)))
      for slot=1,4 do
        if party:getChampion(slot) ~= nil then
          party:getChampion(slot):setCondition("rage", skill);
        end
      end
    else
      hudPrint("You are not schooled in the Dark Arts")
    end
end

function holyVigor(champ,x,y,direction,skill)
    if champ:getItem(7) ~= nil and champ:getItem(7).name == "wand_of_light" or champ:getItem(8) ~= nil and champ:getItem(8).name == "wand_of_light"  then
      local cenergy = champ:getStat("energy")
      champ:modifyStat("energy", -200)
      for slot=1,4 do
        if party:getChampion(slot) ~= nil then
          party:getChampion(slot):setCondition("haste", cenergy);
        end
      end
    else hudPrint("You are not a true follower of the Light")
    end
end
Post Reply