Skip to content

Commit

Permalink
Merge branch 'main' into fix/adventurers-blessings
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel authored Dec 20, 2023
2 parents b9973d3 + d31ee30 commit 41887f6
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 7 deletions.
96 changes: 96 additions & 0 deletions data-otservbr-global/monster/bosses/alchemist_container.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
local mType = Game.createMonsterType("Alchemist Container")
local monster = {}

monster.description = "Alchemist Container"
monster.experience = 0
monster.outfit = {
lookTypeEx = 39952,
}

monster.health = 1200
monster.maxHealth = 1200
monster.race = "undead"
monster.corpse = 39949
monster.speed = 0
monster.manaCost = 0

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

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

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

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

monster.attacks = {}

monster.defenses = {
defense = 54,
armor = 59,
mitigation = 3.7,
}

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.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

mType.onMove = function(monster, creature, fromPosition, toPosition) end

mType.onSay = function(monster, creature, type, message) end

mType:register(monster)
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ end

function adventurersStone.onUse(player, item, fromPosition, target, toPosition, isHotkey)
local tile = Tile(player:getPosition())
if not tile:hasFlag(TILESTATE_PROTECTIONZONE) or tile:hasFlag(TILESTATE_HOUSE) or player:isPzLocked() or player:getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT) then
if not tile:hasFlag(TILESTATE_PROTECTIONZONE) or tile:hasFlag(TILESTATE_HOUSE) or player:isPzLocked() then
doNotTeleport(player)
return false
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ function loginEvents.onLogin(player)
"FamiliarAdvance",
--Quests
--Cults Of Tibia Quest
"LeidenHeal",
"HealthPillar",
"YalahariHealth",
}
Expand Down
8 changes: 4 additions & 4 deletions data/modules/scripts/gamestore/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1366,8 +1366,8 @@ GameStore.canUseHirelingName = function(name)
local result = {
ability = false,
}
if name:len() < 3 or name:len() > 14 then
result.reason = "The length of the hireling name must be between 3 and 14 characters."
if name:len() < 3 or name:len() > 18 then
result.reason = "The length of the hireling name must be between 3 and 18 characters."
return result
end

Expand Down Expand Up @@ -1422,8 +1422,8 @@ GameStore.canChangeToName = function(name)
local result = {
ability = false,
}
if name:len() < 3 or name:len() > 14 then
result.reason = "The length of your new name must be between 3 and 14 characters."
if name:len() < 3 or name:len() > 18 then
result.reason = "The length of your new name must be between 3 and 18 characters."
return result
end

Expand Down
2 changes: 1 addition & 1 deletion src/utils/tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,7 @@ NameEval_t validateName(const std::string &name) {
std::istream_iterator<std::string> end;
std::copy(begin, end, std::back_inserter(toks));

if (name.length() < 3 || name.length() > 14) {
if (name.length() < 3 || name.length() > 18) {
return INVALID_LENGTH;
}

Expand Down

0 comments on commit 41887f6

Please sign in to comment.