Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Merge branch 'feature/vahzl_provoker' into release
Browse files Browse the repository at this point in the history
# Conflicts:
#	sql/mob_pools.sql
  • Loading branch information
zach2good committed Sep 19, 2020
2 parents 8c838d2 + 22d79af commit f75d6ce
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 8 deletions.
17 changes: 17 additions & 0 deletions scripts/globals/mobskills/vulture_1.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---------------------------------------------
-- (Vulture 1)
-- Dummy ability used for 2hr animation.
---------------------------------------------
require("scripts/globals/monstertpmoves")
require("scripts/globals/settings")
require("scripts/globals/msg")
---------------------------------------------

function onMobSkillCheck(target, mob, skill)
return 0
end

function onMobWeaponSkill(target, mob, skill)
skill:setMsg(tpz.msg.basic.NONE)
return 0
end
61 changes: 61 additions & 0 deletions scripts/zones/Promyvion-Vahzl/mobs/Provoker.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
-----------------------------------
-- Area: Promyvion - Vahzl
-- NM: Provoker
-----------------------------------
require("scripts/globals/status")
require("scripts/globals/magic")
-----------------------------------

function onMobInitialize(mob)
mob:addMod(tpz.mod.ACC, 50)
mob:setMobMod(tpz.mobMod.IDLE_DESPAWN, 180)
mob:setMobMod(tpz.mobMod.ADD_EFFECT, 1)
end

function onMobFight(mob, target)

local changeTime = mob:getLocalVar("changeTime")
local element = mob:getLocalVar("element")

if changeTime == 0 then
mob:setLocalVar("changeTime", math.random(2, 3)*15)
return
end
if mob:getBattleTime() >= changeTime then
local newElement = element
while newElement == element do
newElement = math.random(1, 8)
end
if element ~= 0 then
mob:delMod(tpz.magic.absorbMod[element], 100)
end

mob:useMobAbility(624)
mob:addMod(tpz.magic.absorbMod[newElement], 100)
mob:setLocalVar("changeTime", mob:getBattleTime() + math.random(2, 3)*15)
mob:setLocalVar("element", newElement)
end
end

function onAdditionalEffect(mob, target, damage)
local element = mob:getLocalVar("element")
local index =
{
[1] = tpz.mob.ae.ENFIRE,
[2] = tpz.mob.ae.ENSTONE,
[3] = tpz.mob.ae.ENWATER,
[4] = tpz.mob.ae.ENAERO,
[5] = tpz.mob.ae.ENBLIZZARD,
[6] = tpz.mob.ae.ENTHUNDER,
[7] = tpz.mob.ae.ENLIGHT,
[8] = tpz.mob.ae.ENDARK
}
if index[element] then
return tpz.mob.onAddEffect(mob, target, damage, index[element], {chance = 1000})
else
return 0, 0, 0 -- Just in case its somehow not got a variable set
end
end

