Skip to content
This repository was archived by the owner on Apr 29, 2020. It is now read-only.
Open

Limbus #6253

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a05dbc3
Temenos
cocosolos Oct 20, 2019
a2bed75
Removed unnecessary mob despawning. Updated db to not spawn these mob…
cocosolos Oct 20, 2019
79b866d
Removed mislabeled chest from final-chest check
cocosolos Oct 20, 2019
37b07a9
Changed some function names and started cleanup of limbus.lua. Made s…
cocosolos Oct 21, 2019
2a877fa
Update renamed functions in Apollyon. Add entrance option to findBatt…
cocosolos Oct 21, 2019
f21ed47
Cleaned up all Temenos mob files. Moved IDs to ID file. Got rid of un…
cocosolos Oct 22, 2019
7770224
Randomize chest position in Temenos East floor 7. Fix typo.
cocosolos Oct 22, 2019
431501a
Fixed some wrong IDs causing miscolored chests
cocosolos Oct 22, 2019
8209633
Chests should despawn when Ultima is engaged
cocosolos Oct 22, 2019
9338d27
Added a server variable to keep track of time remaining for Scanning …
cocosolos Oct 22, 2019
4b65186
Change dontKick to int
cocosolos Oct 22, 2019
b039847
Removed the entrance option on a few functions since it's not being u…
cocosolos Oct 23, 2019
a314c65
Fix Scanning Device to show correct options. Renamed some variables t…
cocosolos Oct 24, 2019
e5fa54f
Start removal of limbus.isMobDead, replaced with npc:isDead for more …
cocosolos Oct 25, 2019
31c45d6
Randomize portal/chest trigger mobs where appropriate. Adjust mob/che…
cocosolos Oct 26, 2019
80be75a
Lots of Apollyon stuff. Apollyon and Temenos armoury crate rewrite. A…
cocosolos Nov 7, 2019
793493e
Wiki is wrong, chips are consumed not dimmed. Soap timer is set when …
cocosolos Nov 10, 2019
14f28bf
missing semicolon
cocosolos Nov 10, 2019
84cd746
Proto-Omega adjustments. Some clean-up.
cocosolos Nov 11, 2019
b3a959b
Fix issue with Apollyon entrance from AlTaieu. Disable draw-in for no…
cocosolos Nov 14, 2019
c5a21a4
Add correct NPCs for Temenos doors. Move Limbus time extension to its…
cocosolos Nov 18, 2019
61e18ab
Include and expand offset function
cocosolos Nov 18, 2019
996185f
Prevent Limbus mobs from auto linking/superlinking. Fix chest auto sp…
cocosolos Nov 22, 2019
e0ff6f8
Make Limbus zonetype. Adjust Temenos West crate spawn mechanics.
cocosolos Dec 9, 2019
0224b9e
Set damage immunities in Apollyon
cocosolos Dec 10, 2019
92a90b5
Added missing Apollyon portals to npc_list
cocosolos Dec 14, 2019
c9b43ea
missed saving a rename
cocosolos Dec 15, 2019
335a859
Mass renaming and armoury crate rework.
cocosolos Dec 20, 2019
1d8042f
moved gate stuff to global function
cocosolos Dec 22, 2019
915ee89
Temenos mob pathing refactor and cleanup
cocosolos Dec 27, 2019
6e2b58d
More pathing changes. Apollyon pathing added.
cocosolos Dec 31, 2019
33440f2
Citadel buster, nuclear waste and related abilities.
cocosolos Jan 30, 2020
703dfab
Resist check Nuclear Waste, temp fix Citadel Buster
cocosolos Feb 1, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/globals/battlefield.lua
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ function dsp.battlefield.HealPlayers(battlefield, players)
player:addHP(recoverHP)
player:addMP(recoverMP)
player:resetRecasts()
player:messageBasic(msgBasic.RECOVERS_HP_AND_MP, recoverHP, recoverMP)
player:messageBasic(msgBasic.ALL_ABILITIES_RECHARGED)
player:messageBasic(dsp.msg.basic.RECOVERS_HP_AND_MP, recoverHP, recoverMP)
player:messageBasic(dsp.msg.basic.ALL_ABILITIES_RECHARGED)
end
end
96 changes: 57 additions & 39 deletions scripts/globals/bcnm.lua

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions scripts/globals/effects/elemental_resistance_down.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-----------------------------------
--
-- dsp.effect.ELEMENTALRES_DOWN
--
-----------------------------------
require("scripts/globals/status")
-----------------------------------

