Skip to content

Commit

Permalink
feat: migrate boss cooldowns to KV (#1724)
Browse files Browse the repository at this point in the history
Setting boss cooldowns is a kind of unnecessary pain. This makes it automatic and easy. Uses the Player's section of the KV store to automatically link bosses in by bestiary ID.
luan authored Oct 21, 2023
1 parent 1ecfef9 commit 7e3984e
Showing 164 changed files with 263 additions and 415 deletions.
69 changes: 0 additions & 69 deletions data-otservbr-global/lib/core/storages.lua
Original file line number Diff line number Diff line change
@@ -215,11 +215,7 @@ Storage = {
Fourteen = {
Remains = 50041,
},
UrmahlulluTimer = 50042,
AccessDoor = 50043,
NeferiTheSpyTimer = 50044,
SisterHetaiTimer = 55045,
AmenefTimer = 55046,
CatacombDoors = 55047,
},
TheSecretLibrary = {
@@ -433,15 +429,11 @@ Storage = {
Questline = 50350,
DragonCounter = 50351,
ChestCounter = 50352,
TazhadurTimer = 50353,
KalyassaTimer = 50354,
SecretsCounter = 50355,
GelidrazahAccess = 50356,
GelidrazahTimer = 50357,
DesertTile = 50358,
StoneSculptureTile = 50359,
SuntowerTile = 50360,
ZorvoraxTimer = 50361,
Horn = 50362,
Scale = 50363,
Bones = 50364,
@@ -473,14 +465,6 @@ Storage = {
RiftRunner = 50420, -- Scroll
TheShattererTimer = 50421,
TheLordOfTheLiceTimer = 50422,
TarbazTimer = 50423,
RazzagornTimer = 50424,
RagiazTimer = 50425,
ZamuloshTimer = 50426,
ShulgraxTimer = 50427,
MazoranTimer = 50428,
PlagirathTimer = 50429,
FerumbrasTimer = 50430,
Tarbaz = 50431,
Razzagorn = 50432,
Ragiaz = 50433,
@@ -531,19 +515,12 @@ Storage = {
DiamondServantCounter = 50484,
AccessPortals = 50485,
AccessMachine = 50486,
LadyTenebrisTimer = 50487,
LadyTenebrisKilled = 50488,
LloydTimer = 50489,
LloydKilled = 50490,
ThornKnightTimer = 50491,
ThornKnightKilled = 50492,
DragonkingTimer = 50493,
DragonkingKilled = 50494,
HorrorTimer = 50495,
HorrorKilled = 50496,
TimeGuardianTimer = 50497,
TimeGuardianKilled = 50498,
LastLoreTimer = 50499,
LastLoreKilled = 50501,
BirdCage = 50502,
AccessLavaTeleport = 50503,
@@ -686,9 +663,6 @@ Storage = {
Warzone3Reward = 50704,
BossKills = 50705,
DoorGoldenFruits = 50706,
BossWarzone1 = 50707,
BossWarzone2 = 50708,
BossWarzone3 = 50709,
GnomedixMsg = 50710,
},
TheirMastersVoice = {
@@ -1707,7 +1681,6 @@ Storage = {
Questline = 52310,
CobraBastion = {
Questline = 52311,
ScarlettTimer = 52312,
},
},
RottinWoodAndMaried = {
@@ -1733,7 +1706,6 @@ Storage = {
Commander = 52396, -- Global
TotalLionCommanders = 52397, -- Global
TotalUsurperCommanders = 52398, -- Global
Timer = 52399,
},
},
-- News quest development
@@ -2567,17 +2539,8 @@ Storage = {
ChakoyaIcebergMiniWorldChange = {},
GrimvaleMineWorldChange = {},
Grimvale = {
BloodbackTimer = 44951,
DarkfangTimer = 44952,
SharpclawTimer = 44953,
ShadowpeltTimer = 44954,
BlackVixenTimer = 44955,
AncientFeudDoors = 44956,
AncientFeudShortcut = 44957,
YirkasTimer = 44958,
SrezzTimer = 44959,
UtuaTimer = 44960,
KatexTimer = 44961,
},
HiveOutpostMiniWorldChange = {},
JungleCampMiniWorldChange = {},
@@ -2723,7 +2686,6 @@ Storage = {
BuriedCathedralAccess = 46403,
DreamScarAccess = 46404,
AndrewDoor = 14900,
FacelessBaneTime = 50283,
AccessDoors = 46309,
ArenaTimer = 46310,
PlaguerootKilled = 46311,
@@ -2760,18 +2722,12 @@ Storage = {
IceIslands = 46863,
},
Bosses = {
BaelocNictrosTimer = 46865,
BaelocNictrosKilled = 46866,
CountVlarkorthTimer = 46867,
CountVlarkorthKilled = 46868,
DukeKruleTimer = 46869,
DukeKruleKilled = 46870,
EarlOsamTimer = 46871,
EarlOsamKilled = 46872,
LordAzaramTimer = 46873,
LordAzaramKilled = 46874,
KingZelosDoor = 46875,
KingZelosTimer = 46876,
KingZelosKilled = 46877,
InquisitionOutfitReceived = 46878,
},
@@ -2783,20 +2739,12 @@ Storage = {
U12_30 = { -- update 12.30 - Reserved Storages 47001 - 47200
FalconerOutfits = {},
FeasterOfSouls = {
IrgixTimer = 47005,
IrgixKilled = 47006,
UnazTimer = 47007,
UnazKilled = 47008,
VokTimer = 47009,
VokKilled = 47010,
FearFeasterTimer = 47011,
FearFeasterKilled = 47012,
DreadMaidenTimer = 47013,
DreadMaidenKilled = 47014,
UnwelcomeTimer = 47015,
UnwelcomeKilled = 47016,
PaleWormEntrance = 47017,
PaleWormTimer = 47018,
PaleWormKilled = 47019,
},
PoltergeistOutfits = {
@@ -2811,18 +2759,12 @@ Storage = {
AccessSouthernSide = 47403,
},
SoulWar = {
GoshnarMaliceTimer = 47210,
GoshnarMaliceKilled = 47211,
GoshnarHatredTimer = 47212,
GoshnarHatredKilled = 47213,
GoshnarSpiteTimer = 47214,
GoshnarSpiteKilled = 47215,
GoshnarCrueltyTimer = 47216,
GoshnarCrueltyKilled = 47217,
GoshnarGreedTimer = 47218,
GoshnarGreedKilled = 47219,
GoshnarMegalomaniaAccess = 47220,
GoshnarMegalomaniaTimer = 47221,
GoshnarMegalomaniaKilled = 47222,
QuestReward = 47223,
},
@@ -2833,21 +2775,15 @@ Storage = {
RascacoonShortcut = 47512,
TentuglyKilled = 47513,
TentuglyDoor = 47514,
TentuglyTimer = 47515,
RatmiralTimer = 47516,
},
RascoohanOutfits = {},
},
U12_70 = { -- update 12.70 - Reserved Storages 47601 - 47800
AdventuresOfGalthen = {
AccessDoor = 47601,
MegasylvanYseldaTimer = 47602,
},
CitizenOfIssaviOutfits = {},
RoyalBounaceanAdvisorOutfits = {},
TooHotToHandle = {
BrainstealerTimer = 47611,
},
},
U12_80 = { -- update 12.80 - Reserved Storages 47801 - 47850
RoyalCostumeOutfits = {},
@@ -2860,15 +2796,10 @@ Storage = {
Max = 47857,
},
Bosses = {
MagmaBubbleTimer = 47852,
MagmaBubbleKilled = 47853,
ThePrimalMenaceTimer = 47854,
ThePrimalMenaceKilled = 47855,
},
},
WithinTheTides = {
TimiraTimer = 47858,
},
},
U13_10 = { -- update 13.10 - Reserved Storages 47901 - 47951
CradleOfMonsters = {
3 changes: 0 additions & 3 deletions data-otservbr-global/lib/quests/bigfoot_burden.lua
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ if not warzoneConfig then
boss = "Deathstrike",
teleportTo = Position(33096, 31955, 10),
locked = false,
storage = Storage.BigfootBurden.BossWarzone1,
interval = configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN),
exit = Position(33001, 31900, 9),
},
@@ -24,7 +23,6 @@ if not warzoneConfig then
boss = "Gnomevil",
teleportTo = Position(33106, 31955, 11),
locked = false,
storage = Storage.BigfootBurden.BossWarzone2,
interval = configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN),
exit = Position(33001, 31900, 9),
wall = 16169, --Id of current crystais in warzone 2 (open killing parasite)
@@ -39,7 +37,6 @@ if not warzoneConfig then
boss = "Abyssador",
teleportTo = Position(33083, 31904, 12), --Place where the player will be teleported inside the room
locked = false,
storage = Storage.BigfootBurden.BossWarzone3,
interval = configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN),
exit = Position(33001, 31900, 9),
},
16 changes: 10 additions & 6 deletions data-otservbr-global/monster/bosses/doctor_marrow.lua
Original file line number Diff line number Diff line change
@@ -13,21 +13,25 @@ monster.outfit = {
lookMount = 0,
}

monster.health = 1800
monster.maxHealth = 1800
monster.health = 120000
monster.maxHealth = 120000
monster.race = "blood"
monster.corpse = 18074
monster.speed = 125
monster.speed = 180
monster.manaCost = 0

monster.events = {
"DoctorMarrowHealth",
}

monster.changeTarget = {
interval = 4000,
chance = 10,
chance = 15,
}

monster.strategiesTarget = {
nearest = 80,
health = 10,
nearest = 60,
health = 30,
damage = 10,
}

1 change: 0 additions & 1 deletion data-otservbr-global/monster/bosses/morshabaal.lua
Original file line number Diff line number Diff line change
@@ -28,7 +28,6 @@ monster.changeTarget = {
monster.bosstiary = {
bossRaceId = 2118,
bossRace = RARITY_NEMESIS,
--storageCooldown = Storage.Quest.U12_70.AdventuresOfGalthen.MegasylvanYseldaTimer
}

monster.strategiesTarget = {
1 change: 0 additions & 1 deletion data-otservbr-global/monster/bosses/the_brainstealer.lua
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ monster.outfit = {
monster.bosstiary = {
bossRaceId = 2055,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.Quest.U12_70.TooHotToHandle.BrainstealerTimer,
}

monster.health = 300000
Original file line number Diff line number Diff line change
@@ -28,7 +28,6 @@ monster.changeTarget = {
monster.bosstiary = {
bossRaceId = 2006,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.Quest.U12_60.APiratesTail.RatmiralTimer,
}

monster.strategiesTarget = {
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ monster.outfit = {
monster.bosstiary = {
bossRaceId = 2238,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.Quest.U12_60.APiratesTail.TentuglyTimer,
}

monster.health = 75000
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ monster.outfit = {
monster.bosstiary = {
bossRaceId = 2114,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.Quest.U12_70.AdventuresOfGalthen.MegasylvanYseldaTimer,
}

monster.health = 32000
Original file line number Diff line number Diff line change
@@ -28,7 +28,6 @@ monster.changeTarget = {
monster.bosstiary = {
bossRaceId = 1981,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.Quest.U10_80.Grimvale.KatexTimer,
}

monster.strategiesTarget = {
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ monster.outfit = {
monster.bosstiary = {
bossRaceId = 1983,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.Quest.U10_80.Grimvale.SrezzTimer,
}

monster.health = 6200
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ monster.outfit = {
monster.bosstiary = {
bossRaceId = 1984,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.Quest.U10_80.Grimvale.UtuaTimer,
}

monster.health = 6400
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ monster.outfit = {
monster.bosstiary = {
bossRaceId = 1982,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.Quest.U10_80.Grimvale.YirkasTimer,
}

monster.health = 6300
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ monster.outfit = {
monster.bosstiary = {
bossRaceId = 887,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.BigfootBurden.BossWarzone3,
}

monster.health = 340000
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ monster.outfit = {
monster.bosstiary = {
bossRaceId = 892,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.BigfootBurden.BossWarzone1,
}

monster.health = 200000
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ monster.outfit = {
monster.bosstiary = {
bossRaceId = 893,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.BigfootBurden.BossWarzone2,
}

monster.health = 250000
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ monster.outfit = {
monster.bosstiary = {
bossRaceId = 1487,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.CultsOfTibia.Humans.BossTimer,
}

monster.health = 250000
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ monster.outfit = {
monster.bosstiary = {
bossRaceId = 1427,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.CultsOfTibia.Barkless.BossTimer,
}

monster.health = 100000
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ monster.outfit = {
monster.bosstiary = {
bossRaceId = 1406,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.CultsOfTibia.Orcs.BossTimer,
}

monster.health = 60000
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ monster.outfit = {
monster.bosstiary = {
bossRaceId = 1409,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.CultsOfTibia.Minotaurs.BossTimer,
}

monster.health = 300000
Loading

0 comments on commit 7e3984e

Please sign in to comment.