forked from LandSandBoat/server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request LandSandBoat#6566 from cocosolos/drawin
Move Draw-In to Lua
- Loading branch information
Showing
80 changed files
with
1,012 additions
and
224 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
require('scripts/globals/mixins') | ||
|
||
g_mixins = g_mixins or {} | ||
|
||
g_mixins.draw_in = function(mobArg) | ||
mobArg:addListener('COMBAT_TICK', 'DRAW_IN_CHECK', function(mob) | ||
local target = mob:getTarget() | ||
if target then | ||
local drawInTable = | ||
{ | ||
conditions = | ||
{ | ||
mob:checkDistance(target) >= mob:getMeleeRange() * 2, | ||
}, | ||
position = mob:getPos(), | ||
} | ||
utils.drawIn(target, drawInTable) | ||
end | ||
end) | ||
end | ||
|
||
return g_mixins.draw_in |
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,23 @@ | ||
require('scripts/globals/mixins') | ||
|
||
g_mixins = g_mixins or {} | ||
|
||
g_mixins.mimic = function(mimicMob) | ||
mimicMob:addListener('COMBAT_TICK', 'DRAW_IN_CHECK', function(mob) | ||
local target = mob:getTarget() | ||
if target then | ||
local drawInTable = | ||
{ | ||
conditions = | ||
{ | ||
mob:checkDistance(target) >= mob:getMeleeRange(), | ||
}, | ||
position = mob:getPos(), | ||
offset = mob:getMeleeRange() - 0.2, | ||
} | ||
utils.drawIn(target, drawInTable) | ||
end | ||
end) | ||
end | ||
|
||
return g_mixins.mimic |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
----------------------------------- | ||
-- Area: Abyssea - Misareaux | ||
-- Mob: Athamas | ||
----------------------------------- | ||
---@type TMobEntity | ||
local entity = {} | ||
|
||
entity.onMobSkillTarget = function(target, mob, mobskill) | ||
if mobskill:isAoE() then | ||
for _, member in ipairs(target:getAlliance()) do | ||
mob:drawIn(member) | ||
end | ||
end | ||
end | ||
|
||
return entity |
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,21 @@ | ||
----------------------------------- | ||
-- Area: Apollyon NW | ||
-- NPC: Armoury Crate Mimic | ||
----------------------------------- | ||
---@type TMobEntity | ||
local entity = {} | ||
|
||
entity.onMobFight = function(mob, target) | ||
local distance = mob:checkDistance(target) | ||
local drawInTable = | ||
{ | ||
conditions = | ||
{ | ||
distance >= mob:getMeleeRange() and distance <= 20, | ||
}, | ||
position = mob:getPos(), | ||
} | ||
utils.drawIn(target, drawInTable) | ||
end | ||
|
||
return entity |
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
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
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,10 @@ | ||
----------------------------------- | ||
-- Area: Beadeaux | ||
-- NM: Mimic | ||
----------------------------------- | ||
mixins = { require('scripts/mixins/families/mimic') } | ||
----------------------------------- | ||
---@type TMobEntity | ||
local entity = {} | ||
|
||
return entity |
Oops, something went wrong.