function onEffectGain(target,effect)
target:addMod(dsp.mod.FIRERES, -effect:getPower())
target:addMod(dsp.mod.ICERES, -effect:getPower())
target:addMod(dsp.mod.WINDRES, -effect:getPower())
target:addMod(dsp.mod.EARTHRES, -effect:getPower())
target:addMod(dsp.mod.THUNDERRES, -effect:getPower())
target:addMod(dsp.mod.WATERRES, -effect:getPower())
target:addMod(dsp.mod.LIGHTRES, -effect:getPower())
target:addMod(dsp.mod.DARKRES, -effect:getPower())
end

function onEffectTick(target,effect)
end


function onEffectLose(target,effect)
target:delMod(dsp.mod.FIRERES, -effect:getPower())
target:delMod(dsp.mod.ICERES, -effect:getPower())
target:delMod(dsp.mod.WINDRES, -effect:getPower())
target:delMod(dsp.mod.EARTHRES, -effect:getPower())
target:delMod(dsp.mod.THUNDERRES, -effect:getPower())
target:delMod(dsp.mod.WATERRES, -effect:getPower())
target:delMod(dsp.mod.LIGHTRES, -effect:getPower())
target:delMod(dsp.mod.DARKRES, -effect:getPower())
end
1,180 changes: 353 additions & 827 deletions scripts/globals/limbus.lua

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion scripts/globals/mobskills/antimatter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ function onMobSkillCheck(target,mob,skill)
local phase = mob:getLocalVar("battlePhase")

if ((skillList == 729 and phase < 4) or (skillList == 728 and mobhp < 20)) then
return 0
if mob:getLocalVar("nuclearWaste") == 0 then
return 0
end
end

return 1
Expand Down
4 changes: 3 additions & 1 deletion scripts/globals/mobskills/armor_buster.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ function onMobSkillCheck(target,mob,skill)
local phase = mob:getLocalVar("battlePhase")

if (phase >= 3) then -- only proto-ultima has the var at a value other than 0. Note that the phase values range from 0-4 for the five phases.
return 0
if mob:getLocalVar("nuclearWaste") == 0 and mob:getLocalVar("citadelBuster") == 0 then
return 0
end
end
return 1
end
Expand Down
6 changes: 4 additions & 2 deletions scripts/globals/mobskills/chemical_bomb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ function onMobSkillCheck(target, mob, skill)
local mobhp = mob:getHPP()
local phase = mob:getLocalVar("battlePhase")

if (skillList == 729 and phase < 3) or (skillList == 728 and mobhp >= 70 or mobhp < 40) then
return 0
if (skillList == 729 and phase < 2) or (skillList == 728 and (mobhp >= 70 or mobhp < 40)) then
if mob:getLocalVar("nuclearWaste") == 0 then
return 0
end
end

return 1
Expand Down
89 changes: 89 additions & 0 deletions scripts/globals/mobskills/citadel_buster.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---------------------------------------------
-- Citadel Buster
-- Deals extreme Light damage to players in an area of effect.
-- Additional effect: Enmity reset
-- Damage can be approximated based on Calculating Weapon Skill Damage as a magical WS with a level of 85, fTP of 6 and MAB of 4.0. Or, more simply:
-- 2088/(1+MDB%) * (256-MDT)/256 (no day/weather bonus)
-- 2608/MDB * (256-MDT)/256 (weather bonus)
-- 2816/MDB * (256-MDT)/256 (day+weather bonus)
---------------------------------------------
require("scripts/globals/monstertpmoves")
require("scripts/globals/settings")
require("scripts/globals/status")
require("scripts/globals/weather")
local ID = require("scripts/zones/Temenos/IDs")

---------------------------------------------

function onMobSkillCheck(target,mob,skill)
local phase = mob:getLocalVar("battlePhase")
if (phase == 4) then
mob:setLocalVar("citadelBuster", 1)
mob:SetMobAbilityEnabled(false)
mob:SetMagicCastingEnabled(false)
mob:SetAutoAttackEnabled(false)
mob:setMobMod(dsp.mobMod.DRAW_IN, 1)
local battlefield = mob:getBattlefield()
local players = battlefield:getPlayers()
for _, member in pairs(players) do
member:messageSpecial(ID.text.CITADEL_BASE)
Copy link
Member