function onMobDeath(mob, player, isKiller)
end
2 changes: 1 addition & 1 deletion sql/mob_pools.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3269,7 +3269,7 @@ INSERT INTO `mob_pools` VALUES (3208,'Proto-Omega','Proto-Omega',54,0x0000370400
INSERT INTO `mob_pools` VALUES (3209,'Proto-Ultima','Proto-Ultima',54,0x0000340400000000000000000000000000000000,1,7,6,240,100,0,1,1,0,18,113,32,7,155,0,0,103,1,256,729);
INSERT INTO `mob_pools` VALUES (3210,'Protoamoeban','Protoamoeban',5,0x00005C0900000000000000000000000000000000,4,8,12,240,100,0,1,0,0,0,0,0,0,0,0,0,2,1,0,5);
INSERT INTO `mob_pools` VALUES (3211,'Protozoan','Protozoan',229,0x0000240100000000000000000000000000000000,1,1,7,240,100,0,1,0,0,0,0,0,6353,131,0,0,0,1,0,229);
INSERT INTO `mob_pools` VALUES (3212,'Provoker','Provoker',220,0x0000620400000000000000000000000000000000,5,5,7,240,100,0,1,1,1,2,0,32,765,159,5,0,114,1,0,220);
INSERT INTO `mob_pools` VALUES (3212,'Provoker','Provoker',220,0x00005D0400000000000000000000000000000000,1,7,7,240,100,0,1,1,1,2,0,32,765,135,0,0,114,1,0,220);
INSERT INTO `mob_pools` VALUES (3213,'Prowlox_Barrelbelly','Prowlox_Barrelbelly',373,0x00003E0400000000000000000000000000000000,11,11,2,240,100,0,1,0,1,2,0,32,0,159,0,0,0,1,0,373);
INSERT INTO `mob_pools` VALUES (3214,'Prune','Prune',172,0x0000140100000000000000000000000000000000,8,1,7,240,100,0,1,0,1,16,0,0,0,3,0,0,142,1,0,722);
INSERT INTO `mob_pools` VALUES (3215,'Psycheflayer','Psycheflayer',233,0x0000EF0600000000000000000000000000000000,4,4,7,240,100,0,1,1,0,16,0,0,0,129,12,0,28,1,0,233);
Expand Down
2 changes: 1 addition & 1 deletion sql/mob_skills.sql
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ INSERT INTO `mob_skills` VALUES (620,364,'sweep',1,10.0,2000,1500,4,0,0,0,0,0,0)
INSERT INTO `mob_skills` VALUES (621,969,'snowball',2,11.0,2000,1500,4,0,0,0,0,0,0);
INSERT INTO `mob_skills` VALUES (622,366,'helldive',0,9.0,2000,1500,4,0,0,2,0,0,0);
INSERT INTO `mob_skills` VALUES (623,367,'wing_cutter',4,10.0,2000,1500,4,0,0,0,0,0,0);
-- INSERT INTO `mob_skills` VALUES (624,434,'vulture_1',0,7.0,2000,1500,4,0,0,0,0,0,0);
INSERT INTO `mob_skills` VALUES (624,434,'vulture_1',0,7.0,2000,0,1,0,0,0,0,0,0);
-- INSERT INTO `mob_skills` VALUES (625,436,'vulture_2',0,7.0,2000,1500,4,0,0,0,0,0,0);
-- INSERT INTO `mob_skills` VALUES (626,437,'vulture_3',0,7.0,2000,1500,4,0,0,0,0,0,0);
-- INSERT INTO `mob_skills` VALUES (627,438,'vulture_4',0,7.0,2000,1500,4,0,0,0,0,0,0);
Expand Down
6 changes: 0 additions & 6 deletions sql/mob_spell_lists.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1249,12 +1249,6 @@ INSERT INTO `mob_spell_lists` VALUES ('Deviator',113,195,1,255);
INSERT INTO `mob_spell_lists` VALUES ('Deviator',113,200,1,255);
INSERT INTO `mob_spell_lists` VALUES ('Deviator',113,226,1,255); -- might not have access to poisonga 2
INSERT INTO `mob_spell_lists` VALUES ('Deviator',113,274,1,255);
INSERT INTO `mob_spell_lists` VALUES ('Provoker',114,100,1,255);
INSERT INTO `mob_spell_lists` VALUES ('Provoker',114,101,1,255);
INSERT INTO `mob_spell_lists` VALUES ('Provoker',114,102,1,255);
INSERT INTO `mob_spell_lists` VALUES ('Provoker',114,103,1,255);
INSERT INTO `mob_spell_lists` VALUES ('Provoker',114,104,1,255);
INSERT INTO `mob_spell_lists` VALUES ('Provoker',114,105,1,255);
INSERT INTO `mob_spell_lists` VALUES ('Diabolos_Darkness_Named',115,254,1,255);
INSERT INTO `mob_spell_lists` VALUES ('Diabolos_Darkness_Named',115,231,1,255);
INSERT INTO `mob_spell_lists` VALUES ('Diabolos_Darkness_Named',115,245,1,255);
Expand Down

0 comments on commit f75d6ce

Please sign in to comment.