diff --git a/scripts/actions/mobskills/boreas_mantle.lua b/scripts/actions/mobskills/boreas_mantle.lua new file mode 100644 index 00000000000..9235a15475d --- /dev/null +++ b/scripts/actions/mobskills/boreas_mantle.lua @@ -0,0 +1,48 @@ +----------------------------------- +-- Boreas Mantle +-- Description: Spawns 4 clones of itself that disappear after 30 seconds +-- Used only by Phantom Puk +----------------------------------- +---@type TMobSkill +local mobskillObject = {} + +mobskillObject.onMobSkillCheck = function(target, mob, skill) + return 0 +end + +mobskillObject.onMobWeaponSkill = function(target, mob, skill) + local mobID = mob:getID() + local player = mob:getTarget() + local clonehp = 500 + local hpp = mob:getHPP() / 100.0 + local maxhp = math.ceil(clonehp / hpp) + for cloneID = mobID + 1, mobID + 4 do + local clone = SpawnMob(cloneID) + if clone then + clone:setMaxHP(maxhp) + clone:setHP(clonehp) + if player then + clone:updateEnmity(player) + end + + clone:setPos(mob:getXPos(), mob:getYPos(), mob:getZPos()) + end + end + + mob:timer(30000, function(mobArg) + for cloneID = mobID + 1, mobID + 4 do + local clone = GetMobByID(cloneID) + if clone then + local action = clone:getCurrentAction() + if action ~= xi.act.NONE and action ~= xi.act.DEATH then + DespawnMob(cloneID) + end + end + end + end) + + skill:setMsg(xi.msg.basic.NONE) + return 0 +end + +return mobskillObject diff --git a/scripts/battlefields/Jade_Sepulcher/Shadows_of_the_Mind.lua b/scripts/battlefields/Jade_Sepulcher/Shadows_of_the_Mind.lua new file mode 100644 index 00000000000..c1d7bb9e72f --- /dev/null +++ b/scripts/battlefields/Jade_Sepulcher/Shadows_of_the_Mind.lua @@ -0,0 +1,100 @@ +----------------------------------- +-- Shadows of the Mind +-- Jade Sepulcher, Confidential Imperial Order +-- !addkeyitem SECRET_IMPERIAL_ORDER +----------------------------------- +local ID = zones[xi.zone.JADE_SEPULCHER] +----------------------------------- + +local content = Battlefield:new({ + zoneId = xi.zone.JADE_SEPULCHER, + battlefieldId = xi.battlefield.id.SHADOWS_OF_THE_MIND, + maxPlayers = 6, + levelCap = 75, + timeLimit = utils.minutes(30), + index = 1, + entryNpc = '_1v0', + exitNpcs = { '_1v1', '_1v2', '_1v3' }, + requiredKeyItems = { xi.ki.SECRET_IMPERIAL_ORDER, message = ID.text.IMPERIAL_ORDER_BREAKS }, +}) + +content.groups = { + { + mobs = { 'Phantom_Puk' }, + allDeath = utils.bind(content.handleAllMonstersDefeated, content), + }, + + { + mobs = { 'Phantom_Puk_Clone' }, + spawned = false, + }, +} + +content.loot = +{ + { + { item = xi.item.GIL, weight = xi.loot.weight.NORMAL, amount = 12000 }, + }, + + { + { item = xi.item.CHARISMA_POTION, weight = xi.loot.weight.NORMAL }, + { item = xi.item.ICARUS_WING, weight = xi.loot.weight.NORMAL }, + { item = xi.item.INTELLIGENCE_POTION, weight = xi.loot.weight.NORMAL }, + { item = xi.item.MIND_POTION, weight = xi.loot.weight.NORMAL }, + }, + + { + { item = xi.item.BOTTLE_OF_SIEGLINDE_PUTTY, weight = xi.loot.weight.NORMAL }, + { item = xi.item.BRASS_TANK, weight = xi.loot.weight.NORMAL }, + { item = xi.item.MERROW_SCALE, weight = xi.loot.weight.NORMAL }, + { item = xi.item.AHRIMAN_WING, weight = xi.loot.weight.NORMAL }, + }, + + { + { item = xi.item.SCROLL_OF_ERASE, weight = xi.loot.weight.HIGH }, + { item = xi.item.SCROLL_OF_PROTECTRA_IV, weight = xi.loot.weight.HIGH }, + { item = xi.item.SCROLL_OF_BLIZZARD_IV, weight = xi.loot.weight.NORMAL }, + { item = xi.item.SCROLL_OF_DISPEL, weight = xi.loot.weight.NORMAL }, + { item = xi.item.SCROLL_OF_PROTECT_IV, weight = xi.loot.weight.NORMAL }, + { item = xi.item.SCROLL_OF_QUAKE, weight = xi.loot.weight.NORMAL }, + { item = xi.item.SCROLL_OF_RERAISE_III, weight = xi.loot.weight.NORMAL }, + { item = xi.item.SCROLL_OF_WATER_IV, weight = xi.loot.weight.NORMAL }, + }, + + { + { item = xi.item.CHOCOBO_EGG_SOMEWHAT_WARM, weight = xi.loot.weight.NORMAL }, + }, + + { + { item = xi.item.PUK_WING, weight = xi.loot.weight.NORMAL }, + }, + + { + { item = xi.item.NONE, weight = xi.loot.weight.EXTREMELY_HIGH }, + { item = xi.item.COMPANY_FLEURET, weight = xi.loot.weight.LOW }, + { item = xi.item.MAGNET_KNIFE, weight = xi.loot.weight.LOW }, + { item = xi.item.SACRIFICE_TORQUE, weight = xi.loot.weight.LOW }, + { item = xi.item.TOURNAMENT_LANCE, weight = xi.loot.weight.LOW }, + }, + + { + { item = xi.item.NONE, weight = xi.loot.weight.EXTREMELY_HIGH }, + { item = xi.item.PIECE_OF_HABU_SKIN, weight = xi.loot.weight.NORMAL }, + { item = xi.item.SQUARE_OF_RAINBOW_CLOTH, weight = xi.loot.weight.NORMAL }, + { item = xi.item.BUFFALO_HORN, weight = xi.loot.weight.LOW }, + { item = xi.item.SQUARE_OF_WAMOURA_CLOTH, weight = xi.loot.weight.LOW }, + { item = xi.item.SQUARE_OF_RED_GRASS_CLOTH, weight = xi.loot.weight.VERY_LOW }, + { item = xi.item.SQUARE_OF_KARAKUL_CLOTH, weight = xi.loot.weight.VERY_LOW }, + { item = xi.item.SQUARE_OF_RAXA, weight = xi.loot.weight.VERY_LOW }, + { item = xi.item.POT_OF_URUSHI, weight = xi.loot.weight.VERY_LOW }, + }, + + { + { item = xi.item.BEHEMOTH_HORN, weight = xi.loot.weight.NORMAL }, + { item = xi.item.DRAGON_TALON, weight = xi.loot.weight.NORMAL }, + { item = xi.item.CHUNK_OF_KHROMA_ORE, weight = xi.loot.weight.NORMAL }, + { item = xi.item.CHUNK_OF_LUMINIUM_ORE, weight = xi.loot.weight.NORMAL }, + }, +} + +return content:register() diff --git a/scripts/battlefields/Jade_Sepulcher/making_a_mockery.lua b/scripts/battlefields/Jade_Sepulcher/making_a_mockery.lua index 9bbc00376e3..8afed5aec58 100644 --- a/scripts/battlefields/Jade_Sepulcher/making_a_mockery.lua +++ b/scripts/battlefields/Jade_Sepulcher/making_a_mockery.lua @@ -15,13 +15,17 @@ local content = Battlefield:new({ index = 0, entryNpc = '_1v0', exitNpcs = { '_1v1', '_1v2', '_1v3' }, - requiredKeyItems = { xi.ki.CONFIDENTIAL_IMPERIAL_ORDER, message = ID.text.ORDER_BREAKS }, + requiredKeyItems = { xi.ki.CONFIDENTIAL_IMPERIAL_ORDER, message = ID.text.IMPERIAL_ORDER_BREAKS }, }) content:addEssentialMobs({ 'Mocking_Colibri' }) content.loot = { + { + { item = xi.item.GIL, weight = xi.loot.weight.NORMAL, amount = 8000 }, + }, + { { item = xi.item.AGILITY_POTION, weight = xi.loot.weight.NORMAL }, { item = xi.item.VITALITY_POTION, weight = xi.loot.weight.NORMAL }, diff --git a/scripts/enum/item.lua b/scripts/enum/item.lua index af01cf288b9..1f8dc650bcb 100644 --- a/scripts/enum/item.lua +++ b/scripts/enum/item.lua @@ -418,6 +418,7 @@ xi.item = CHICKEN_BONE = 898, VENOMOUS_CLAW = 901, DEMON_HORN = 902, + DRAGON_TALON = 903, SET_OF_GIANT_FISH_BONES = 904, WYVERN_SKULL = 905, STARMITE_SHELL = 906, @@ -886,6 +887,7 @@ xi.item = CHUNK_OF_KOPPARNICKEL_ORE = 1650, BOTTLE_OF_RICE_VINEGAR = 1652, IGNEOUS_ROCK = 1654, + BRASS_TANK = 1656, SPOOL_OF_BUNDLING_TWINE = 1657, SEALION_CREST_KEY = 1658, CORAL_CREST_KEY = 1659, @@ -937,6 +939,7 @@ xi.item = PIECE_OF_CASSIA_LUMBER = 1762, POT_OF_VIRIDIAN_URUSHI = 1763, SQUARE_OF_KEJUSU_SATIN = 1764, + PIECE_OF_HABU_SKIN = 1765, SQUARE_OF_ELTORO_LEATHER = 1767, SQUARE_OF_GALATEIA = 1769, DRAGON_BONE = 1771, @@ -977,6 +980,7 @@ xi.item = AIR_TANK = 1878, POT_OF_CLUSTERED_TAR = 1880, PONZE_OF_SHELL_POWDER = 1883, + BOTTLE_OF_SIEGLINDE_PUTTY = 1886, GLASS_SHEET = 1887, SACK_OF_SILICA = 1888, VIAL_OF_FRESH_BLOOD = 1898, @@ -2314,6 +2318,7 @@ xi.item = SCROLL_OF_DIAGA = 4641, SCROLL_OF_BANISHGA = 4646, SCROLL_OF_PROTECT = 4651, + SCROLL_OF_PROTECT_IV = 4654, SCROLL_OF_PROTECT_V = 4655, SCROLL_OF_SHELL = 4656, SCROLL_OF_SHELL_IV = 4659, @@ -2339,16 +2344,19 @@ xi.item = SCROLL_OF_TELEPORT_HOLLA = 4730, SCROLL_OF_TELEPORT_DEM = 4731, SCROLL_OF_TELEPORT_MEA = 4732, + SCROLL_OF_PROTECTRA_IV = 4736, SCROLL_OF_INVISIBLE = 4744, SCROLL_OF_SNEAK = 4745, SCROLL_OF_DEODORIZE = 4746, SCROLL_OF_TELEPORT_VAHZL = 4747, SCROLL_OF_RAISE_III = 4748, SCROLL_OF_RERAISE_II = 4749, + SCROLL_OF_RERAISE_III = 4750, SCROLL_OF_ERASE = 4751, SCROLL_OF_FIRE = 4752, SCROLL_OF_FIRE_II = 4753, SCROLL_OF_BLIZZARD = 4757, + SCROLL_OF_BLIZZARD_IV = 4760, SCROLL_OF_AERO = 4762, SCROLL_OF_AERO_IV = 4765, SCROLL_OF_AERO_V = 4766, @@ -2358,6 +2366,7 @@ xi.item = SCROLL_OF_THUNDER = 4772, SCROLL_OF_THUNDER_III = 4774, SCROLL_OF_WATER = 4777, + SCROLL_OF_WATER_IV = 4780, SCROLL_OF_WATER_V = 4781, SCROLL_OF_FLARE = 4812, SCROLL_OF_FREEZE = 4814, @@ -5393,6 +5402,7 @@ xi.item = FORTIFIED_CHAIN = 15524, GRANDIOSE_CHAIN = 15525, REGEN_COLLAR = 15526, + SACRIFICE_TORQUE = 15528, CHOCOBO_WHISTLE = 15533, OROCHI_NODOWA = 15539, HOMING_RING = 15541, @@ -6212,6 +6222,7 @@ xi.item = MACUAHUITL_M1 = 17716, IMMORTALS_SCIMITAR = 17717, LEECH_SCIMITAR = 17718, + COMPANY_FLEURET = 17720, SANGUINE_SWORD = 17721, SINGH_KILIJ = 17723, HAUTECLAIRE = 17738, @@ -6305,6 +6316,7 @@ xi.item = BLAU_DOLCH = 18015, ODOROUS_KNIFE_P1 = 18016, KHANJAR = 18025, + MAGNET_KNIFE = 18026, DANCING_DAGGER = 18034, WEBCUTTER = 18040, A_LOUTRANCE = 18041, @@ -6332,6 +6344,7 @@ xi.item = PITCHFORK_P1 = 18103, PUK_LANCE = 18112, IMPERIAL_NEZA = 18113, + TOURNAMENT_LANCE = 18114, RADIANT_LANCE = 18120, VALKYRIES_FORK = 18121, SKYSTRIDER = 18128, diff --git a/scripts/enum/mob_skills.lua b/scripts/enum/mob_skills.lua index d63a27a9a79..a773080a784 100644 --- a/scripts/enum/mob_skills.lua +++ b/scripts/enum/mob_skills.lua @@ -65,6 +65,7 @@ xi.mobSkill = RANGED_ATTACK_15 = 1949, ECLOSION = 1970, + BOREAS_MANTLE = 1980, ROAR_3 = 2406, diff --git a/scripts/specs/core/CBaseEntity.lua b/scripts/specs/core/CBaseEntity.lua index 794a0530338..405e24ee76d 100644 --- a/scripts/specs/core/CBaseEntity.lua +++ b/scripts/specs/core/CBaseEntity.lua @@ -1918,6 +1918,11 @@ end function CBaseEntity:setHP(value) end +---@param value integer +---@return nil +function CBaseEntity:setMaxHP(value) +end + ---@param restoreAmt integer ---@return integer function CBaseEntity:restoreHP(restoreAmt) diff --git a/scripts/zones/Jade_Sepulcher/IDs.lua b/scripts/zones/Jade_Sepulcher/IDs.lua index 99639a1f49a..82c2cdce1bc 100644 --- a/scripts/zones/Jade_Sepulcher/IDs.lua +++ b/scripts/zones/Jade_Sepulcher/IDs.lua @@ -27,6 +27,7 @@ zones[xi.zone.JADE_SEPULCHER] = A_CRACK_HAS_FORMED = 7639, -- A crack has formed on the , and the beast inside has been unleashed! PARTY_MEMBERS_HAVE_FALLEN = 7673, -- All party members have fallen in battle. Now leaving the battlefield. THE_PARTY_WILL_BE_REMOVED = 7680, -- If all party members' HP are still zero after # minute[/s], the party will be removed from the battlefield. + IMPERIAL_ORDER_BREAKS = 7688, -- The breaks! ENTERING_THE_BATTLEFIELD_FOR = 7701, -- Entering the battlefield for [Making a Mockery/Shadows of the Mind/The Beast Within/Moment of Truth/Puppet in Peril/Puppet in Peril/Tateeya's Worries]! }, mob = diff --git a/scripts/zones/Jade_Sepulcher/mobs/Phantom_Puk.lua b/scripts/zones/Jade_Sepulcher/mobs/Phantom_Puk.lua new file mode 100644 index 00000000000..d3d05e3f899 --- /dev/null +++ b/scripts/zones/Jade_Sepulcher/mobs/Phantom_Puk.lua @@ -0,0 +1,46 @@ +----------------------------------- +-- Area: Jade Sepulcher +-- NM: Phantom Puk +----------------------------------- +mixins = { require('scripts/mixins/families/puk') } +----------------------------------- +local entity = {} + +entity.onMobInitialize = function(mob) +end + +entity.onMobSpawn = function(mob) + mob:addImmunity(xi.immunity.GRAVITY) + mob:addImmunity(xi.immunity.SILENCE) + mob:addImmunity(xi.immunity.REQUIEM) + mob:addImmunity(xi.immunity.DARK_SLEEP) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) + mob:addImmunity(xi.immunity.PETRIFY) +end + +entity.onMobEngage = function(mob, target) + mob:setLocalVar('boreas_mantle', os.time() + math.random(15, 45)) +end + +entity.onMobFight = function(mob, target) + local now = os.time() + if mob:getLocalVar('boreas_mantle') <= now then + mob:useMobAbility(xi.mobSkill.BOREAS_MANTLE, mob) + mob:setLocalVar('boreas_mantle', now + math.random(60, 90)) + end +end + +entity.onMobDeath = function(mob, player, optParams) + local mobID = mob:getID() + for cloneID = mobID + 1, mobID + 4 do + local clone = GetMobByID(cloneID) + if clone then + local action = clone:getCurrentAction() + if action ~= xi.act.NONE and action ~= xi.act.DEATH then + DespawnMob(cloneID) + end + end + end +end + +return entity diff --git a/scripts/zones/Jade_Sepulcher/mobs/Phantom_Puk_Clone.lua b/scripts/zones/Jade_Sepulcher/mobs/Phantom_Puk_Clone.lua new file mode 100644 index 00000000000..97d05b65f2e --- /dev/null +++ b/scripts/zones/Jade_Sepulcher/mobs/Phantom_Puk_Clone.lua @@ -0,0 +1,18 @@ +----------------------------------- +-- Area: Jade Sepulcher +-- NM: Phantom Puk (Clone) +----------------------------------- +mixins = { require('scripts/mixins/families/puk') } +----------------------------------- +local entity = {} + +entity.onMobSpawn = function(mob) + mob:addStatusEffect(xi.effect.BLINK, 3, 0, 180) + mob:setMod(xi.mod.DMG, 20000) + mob:setMod(xi.mod.HP, 0) +end + +entity.onMobDeath = function(mob, player, optParams) +end + +return entity diff --git a/sql/mob_groups.sql b/sql/mob_groups.sql index b73a5dd954f..7c3ca1fb4ec 100644 --- a/sql/mob_groups.sql +++ b/sql/mob_groups.sql @@ -3256,7 +3256,7 @@ INSERT INTO `mob_groups` VALUES (39,3060,66,'Orochi',0,128,0,25000,0,80,82,0); -- ------------------------------------------------------------ INSERT INTO `mob_groups` VALUES (1,2712,67,'Mocking_Colibri',0,128,0,8000,0,66,66,0); -INSERT INTO `mob_groups` VALUES (2,3128,67,'Phantom_Puk',0,128,0,0,0,75,75,0); +INSERT INTO `mob_groups` VALUES (2,3128,67,'Phantom_Puk',0,128,0,14000,0,76,76,0); INSERT INTO `mob_groups` VALUES (3,3327,67,'Raubahn',0,128,0,0,0,75,75,0); INSERT INTO `mob_groups` VALUES (4,3567,67,'Shadowhand_Kajeel_Ja',0,128,0,0,0,75,75,0); INSERT INTO `mob_groups` VALUES (5,430,67,'Blacktattoo_Vedool_Ja',0,128,0,0,0,75,75,0); diff --git a/sql/mob_pools.sql b/sql/mob_pools.sql index 2578f0ca4d6..19257b1cc20 100644 --- a/sql/mob_pools.sql +++ b/sql/mob_pools.sql @@ -3181,7 +3181,7 @@ INSERT INTO `mob_pools` VALUES (3124,'Pey','Pey',227,0x00003C0200000000000000000 INSERT INTO `mob_pools` VALUES (3125,'Phanduron_the_Condemned','Phanduron_the_Condemned',221,0x00001A0200000000000000000000000000000000,4,1,3,360,100,0,1,0,1,2,24,32,0,157,0,0,2,0,0,221,221); INSERT INTO `mob_pools` VALUES (3126,'Phantasmal_Puk','Phantasmal_Puk',198,0x0000D00600000000000000000000000000000000,1,1,7,200,100,0,1,0,1,0,0,0,7,131,0,0,0,0,0,198,198); INSERT INTO `mob_pools` VALUES (3127,'Phantom','Phantom',121,0x0000700100000000000000000000000000000000,4,4,12,240,100,0,1,0,0,0,0,0,298,131,16,0,28,0,0,121,121); -INSERT INTO `mob_pools` VALUES (3128,'Phantom_Puk','Phantom_Puk',198,0x0000D00600000000000000000000000000000000,1,1,7,200,100,0,1,0,1,16,0,0,482,135,0,0,0,0,0,198,198); +INSERT INTO `mob_pools` VALUES (3128,'Phantom_Puk','Phantom_Puk',198,0x0000D00600000000000000000000000000000000,1,1,7,200,100,0,1,0,1,16,0,0,482,135,0,0,0,0,0,413,198); INSERT INTO `mob_pools` VALUES (3129,'Phantom_Worm','Phantom_Worm',258,0x0000AA0100000000000000000000000000000000,4,5,7,240,100,0,1,0,1,2,16,0,4937,135,0,0,9,0,64,258,258); INSERT INTO `mob_pools` VALUES (3130,'Phasma','Phasma',121,0x0000700100000000000000000000000000000000,4,4,12,240,100,0,1,0,0,0,0,0,502,643,0,0,28,0,0,121,121); INSERT INTO `mob_pools` VALUES (3131,'Phlebotomic_Slug','Phlebotomic_Slug',172,0x0000140100000000000000000000000000000000,1,1,7,240,100,0,0,0,1,0,0,0,191,643,0,0,0,0,0,172,172); diff --git a/sql/mob_skill_lists.sql b/sql/mob_skill_lists.sql index 7cc35e253c4..facd4d4935c 100644 --- a/sql/mob_skill_lists.sql +++ b/sql/mob_skill_lists.sql @@ -1924,7 +1924,11 @@ INSERT INTO `mob_skill_lists` VALUES ('Mocking_Colibri',412,1699); INSERT INTO `mob_skill_lists` VALUES ('Mocking_Colibri',412,1700); INSERT INTO `mob_skill_lists` VALUES ('Mocking_Colibri',412,1701); INSERT INTO `mob_skill_lists` VALUES ('Mocking_Colibri',412,1702); --- 413 to 435: free +INSERT INTO `mob_skill_lists` VALUES ('Phantom_Puk',413,1720); +INSERT INTO `mob_skill_lists` VALUES ('Phantom_Puk',413,1721); +INSERT INTO `mob_skill_lists` VALUES ('Phantom_Puk',413,1723); +INSERT INTO `mob_skill_lists` VALUES ('Phantom_Puk',413,1724); +-- 414 to 435: free INSERT INTO `mob_skill_lists` VALUES ('Bloodlapper',436,2162); INSERT INTO `mob_skill_lists` VALUES ('Ghillie_Dhu',437,685); INSERT INTO `mob_skill_lists` VALUES ('Highlander_Lizard',438,371); diff --git a/sql/mob_skills.sql b/sql/mob_skills.sql index 5bf60f14db7..fe8c241636e 100644 --- a/sql/mob_skills.sql +++ b/sql/mob_skills.sql @@ -1993,7 +1993,7 @@ INSERT INTO `mob_skills` VALUES (1970,1344,'eclosion',0,7.0,4000,0,1,0,0,0,0,0,0 INSERT INTO `mob_skills` VALUES (1977,1164,'deathgnash',0,7.0,2000,1500,4,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (1978,1165,'abominable_belch',1,16.0,2000,1500,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (1979,1723,'.',0,7.0,2000,1500,4,0,0,0,0,0,0); --- INSERT INTO `mob_skills` VALUES (1980,1724,'boreas_mantle',0,7.0,2000,1500,4,0,0,0,0,0,0); +INSERT INTO `mob_skills` VALUES (1980,1197,'boreas_mantle',0,7.0,2000,1500,1,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (1981,1725,'.',0,7.0,2000,1500,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (1982,1726,'nullifying_dropkick',0,7.0,2000,1500,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (1983,1727,'auroral_uppercut',0,7.0,2000,1500,4,0,0,0,0,0,0); diff --git a/sql/mob_spawn_points.sql b/sql/mob_spawn_points.sql index be42d0e09f8..3a0c05fe22c 100644 --- a/sql/mob_spawn_points.sql +++ b/sql/mob_spawn_points.sql @@ -15112,21 +15112,21 @@ INSERT INTO `mob_spawn_points` VALUES (17051651,'Mocking_Colibri','Mocking Colib INSERT INTO `mob_spawn_points` VALUES (17051653,'Mocking_Colibri','Mocking Colibri',1,-240,48,-240,156); -- ISNM: Shadows of the Mind -INSERT INTO `mob_spawn_points` VALUES (17051655,'Phantom_Puk','Phantom Puk',2,0.000,0.000,0.000,0); -INSERT INTO `mob_spawn_points` VALUES (17051656,'Phantom_Puk','Phantom Puk',2,0.000,0.000,0.000,0); -INSERT INTO `mob_spawn_points` VALUES (17051657,'Phantom_Puk','Phantom Puk',2,0.000,0.000,0.000,0); -INSERT INTO `mob_spawn_points` VALUES (17051658,'Phantom_Puk','Phantom Puk',2,0.000,0.000,0.000,0); -INSERT INTO `mob_spawn_points` VALUES (17051659,'Phantom_Puk','Phantom Puk',2,0.000,0.000,0.000,0); -INSERT INTO `mob_spawn_points` VALUES (17051661,'Phantom_Puk','Phantom Puk',2,0.000,0.000,0.000,0); -INSERT INTO `mob_spawn_points` VALUES (17051662,'Phantom_Puk','Phantom Puk',2,0.000,0.000,0.000,0); -INSERT INTO `mob_spawn_points` VALUES (17051663,'Phantom_Puk','Phantom Puk',2,0.000,0.000,0.000,0); -INSERT INTO `mob_spawn_points` VALUES (17051664,'Phantom_Puk','Phantom Puk',2,0.000,0.000,0.000,0); -INSERT INTO `mob_spawn_points` VALUES (17051665,'Phantom_Puk','Phantom Puk',2,0.000,0.000,0.000,0); -INSERT INTO `mob_spawn_points` VALUES (17051667,'Phantom_Puk','Phantom Puk',2,0.000,0.000,0.000,0); -INSERT INTO `mob_spawn_points` VALUES (17051668,'Phantom_Puk','Phantom Puk',2,0.000,0.000,0.000,0); -INSERT INTO `mob_spawn_points` VALUES (17051669,'Phantom_Puk','Phantom Puk',2,0.000,0.000,0.000,0); -INSERT INTO `mob_spawn_points` VALUES (17051670,'Phantom_Puk','Phantom Puk',2,0.000,0.000,0.000,0); -INSERT INTO `mob_spawn_points` VALUES (17051671,'Phantom_Puk','Phantom Puk',2,0.000,0.000,0.000,0); +INSERT INTO `mob_spawn_points` VALUES (17051655,'Phantom_Puk','Phantom Puk',2,240,-32,240,156); +INSERT INTO `mob_spawn_points` VALUES (17051656,'Phantom_Puk_Clone','Phantom Puk',2,240,-32,240,156); +INSERT INTO `mob_spawn_points` VALUES (17051657,'Phantom_Puk_Clone','Phantom Puk',2,240,-32,240,156); +INSERT INTO `mob_spawn_points` VALUES (17051658,'Phantom_Puk_Clone','Phantom Puk',2,240,-32,240,156); +INSERT INTO `mob_spawn_points` VALUES (17051659,'Phantom_Puk_Clone','Phantom Puk',2,240,-32,240,156); +INSERT INTO `mob_spawn_points` VALUES (17051661,'Phantom_Puk','Phantom Puk',2,0,8,0,156); +INSERT INTO `mob_spawn_points` VALUES (17051662,'Phantom_Puk_Clone','Phantom Puk',2,0,8,0,156); +INSERT INTO `mob_spawn_points` VALUES (17051663,'Phantom_Puk_Clone','Phantom Puk',2,0,8,0,156); +INSERT INTO `mob_spawn_points` VALUES (17051664,'Phantom_Puk_Clone','Phantom Puk',2,0,8,0,156); +INSERT INTO `mob_spawn_points` VALUES (17051665,'Phantom_Puk_Clone','Phantom Puk',2,0,8,0,156); +INSERT INTO `mob_spawn_points` VALUES (17051667,'Phantom_Puk','Phantom Puk',2,-240,48,-240,156); +INSERT INTO `mob_spawn_points` VALUES (17051668,'Phantom_Puk_Clone','Phantom Puk',2,-240,48,-240,156); +INSERT INTO `mob_spawn_points` VALUES (17051669,'Phantom_Puk_Clone','Phantom Puk',2,-240,48,-240,156); +INSERT INTO `mob_spawn_points` VALUES (17051670,'Phantom_Puk_Clone','Phantom Puk',2,-240,48,-240,156); +INSERT INTO `mob_spawn_points` VALUES (17051671,'Phantom_Puk_Clone','Phantom Puk',2,-240,48,-240,156); -- The Beast Within INSERT INTO `mob_spawn_points` VALUES (17051673,'Raubahn','Raubahn',3,240.000,-32.000,240.000,161); diff --git a/sql/npc_list.sql b/sql/npc_list.sql index e37048e610c..7d34d27fe12 100644 --- a/sql/npc_list.sql +++ b/sql/npc_list.sql @@ -6388,9 +6388,9 @@ INSERT INTO `npc_list` VALUES (17047923,'blank','',0,0.000,0.000,0.000,1,50,50,0 INSERT INTO `npc_list` VALUES (17051650,'Armoury_Crate','Armoury Crate',156,240.0,-31.5,240.0,6,40,40,0,8,0,6,1155,0x0000C10300000000000000000000000000000000,0,NULL,1); -- making_a_mockery INSERT INTO `npc_list` VALUES (17051652,'Armoury_Crate','Armoury Crate',156,0.0,8.0,0.0,6,40,40,0,8,0,6,1155,0x0000C10300000000000000000000000000000000,0,NULL,1); INSERT INTO `npc_list` VALUES (17051654,'Armoury_Crate','Armoury Crate',156,-240.0,48.0,-240.0,6,40,40,0,8,0,6,1155,0x0000C10300000000000000000000000000000000,0,NULL,1); -INSERT INTO `npc_list` VALUES (17051660,'Armoury_Crate','Armoury Crate',46,0.000,0.000,0.000,6,40,40,0,8,0,6,1155,0x0000C10300000000000000000000000000000000,0,NULL,1); -- shadows_of_the_mind -INSERT INTO `npc_list` VALUES (17051666,'Armoury_Crate','Armoury Crate',46,0.000,0.000,0.000,6,40,40,0,8,0,6,1155,0x0000C10300000000000000000000000000000000,0,NULL,1); -INSERT INTO `npc_list` VALUES (17051672,'Armoury_Crate','Armoury Crate',46,0.000,0.000,0.000,6,40,40,0,8,0,6,1155,0x0000C10300000000000000000000000000000000,0,NULL,1); +INSERT INTO `npc_list` VALUES (17051660,'Armoury_Crate','Armoury Crate',156,240.0,-31.5,240.0,6,40,40,0,8,0,6,1155,0x0000C10300000000000000000000000000000000,0,NULL,1); -- shadows_of_the_mind +INSERT INTO `npc_list` VALUES (17051666,'Armoury_Crate','Armoury Crate',156,0.0,8.0,0.0,6,40,40,0,8,0,6,1155,0x0000C10300000000000000000000000000000000,0,NULL,1); +INSERT INTO `npc_list` VALUES (17051672,'Armoury_Crate','Armoury Crate',156,-240.0,48.0,-240.0,6,40,40,0,8,0,6,1155,0x0000C10300000000000000000000000000000000,0,NULL,1); INSERT INTO `npc_list` VALUES (17051815,'Achieve_Master','Achieve Master',0,0.000,0.000,0.000,0,50,50,0,0,0,2,3,0x0000320000000000000000000000000000000000,0,'SOA',0); diff --git a/src/map/lua/lua_baseentity.cpp b/src/map/lua/lua_baseentity.cpp index 4c38b42888c..7132b5a92b4 100644 --- a/src/map/lua/lua_baseentity.cpp +++ b/src/map/lua/lua_baseentity.cpp @@ -9385,6 +9385,27 @@ void CLuaBaseEntity::setHP(int32 value) } } +/************************************************************************ + * Function: setMaxHP() + * Purpose : Sets the Maximum Hit Points of an Entity + * Example : player:setMaxHP(100) + * Notes : + ************************************************************************/ + +void CLuaBaseEntity::setMaxHP(int32 value) +{ + if (m_PBaseEntity->objtype == TYPE_NPC) + { + ShowWarning("Invalid Entity (NPC: %s) calling function.", m_PBaseEntity->getName()); + return; + } + + auto* PBattle = static_cast(m_PBaseEntity); + + PBattle->health.maxhp = std::max(1, value); + PBattle->UpdateHealth(); +} + /************************************************************************ * Function: restoreHP() * Purpose : Restores the Hit Points of an Entity by a specified amount @@ -18319,6 +18340,7 @@ void CLuaBaseEntity::Register() SOL_REGISTER("addHPLeaveSleeping", CLuaBaseEntity::addHPLeaveSleeping); SOL_REGISTER("setHP", CLuaBaseEntity::setHP); + SOL_REGISTER("setMaxHP", CLuaBaseEntity::setMaxHP); SOL_REGISTER("restoreHP", CLuaBaseEntity::restoreHP); SOL_REGISTER("delHP", CLuaBaseEntity::delHP); SOL_REGISTER("takeDamage", CLuaBaseEntity::takeDamage); diff --git a/src/map/lua/lua_baseentity.h b/src/map/lua/lua_baseentity.h index 77af703e78a..6f9ec060afd 100644 --- a/src/map/lua/lua_baseentity.h +++ b/src/map/lua/lua_baseentity.h @@ -464,6 +464,7 @@ class CLuaBaseEntity int32 addHP(int32 hpAdd); // Increase hp of Entity int32 addHPLeaveSleeping(int32 hpAdd); // Increase hp of Entity but do not awaken the Entity void setHP(int32 value); // Set hp of Entity to value + void setMaxHP(int32 value); // Set max hp of Entity to value int32 restoreHP(int32 restoreAmt); // Modify hp of Entity, but check if alive first void delHP(int32 delAmt); // Decrease hp of Entity void takeDamage(int32 damage, sol::object const& attacker, sol::object const& atkType, @@ -639,16 +640,16 @@ class CLuaBaseEntity void clearEnmityForEntity(CLuaBaseEntity* PEntity); // Status Effects - bool addStatusEffect(sol::variadic_args va); - bool addStatusEffectEx(sol::variadic_args va); - auto getStatusEffect(uint16 StatusID, sol::object const& SubType) -> std::optional; - auto getStatusEffects() -> sol::table; - int16 getStatusEffectElement(uint16 statusId); - bool canGainStatusEffect(uint16 effect, sol::object const& powerObj); - bool hasStatusEffect(uint16 StatusID, sol::object const& SubType); - bool hasStatusEffectByFlag(uint16 StatusID); - uint8 countEffect(uint16 StatusID); // Gets the number of effects of a specific type on the entity - uint8 countEffectWithFlag(uint32 flag); // Gets the number of effects with a flag on the entity + bool addStatusEffect(sol::variadic_args va); + bool addStatusEffectEx(sol::variadic_args va); + auto getStatusEffect(uint16 StatusID, sol::object const& SubType) -> std::optional; + auto getStatusEffects() -> sol::table; + int16 getStatusEffectElement(uint16 statusId); + bool canGainStatusEffect(uint16 effect, sol::object const& powerObj); + bool hasStatusEffect(uint16 StatusID, sol::object const& SubType); + bool hasStatusEffectByFlag(uint16 StatusID); + uint8 countEffect(uint16 StatusID); // Gets the number of effects of a specific type on the entity + uint8 countEffectWithFlag(uint32 flag); // Gets the number of effects with a flag on the entity bool delStatusEffect(uint16 StatusID, sol::object const& SubType); void delStatusEffectsByFlag(uint32 flag, sol::object const& silent);