@TeoTwawki TeoTwawki Jan 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly zero of this belongs in the skillcheck, and should happen before the mob is even trying to activate the skill instead. Then when your countdown is over, force call the skill via the function we have for that purpose.

worry about it another day in a future pr I guess. I would still try and cut down on that left/right scrolling nested timer set though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure where/how to move this without needing to manually set when to use the skill. It should be used randomly like any other tp move, but pulling these messages out of the skillcheck means I would need to manually call that at a certain hp percent or rely on random, which ends up just basically proccing over and over.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could move it to the mobs script under onMobWeaponskill(mob, target, skill) I believe, then make it do the messages if skill = c. Buster

Copy link
Contributor Author

@cocosolos cocosolos Feb 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with that is onMobWeaponskill executes after the skill charging animation starts. The skill check is the only place with lua access between the ai picking which skill to use and the start of the charge animation.

end
mob:timer(10000, function(mob)
for _, member in pairs(players) do
member:messageSpecial(ID.text.CITADEL_BASE+1)
end
mob:timer(10000, function(mob)
for _, member in pairs(players) do
member:messageSpecial(ID.text.CITADEL_BASE+2)
end
mob:timer(5000, function(mob)
for _, member in pairs(players) do
member:messageSpecial(ID.text.CITADEL_BASE+3)
end
mob:timer(1000, function(mob)
for _, member in pairs(players) do
member:messageSpecial(ID.text.CITADEL_BASE+4)
end
mob:timer(1000, function(mob)
for _, member in pairs(players) do
member:messageSpecial(ID.text.CITADEL_BASE+5)
end
mob:timer(1000, function(mob)
for _, member in pairs(players) do
member:messageSpecial(ID.text.CITADEL_BASE+6)
end
mob:timer(1000, function(mob)
for _, member in pairs(players) do
member:messageSpecial(ID.text.CITADEL_BASE+7)
end
mob:timer(1000, function(mob)
mob:useMobAbility(1540)
mob:timer(500, function(mob)
mob:setLocalVar("citadelBuster", 0)
mob:SetMagicCastingEnabled(true)
mob:SetAutoAttackEnabled(true)
mob:SetMobAbilityEnabled(true)
mob:setMobMod(dsp.mobMod.DRAW_IN, 0)
end)
end)
end)
end)
end)
end)
end)
end)
end)
end
return 1
end

function onMobWeaponSkill(target, mob, skill)
local basedmg = 2088
if mob:getWeather() == dsp.weather.AURORAS or mob:getWeather() == dsp.weather.STELLAR_GLARE then basedmg = basedmg + 520 end
if VanadielDayElement() == dsp.day.LIGHTSDAY then basedmg = basedmg + 208 end
local damage = basedmg/(1+(target:getMod(dsp.mod.MDEF)/100))
local dmg = MobFinalAdjustments(damage,mob,skill,target,dsp.attackType.MAGICAL,dsp.damageType.LIGHT,MOBPARAM_IGNORE_SHADOWS)
target:takeDamage(dmg, mob, dsp.attackType.MAGICAL, dsp.damageType.LIGHT)
mob:resetEnmity(target)
return dmg
end
7 changes: 5 additions & 2 deletions scripts/globals/mobskills/cryo_jet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function onMobSkillCheck(target,mob,skill)
local mobhp = mob:getHPP()
local phase = mob:getLocalVar("battlePhase")

if ((skillList == 729 and phase >= 1 and phase <= 2) or (skillList == 728 and mobhp < 70 and mobhp >= 40)) then
if mob:getLocalVar("nuclearWaste") == 1 then
return 0
end

Expand All @@ -35,6 +35,9 @@ function onMobWeaponSkill(target, mob, skill)
local dmg = MobFinalAdjustments(info.dmg,mob,skill,target,dsp.attackType.MAGICAL,dsp.damageType.ICE,MOBPARAM_IGNORE_SHADOWS)

target:takeDamage(dmg, mob, dsp.attackType.MAGICAL, dsp.damageType.ICE)

