This repository has been archived by the owner on Dec 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/vahzl_provoker' into release
# Conflicts: # sql/mob_pools.sql
- Loading branch information
Showing
5 changed files
with
80 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters