Skip to content

Commit

Permalink
feat: full soul war quest
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas committed Apr 10, 2024
1 parent 167bae5 commit 8d91861
Show file tree
Hide file tree
Showing 156 changed files with 7,054 additions and 1,050 deletions.
25 changes: 15 additions & 10 deletions data-otservbr-global/monster/quests/soul_war/aspect_of_power.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,35 @@ local monster = {}
monster.description = "an aspect of power"
monster.experience = 0
monster.outfit = {
lookType = 1303,
lookType = 1306,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 1,
lookAddons = 0,
lookMount = 0,
}

monster.health = 25000
monster.maxHealth = 25000
monster.race = "undead"
monster.corpse = 0
monster.speed = 125
monster.corpse = 33949
monster.speed = 175
monster.manaCost = 0

monster.changeTarget = {
interval = 5000,
chance = 8,
}

monster.events = {
"SoulWarAspectOfPowerDeath",
}

monster.strategiesTarget = {
nearest = 100,
health = 20,
damage = 30,
}

monster.flags = {
Expand Down Expand Up @@ -64,16 +70,15 @@ monster.attacks = {
{ name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -950, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, effect = CONST_ME_HITBYPOISON, target = true },
{ name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -850, length = 4, spread = 0, effect = CONST_ME_ENERGYHIT, target = false },
{ name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -1550, radius = 3, effect = CONST_ME_MORTAREA, target = false },
{ name = "outfit", interval = 1000, chance = 5, radius = 8, effect = CONST_ME_LOSEENERGY, target = false, duration = 5000, outfitMonster = "goshnar's hatred" },
{ name = "outfit", interval = 1000, chance = 5, radius = 8, effect = CONST_ME_LOSEENERGY, target = false, duration = 5000, outfitMonster = "goshnar's greed" },
{ name = "outfit", interval = 1000, chance = 5, radius = 8, effect = CONST_ME_LOSEENERGY, target = false, duration = 5000, outfitMonster = "goshnar's malice" },
{ name = "outfit", interval = 1000, chance = 5, radius = 8, effect = CONST_ME_LOSEENERGY, target = false, duration = 5000, outfitMonster = "goshnar's spite" },
}

monster.defenses = {
defense = 40,
armor = 0,
-- mitigation = ???,
armor = 40,
{ name = "outfit", interval = 4000, chance = 30, target = false, duration = 4000, outfitMonster = "Goshnar's Malice" },
{ name = "outfit", interval = 4000, chance = 30, target = false, duration = 4000, outfitMonster = "Goshnar's Cruelty" },
{ name = "outfit", interval = 4000, chance = 30, target = false, duration = 4000, outfitMonster = "Goshnar's Hatred" },
{ name = "outfit", interval = 4000, chance = 30, target = false, duration = 4000, outfitMonster = "Goshnar's Spite" },
}

monster.elements = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,44 +1,40 @@
local mType = Game.createMonsterType("Goshnar's Megalomania")
local mType = Game.createMonsterType("Goshnar's Megalomania Blue")
local monster = {}

monster.name = "Goshnar's Megalomania"
monster.description = "Goshnar's Megalomania"
monster.experience = 200000
monster.experience = 3000000
monster.outfit = {
lookType = 1308,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0,
lookType = 1337,
}

monster.events = {
"SoulwarsBossDeath",
}

monster.health = 500000
monster.maxHealth = 500000
monster.health = 620000
monster.maxHealth = 620000
monster.race = "undead"
monster.corpse = 33889
monster.speed = 165
monster.speed = 0
monster.manaCost = 0

monster.changeTarget = {
interval = 2000,
chance = 10,
}
monster.maxSummons = 4

monster.bosstiary = {
bossRaceId = 1969,
bossRace = RARITY_NEMESIS,
}

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

monster.strategiesTarget = {
nearest = 70,
nearest = 80,
health = 10,
damage = 10,
random = 10,
}

monster.events = {
"GoshnarsHatredBuff",
"MegalomaniaDeath",
}

monster.flags = {
Expand All @@ -51,7 +47,7 @@ monster.flags = {
illusionable = false,
canPushItems = true,
canPushCreatures = true,
staticAttackChance = 95,
staticAttackChance = 80,
targetDistance = 1,
runHealth = 0,
healthHidden = false,
Expand All @@ -67,14 +63,6 @@ monster.light = {
color = 0,
}

monster.summon = {
maxSummons = 4,
summons = {
{ name = "dreadful harvester", chance = 40, interval = 1000, count = 2 },
{ name = "aspect of power", chance = 50, interval = 1000, count = 2 },
},
}

monster.voices = {
interval = 5000,
chance = 10,
Expand Down Expand Up @@ -110,19 +98,14 @@ monster.loot = {
}

monster.attacks = {
{ name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -8000 },
{ name = "combat", interval = 2000, chance = 30, type = COMBAT_PHYSICALDAMAGE, minDamage = -2950, maxDamage = -4400, range = 7, radius = 3, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_MORTAREA, target = true },
{ name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -3000, maxDamage = -5500, length = 8, spread = 0, effect = CONST_ME_INSECTS, target = false },
{ name = "singlecloudchain", interval = 6000, chance = 40, minDamage = -3300, maxDamage = -5500, range = 6, effect = CONST_ME_ENERGYHIT, target = true },
{ name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -3300, maxDamage = -5200, length = 10, spread = 0, effect = CONST_ME_BLUE_GHOST, target = false },
{ name = "melee", interval = 2000, chance = 100, minDamage = -400, maxDamage = -2225 },
{ name = "megalomania blue", interval = 6000, chance = 100, target = true },
{ name = "combat", interval = 30000, chance = 100, type = COMBAT_LIFEDRAIN, minDamage = -1000, maxDamage = -1500, length = 8, radius = 5, spread = 0, effect = CONST_ME_PINK_ENERGY_SPARK, target = true },
}

monster.defenses = {
defense = 160,
armor = 160,
mitigation = 8.40,
{ name = "speed", interval = 1000, chance = 20, speedChange = 500, effect = CONST_ME_MAGIC_RED, target = false, duration = 10000 },
{ name = "combat", interval = 2000, chance = 25, type = COMBAT_HEALING, minDamage = 2250, maxDamage = 4250, effect = CONST_ME_MAGIC_BLUE, target = false },
defense = 55,
armor = 55,
}

monster.elements = {
Expand All @@ -145,18 +128,21 @@ monster.immunities = {
{ type = "bleed", condition = false },
}

mType.onThink = function(monster, interval) end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature) end
local intervalBetweenExecutions = 10000

mType.onMove = function(monster, creature, fromPosition, toPosition) end
local zone = Zone.getByName("boss.goshnar's-megalomania-purple")
local zonePositions = zone:getPositions()

mType.onSay = function(monster, creature, type, message) end
mType.onThink = function(monsterCallback, interval)
monsterCallback:onThinkGoshnarTormentCounter(interval, 36, intervalBetweenExecutions, SoulWarQuest.levers.goshnarsMegalomania.boss.position)
monsterCallback:onThinkMegalomaniaWhiteTiles(interval, zonePositions, 8000)
monsterCallback:goshnarsDefenseIncrease("cleansed-sanity-action")
end

mType:register(monster)
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
local mType = Game.createMonsterType("Goshnar's Megalomania Green")
local monster = {}

monster.name = "Goshnar's Megalomania"
monster.description = "Goshnar's Megalomania"
monster.experience = 3000000
monster.outfit = {
lookType = 99,
lookHead = 95,
lookBody = 116,
lookLegs = 119,
lookFeet = 115,
lookAddons = 0,
lookMount = 0,
}

monster.bosstiary = {
bossRaceId = 1969,
bossRace = RARITY_NEMESIS,
}

monster.health = 620000
monster.maxHealth = 620000
monster.race = "undead"
monster.corpse = 33889
monster.speed = 250
monster.manaCost = 0
monster.maxSummons = 4

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

monster.events = {
"GoshnarsHatredBuff",
"MegalomaniaDeath",
}

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

monster.flags = {
summonable = false,
attackable = true,
hostile = true,
convinceable = false,
pushable = false,
rewardBoss = true,
illusionable = false,
canPushItems = true,
canPushCreatures = true,
staticAttackChance = 80,
targetDistance = 1,
runHealth = 0,
healthHidden = false,
isBlockable = false,
canWalkOnEnergy = true,
canWalkOnFire = true,
canWalkOnPoison = true,
pet = false,
}

monster.light = {
level = 0,
color = 0,
}

monster.voices = {
interval = 5000,
chance = 10,
}

monster.loot = {
{ name = "crystal coin", chance = 55000, minCount = 70, maxCount = 75 },
{ id = 281, chance = 1150 }, -- giant shimmering pearl (green)
{ name = "giant sapphire", chance = 10000, maxCount = 1 },
{ name = "giant topaz", chance = 10000, maxCount = 1 },
{ name = "violet gem", chance = 6000, maxCount = 1 },
{ name = "blue gem", chance = 10000, maxCount = 3 },
{ id = 3039, chance = 10000, maxCount = 3 }, -- red gem
{ name = "green gem", chance = 10000, maxCount = 3 },
{ name = "yellow gem", chance = 10000, maxCount = 3 },
{ name = "white gem", chance = 6000, maxCount = 3 },
{ name = "dragon figurine", chance = 10000, maxCount = 1 },
{ name = "bullseye potion", chance = 15000, minCount = 10, maxCount = 25 },
{ name = "mastermind potion", chance = 15000, minCount = 10, maxCount = 25 },
{ name = "berserk potion", chance = 15000, minCount = 10, maxCount = 25 },
{ name = "ultimate mana potion", chance = 18000, minCount = 50, maxCount = 100 },
{ name = "supreme health potion", chance = 18000, minCount = 50, maxCount = 100 },
{ name = "ultimate spirit potion", chance = 18000, minCount = 50, maxCount = 100 },
{ name = "figurine of malice", chance = 400 },
{ name = "figurine of cruelty", chance = 400 },
{ name = "figurine of hatred", chance = 400 },
{ name = "figurine of greed", chance = 400 },
{ name = "figurine of spite", chance = 400 },
{ name = "figurine of megalomania", chance = 400 },
{ name = "megalomania's skull", chance = 400 },
{ name = "megalomania's essence", chance = 400 },
{ name = "bag you desire", chance = 100 },
}

monster.attacks = {
{ name = "melee", interval = 2000, chance = 100, minDamage = -800, maxDamage = -2500 },
{ name = "combat", interval = 2000, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -1550, maxDamage = -2620, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false },
{ name = "combat", interval = 2000, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -1550, maxDamage = -2620, length = 8, spread = 0, effect = CONST_ME_BLACK_BLOOD, target = false },
{ name = "combat", interval = 2000, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -1050, maxDamage = -2020, length = 8, spread = 3, effect = CONST_ME_GHOST_SMOKE, target = false },
{ name = "combat", interval = 2000, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -1050, maxDamage = -2020, length = 8, spread = 3, effect = CONST_ME_SMALLCLOUDS, target = false },
{ name = "combat", interval = 2000, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -950, maxDamage = -1400, radius = 3, effect = CONST_ME_MORTAREA, target = true },
{ name = "soulwars fear", interval = 35000, chance = 100, target = true },
{ name = "megalomania transform elemental", interval = SoulWarQuest.goshnarsCrueltyWaveInterval * 1000, chance = 50 },
{ name = "combat", interval = 30000, chance = 100, type = COMBAT_LIFEDRAIN, minDamage = -1000, maxDamage = -1500, length = 8, radius = 5, spread = 0, effect = CONST_ME_PINK_ENERGY_SPARK, target = true },
}

monster.defenses = {
defense = 55,
armor = 55,
}

monster.elements = {
{ type = COMBAT_PHYSICALDAMAGE, percent = 0 },
{ type = COMBAT_ENERGYDAMAGE, percent = 0 },
{ type = COMBAT_EARTHDAMAGE, percent = 0 },
{ type = COMBAT_FIREDAMAGE, percent = 0 },
{ type = COMBAT_LIFEDRAIN, percent = 0 },
{ type = COMBAT_MANADRAIN, percent = 0 },
{ type = COMBAT_DROWNDAMAGE, percent = 0 },
{ type = COMBAT_ICEDAMAGE, percent = 0 },
{ type = COMBAT_HOLYDAMAGE, percent = 0 },
{ type = COMBAT_DEATHDAMAGE, percent = 0 },
}

monster.immunities = {
{ type = "paralyze", condition = true },
{ type = "outfit", condition = false },
{ type = "invisible", condition = true },
{ type = "bleed", condition = false },
}

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

local intervalBetweenExecutions = 10000

local zone = Zone.getByName("boss.goshnar's-megalomania-purple")
local zonePositions = zone:getPositions()

mType.onThink = function(monsterCallback, interval)
monsterCallback:onThinkGoshnarTormentCounter(interval, 36, intervalBetweenExecutions, SoulWarQuest.levers.goshnarsMegalomania.boss.position)
monsterCallback:onThinkMegalomaniaWhiteTiles(interval, zonePositions, 8000)
monsterCallback:goshnarsDefenseIncrease("cleansed-sanity-action")
end

mType:register(monster)
Loading

0 comments on commit 8d91861

Please sign in to comment.