if target:hasStatusEffect(dsp.effect.ELEMENTALRES_DOWN) then
target:delStatusEffectSilent(dsp.effect.ELEMENTALRES_DOWN)
end
mob:setLocalVar("nuclearWaste", 0)
return dmg
end
4 changes: 3 additions & 1 deletion scripts/globals/mobskills/energy_screen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ require("scripts/globals/status")
function onMobSkillCheck(target,mob,skill)
local phase = mob:getLocalVar("battlePhase")
if (phase >= 3) then
return 0
if mob:getLocalVar("nuclearWaste") == 0 and mob:getLocalVar("citadelBuster") == 0 then
return 0
end
end
return 1
end
Expand Down
4 changes: 3 additions & 1 deletion scripts/globals/mobskills/equalizer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ function onMobSkillCheck(target,mob,skill)
local phase = mob:getLocalVar("battlePhase")

if ((skillList == 729 and phase >= 2 and phase <= 3) or (mobhp < 40 and mobhp > 20 and skillList == 728)) then
return 0
if mob:getLocalVar("nuclearWaste") == 0 then
return 0
end
end

return 1
Expand Down
6 changes: 5 additions & 1 deletion scripts/globals/mobskills/flame_thrower.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function onMobSkillCheck(target,mob,skill)
local mobhp = mob:getHPP()
local phase = mob:getLocalVar("battlePhase")

if ((skillList == 729 and phase >= 1 and phase <= 2) or (skillList == 728 and mobhp < 70 and mobhp >= 40)) then
if mob:getLocalVar("nuclearWaste") == 1 then
return 0
end

Expand All @@ -33,5 +33,9 @@ function onMobWeaponSkill(target, mob, skill)
local dmg = MobFinalAdjustments(info.dmg,mob,skill,target,dsp.attackType.MAGICAL,dsp.damageType.FIRE,MOBPARAM_IGNORE_SHADOWS)

target:takeDamage(dmg, mob, dsp.attackType.MAGICAL, dsp.damageType.FIRE)
if target:hasStatusEffect(dsp.effect.ELEMENTALRES_DOWN) then
target:delStatusEffectSilent(dsp.effect.ELEMENTALRES_DOWN)
end
mob:setLocalVar("nuclearWaste", 0)
return dmg
end
6 changes: 5 additions & 1 deletion scripts/globals/mobskills/high-tension_discharger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function onMobSkillCheck(target,mob,skill)
local mobhp = mob:getHPP()
local phase = mob:getLocalVar("battlePhase")

if ((skillList == 729 and phase >= 1 and phase <= 2) or (skillList == 728 and mobhp < 70 and mobhp >= 40)) then
if mob:getLocalVar("nuclearWaste") == 1 then
return 0
end

Expand All @@ -34,5 +34,9 @@ function onMobWeaponSkill(target, mob, skill)
local dmg = MobFinalAdjustments(info.dmg,mob,skill,target,dsp.attackType.MAGICAL,dsp.damageType.LIGHTNING,MOBPARAM_IGNORE_SHADOWS)

target:takeDamage(dmg, mob, dsp.attackType.MAGICAL, dsp.damageType.LIGHTNING)
if target:hasStatusEffect(dsp.effect.ELEMENTALRES_DOWN) then
target:delStatusEffectSilent(dsp.effect.ELEMENTALRES_DOWN)
end
mob:setLocalVar("nuclearWaste", 0)
return dmg
end
6 changes: 5 additions & 1 deletion scripts/globals/mobskills/hydro_canon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function onMobSkillCheck(target,mob,skill)
local mobhp = mob:getHPP()
local phase = mob:getLocalVar("battlePhase")

if ((skillList == 729 and phase >= 1 and phase <= 2) or (skillList == 728 and mobhp < 70 and mobhp >= 40)) then
if mob:getLocalVar("nuclearWaste") == 1 then
return 0
end

Expand All @@ -36,5 +36,9 @@ function onMobWeaponSkill(target, mob, skill)
local dmg = MobFinalAdjustments(info.dmg,mob,skill,target,dsp.attackType.MAGICAL,dsp.damageType.WATER,MOBPARAM_IGNORE_SHADOWS)

target:takeDamage(dmg, mob, dsp.attackType.MAGICAL, dsp.damageType.WATER)
if target:hasStatusEffect(dsp.effect.ELEMENTALRES_DOWN) then
target:delStatusEffectSilent(dsp.effect.ELEMENTALRES_DOWN)
end
mob:setLocalVar("nuclearWaste", 0)
return dmg
end
5 changes: 4 additions & 1 deletion scripts/globals/mobskills/hyper_pulse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ require("scripts/globals/status")
---------------------------------------------

