Code: Select all
------------------------------------------------------------------- NOXWOOD BOW
function noxwood(champion,weapon)
for i = 7,8 do
local item1 = champion:getItem(i)
if item1 and item1.name == "twistwood_bow_cursed_poison" then
local slot1 = i
if i == 7 then
local item2 = champion:getItem(8)
local s2 = item2:getStackSize()
if item2 and item2.name == "poison_arrow" or item2.name == "poison_quarrel" then
if s2 > 0 then
playSound("poison_bolt_launch")
if champion:getSkillLevel("earth_magic") >= 50 then
if checkPosition() == true then
local dx,dy = getForward(party.facing)
if party.facing == 0 or party.facing == 2 then
for modif = -0.4,0.4,0.1 do
shootProjectile("poison_quarrel", party.level, party.x+modif, party.y, party.facing, 12+(modif*2), 0, 0, 0, 0, 0, 35, party, true, originator)
end
else
for modif = -0.4,0.4,0.1 do
shootProjectile("poison_quarrel", party.level, party.x, party.y+modif, party.facing, 12+(modif*2), 0, 0, 0, 0, 0, 35, party, true, originator)
end
end
party:playScreenEffect("damage_screen_green")
hudPrint("Earth Magic Mastery commands Noxwood Bow to fire waves of arrows!")
return true
end
end
for i = 1,4 do
party:getChampion(i):setCondition("poison", 40)
end
party:playScreenEffect("damage_screen_green")
playSound("death_cloud")
else
playSound("impact_generic")
hudPrint("Noxwood bow will only fire poisonous missiles...")
return false
end
end
else
if i == 8 then
if item2 and item2.name == "poison_arrow" or item2.name == "poison_quarrel" then
if s2 > 0 then
playSound("poison_bolt_launch")
if champion:getSkillLevel("earth_magic") >= 50 then
if checkPosition() == true then
local dx,dy = getForward(party.facing)
if party.facing == 0 or party.facing == 2 then
for modif = -0.4,0.4,0.1 do
shootProjectile("poison_quarrel", party.level, party.x+modif, party.y, party.facing, 12+(modif*2), 0, 0, 0, 0, 0, 35, party, true, originator)
end
else
for modif = -0.4,0.4,0.1 do
shootProjectile("poison_quarrel", party.level, party.x, party.y+modif, party.facing, 12+(modif*2), 0, 0, 0, 0, 0, 35, party, true, originator)
end
end
party:playScreenEffect("damage_screen_green")
hudPrint("Earth Magic Mastery commands Noxwood Bow to fire waves of arrows!")
return true
end
end
for i = 1,4 do
party:getChampion(i):setCondition("poison", 40)
end
party:playScreenEffect("damage_screen_green")
playSound("death_cloud")
else
playSound("impact_generic")
hudPrint("Noxwood bow will only fire poisonous projectiles...")
return false
end
end
end
end
end
end
end
-----------------------------------------------
function shadowtaint(champion,weapon)
local dx,dy = getForward(party.facing)
bow_monster = whichMonster(party.level,party.x+dx,party.y+dy)
if bow_monster ~= "" then
playSound("spellfizzle1")
hudPrint("You need more space to loose the Shadowtwist Bow!!")
return false
end
local originator = champion:getOrdinal()
for i = 7,8 do
local item1 = champion:getItem(i)
if item1 and item1.name == "twistwood_bow_cursed_quarrel" then
local slot1 = i
if i == 7 then
local item2 = champion:getItem(8)
local s2 = item2:getStackSize()
if item2 and item2.name == "tainted_quarrel" then
if s2 > 0 then
playSound("dark_missile")
if champion:getSkillLevel("assassination") >= 50 then
if checkPosition() == true then
local dx,dy = getForward(party.facing)
local originator = champion:getOrdinal()
shootProjectile("dark_missile", party.level, party.x, party.y, party.facing, 14, 0, 0, 0, 0, 0, 200, party, true, originator)
for ent in fix.newEntitiesAt(party.level, party.x, party.y) do
if ent.name == "dark_missile" then
fxScripts.addProjectileEffect(ent, "dark_missile", 15, "dark_missile_hit")
end
end
party:playScreenEffect("damage_screen_black")
hudPrint("Master Assassins deal quick death from the shadows with tainted weaponary...")
playSound("blades_gear")
if s2 >= 2 then
item2:setStackSize(s2 - 1)
else
item2:removeItem(i)
end
return true
end
else
for i = 1,4 do
party:getChampion(i):damage(75, "cold")
end
party:playScreenEffect("damage_screen_black")
hudPrint("Only Master Assassins can safely weild this horrifyingly cursed weapon...")
playSound("necromorph_unrest")
return true
end
end
else
playSound("damage_insectoid_male")
hudPrint("Shadow Taint Bow will only fire tainted projectiles by a true assasin...")
return false
end
end
else
if i == 8 then
local originator = champion:getOrdinal()
local item2 = champion:getItem(8)
local s2 = item2:getStackSize()
if item2 and item2.name == "tainted_quarrel" then
if s2 > 0 then
playSound("dark_missile")
if champion:getSkillLevel("assassination") >= 50 then
if checkPosition() == true then
local dx,dy = getForward(party.facing)
local originator = champion:getOrdinal()
for i = 1,4 do
party:getChampion(i):setCondition("invisibility", 10)
party:getChampion(i):setCondition("haste", 10)
end
party:playScreenEffect("damage_screen_black")
hudPrint("Master Assassins deal quick death from the shadows with tainted weaponary...")
playSound("blades_gear")
if s2 >= 2 then
item2:setStackSize(s2 - 1)
else
item2:removeItem(i)
end
return true
end
else
for i = 1,4 do
party:getChampion(i):damage(75, "cold")
end
party:playScreenEffect("damage_screen_black")
hudPrint("Only Master Assassins can safely weild this horrifyingly cursed weapon...")
playSound("necromorph_unrest")
return true
end
end
else
playSound("damage_insectoid_male")
hudPrint("Shadow Taint Bow will only fire tainted projectiles by a true assasin...")
return false
end
end
end
end
end