function onMobSkillCheck(target,mob,skill)
if (mob:AnimationSub() <= 1) then -- proto omega bipedform
local currentForm = mob:getLocalVar("form")
local skillList = mob:getMobMod(dsp.mobMod.SKILL_LIST)

if (mob:AnimationSub() == 2 and currentForm == 1) or skillList == 54 then -- proto-omega bipedform
return 0
end
return 1
Expand Down
4 changes: 3 additions & 1 deletion scripts/globals/mobskills/mana_screen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ require("scripts/globals/status")
function onMobSkillCheck(target,mob,skill)
local phase = mob:getLocalVar("battlePhase")
if (phase >= 3) then
return 0
if mob:getLocalVar("nuclearWaste") == 0 and mob:getLocalVar("citadelBuster") == 0 then
return 0
end
end
return 1
end
Expand Down
40 changes: 40 additions & 0 deletions scripts/globals/mobskills/nuclear_waste.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---------------------------------------------------
-- Nuclear Waste
-- Description: Reduces elemental resistances by 50 to players in range.
---------------------------------------------------
require("scripts/globals/settings")
require("scripts/globals/status")
require("scripts/globals/monstertpmoves")

---------------------------------------------------

function onMobSkillCheck(target,mob,skill)
-- skillList 54 = Omega
-- skillList 727 = Proto-Omega
-- skillList 728 = Ultima
-- skillList 729 = Proto-Ultima
local skillList = mob:getMobMod(dsp.mobMod.SKILL_LIST)
local mobhp = mob:getHPP()
local phase = mob:getLocalVar("battlePhase")

if ((skillList == 729 and phase >= 1 and phase <= 2) or (skillList == 728 and mobhp < 70 and mobhp >= 40)) then
if mob:getLocalVar("nuclearWaste") == 0 then
return 0
end
end

return 1
end

function onMobWeaponSkill(target, mob, skill)
mob:setLocalVar("nuclearWaste", 1)
local typeEffect = dsp.effect.ELEMENTALRES_DOWN
local resist = applyPlayerResistance(mob,typeEffect,target,mob:getStat(dsp.mod.INT)-target:getStat(dsp.mod.INT),0,0);
if (resist >= 0.25) then
target:addStatusEffectEx(typeEffect, 0, 50, 0, 60)
skill:setMsg(dsp.msg.basic.NONE)
else
skill:setMsg(dsp.msg.basic.SKILL_MISS)
end
return typeEffect
end
13 changes: 4 additions & 9 deletions scripts/globals/mobskills/pile_pitch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,12 @@ function onMobSkillCheck(target,mob,skill)
end

function onMobWeaponSkill(target, mob, skill)
local targetCurrentHP = target:getHP()
local hpset = target:getMaxHP() * 0.05
local currentHP = target:getHP()
local damage = currentHP * .90
local typeEffect = dsp.effect.BIND
local dmg = MobFinalAdjustments(damage,mob,skill,target,dsp.attackType.MAGICAL,dsp.damageType.NONE,MOBPARAM_IGNORE_SHADOWS)
MobStatusEffectMove(mob, target, typeEffect, 1, 0, 30)

if (targetCurrentHP > hpset) then
dmg = targetCurrentHP - hpset
else
dmg = 0
end

target:takeDamage(dmg, mob, dsp.attackType.MAGICAL, dsp.damageType.NONE)
mob:resetEnmity(target)
return dmg
end
29 changes: 29 additions & 0 deletions scripts/globals/mobskills/pod_ejection.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---------------------------------------------
-- Pod Ejection
---------------------------------------------

function onMobSkillCheck(target,mob,skill)
local pod = GetMobByID(mob:getID() + 1)
local currentForm = mob:getLocalVar("form")

if not pod:isSpawned() and currentForm == 2 then -- proto-omega final form
return 0
end
return 1
end

function onMobWeaponSkill(target, mob, skill)
local battlefield = mob:getBattlefield()
local pod = GetMobByID(mob:getID() + 1)
if battlefield and not pod:isSpawned() then
local players = battlefield:getPlayers()
local random = math.random(1, #players)
local X = mob:getXPos()
local Y = mob:getYPos()
local Z = mob:getZPos()
pod:spawn()
pod:setPos(X,Y,Z)
pod:updateEnmity(players[random])
end
return 0
end
Loading