Skip to content

Commit

Permalink
Merge branch 'opentibiabr:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGlitchLab authored Sep 12, 2023
2 parents 426a7c3 + 0c7a52a commit 19b107b
Show file tree
Hide file tree
Showing 3,815 changed files with 53,526 additions and 55,719 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
16 changes: 11 additions & 5 deletions .github/workflows/lua-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
name: Lua-format
on:
pull_request:
paths:
- 'data*/**'
push:
paths:
- 'data*/**'
jobs:
lua-formatter:
runs-on: ubuntu-latest
Expand All @@ -20,16 +24,18 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Run EmmyLuaCodeStyle
if: ${{ github.ref != 'refs/heads/main' }}
run: >
curl -L -o /tmp/linux-x64.tar.gz https://github.com/CppCXY/EmmyLuaCodeStyle/releases/download/1.3.1/linux-x64.tar.gz && tar -xzf /tmp/linux-x64.tar.gz -C /tmp && /tmp/linux-x64/bin/CodeFormat format -c .editorconfig -w .
- uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: .

- name: Run add and commit
if: ${{ github.ref != 'refs/heads/main' }}
uses: EndBug/add-and-commit@v9
with:
author_name: GitHub Actions
author_email: github-actions[bot]@users.noreply.github.com
message: "Lua code format - (EmmyLuaCodeStyle)"
message: "Lua code format - (Stylua)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .luarc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"workspace.maxPreload": 10000
}
6 changes: 3 additions & 3 deletions data-canary/lib/core/load.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dofile(DATA_DIRECTORY .. '/lib/core/storages.lua')
dofile(DATA_DIRECTORY .. '/lib/core/constants.lua')
dofile(DATA_DIRECTORY .. '/lib/core/quests.lua')
dofile(DATA_DIRECTORY .. "/lib/core/storages.lua")
dofile(DATA_DIRECTORY .. "/lib/core/constants.lua")
dofile(DATA_DIRECTORY .. "/lib/core/quests.lua")
8 changes: 4 additions & 4 deletions data-canary/lib/core/quests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ if not Quests then
missionId = 1,
startValue = 1,
endValue = 1,
description = "You broke the first seal."
}
}
}
description = "You broke the first seal.",
},
},
},
}
end
15 changes: 7 additions & 8 deletions data-canary/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@ Reserved player action storage key ranges (const.hpp)
Storage = {
Quest = {
Key = {
ID1000 = 103
ID1000 = 103,
},
ExampleQuest = {
Example = 9000,
Door = 9001
}
Door = 9001,
},
},

DelayLargeSeaShell = 30002,
Promotion = 30003,
Imbuement = 30004
Imbuement = 30004,
}

GlobalStorage = {
ExampleQuest = {
Example = 60000
}
Example = 60000,
},
}

-- Values extraction function
Expand All @@ -64,8 +64,7 @@ table.sort(extraction) -- Sort the table
if #extraction > 1 then
for i = 1, #extraction - 1 do
if extraction[i] == extraction[i + 1] then
logger.warn("Duplicate storage value found: {}",
extraction[i])
logger.warn("Duplicate storage value found: {}", extraction[i])
end
end
end
2 changes: 1 addition & 1 deletion data-canary/lib/lib.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
-- Core API functions implemented in Lua
dofile(DATA_DIRECTORY .. '/lib/core/load.lua')
dofile(DATA_DIRECTORY .. "/lib/core/load.lua")
22 changes: 11 additions & 11 deletions data-canary/monster/amphibics/azure_frog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ monster.outfit = {
lookLegs = 69,
lookFeet = 66,
lookAddons = 0,
lookMount = 0
lookMount = 0,
}

monster.raceId = 268
Expand All @@ -23,7 +23,7 @@ monster.Bestiary = {
CharmsPoints = 15,
Stars = 2,
Occurrence = 0,
Locations = "Meriana, Laguna Islands, and other Shattered Isles."
Locations = "Meriana, Laguna Islands, and other Shattered Isles.",
}

monster.health = 60
Expand All @@ -35,7 +35,7 @@ monster.manaCost = 305

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

monster.strategiesTarget = {
Expand All @@ -59,33 +59,33 @@ monster.flags = {
isBlockable = false,
canWalkOnEnergy = false,
canWalkOnFire = false,
canWalkOnPoison = false
canWalkOnPoison = false,
}

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

monster.voices = {
interval = 5000,
chance = 10,
{ text = "Ribbit! Ribbit!", yell = false },
{ text = "Ribbit!", yell = false }
{ text = "Ribbit!", yell = false },
}

monster.loot = {
{ name = "gold coin", chance = 74230, maxCount = 10 },
{ name = "worm", chance = 9240 }
{ name = "worm", chance = 9240 },
}

monster.attacks = {
{ name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -24, effect = CONST_ME_DRAWBLOOD }
{ name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -24, effect = CONST_ME_DRAWBLOOD },
}

monster.defenses = {
defense = 5,
armor = 8
armor = 8,
}

monster.elements = {
Expand All @@ -98,14 +98,14 @@ monster.elements = {
{ type = COMBAT_DROWNDAMAGE, percent = 0 },
{ type = COMBAT_ICEDAMAGE, percent = 10 },
{ type = COMBAT_HOLYDAMAGE, percent = 0 },
{ type = COMBAT_DEATHDAMAGE, percent = 0 }
{ type = COMBAT_DEATHDAMAGE, percent = 0 },
}

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

mType:register(monster)
21 changes: 10 additions & 11 deletions data-canary/monster/amphibics/bog_frog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ monster.outfit = {
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0
lookMount = 0,
}

monster.raceId = 738
Expand All @@ -23,7 +23,7 @@ monster.Bestiary = {
CharmsPoints = 5,
Stars = 1,
Occurrence = 0,
Locations = "Shadowthorn in the bog god's temple, Drefia, around Lake Equivocolao when it's dirty."
Locations = "Shadowthorn in the bog god's temple, Drefia, around Lake Equivocolao when it's dirty.",
}

monster.health = 25
Expand All @@ -35,7 +35,7 @@ monster.manaCost = 305

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

monster.strategiesTarget = {
Expand All @@ -59,27 +59,26 @@ monster.flags = {
isBlockable = false,
canWalkOnEnergy = false,
canWalkOnFire = false,
canWalkOnPoison = false
canWalkOnPoison = false,
}

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

monster.voices = {
interval = 5000,
chance = 10,
{ text = "Ribbit! Ribbit!", yell = false },
{ text = "Ribbit!", yell = false }
{ text = "Ribbit!", yell = false },
}

monster.loot = {
}
monster.loot = {}

monster.defenses = {
defense = 5,
armor = 10
armor = 10,
}

monster.elements = {
Expand All @@ -92,14 +91,14 @@ monster.elements = {
{ type = COMBAT_DROWNDAMAGE, percent = 0 },
{ type = COMBAT_ICEDAMAGE, percent = 0 },
{ type = COMBAT_HOLYDAMAGE, percent = 0 },
{ type = COMBAT_DEATHDAMAGE, percent = 0 }
{ type = COMBAT_DEATHDAMAGE, percent = 0 },
}

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

mType:register(monster)
22 changes: 11 additions & 11 deletions data-canary/monster/amphibics/coral_frog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ monster.outfit = {
lookLegs = 97,
lookFeet = 114,
lookAddons = 0,
lookMount = 0
lookMount = 0,
}

monster.raceId = 269
Expand All @@ -23,7 +23,7 @@ monster.Bestiary = {
CharmsPoints = 15,
Stars = 2,
Occurrence = 0,
Locations = "Meriana, Laguna Islands, and other Shattered Isles."
Locations = "Meriana, Laguna Islands, and other Shattered Isles.",
}

monster.health = 60
Expand All @@ -35,7 +35,7 @@ monster.manaCost = 305

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

monster.strategiesTarget = {
Expand All @@ -59,33 +59,33 @@ monster.flags = {
isBlockable = false,
canWalkOnEnergy = false,
canWalkOnFire = false,
canWalkOnPoison = false
canWalkOnPoison = false,
}

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

monster.voices = {
interval = 5000,
chance = 10,
{ text = "Ribbit!", yell = false },
{ text = "Ribbit! Ribbit!", yell = false }
{ text = "Ribbit! Ribbit!", yell = false },
}

monster.loot = {
{ name = "gold coin", chance = 75590, maxCount = 10 },
{ name = "worm", chance = 11310 }
{ name = "worm", chance = 11310 },
}

monster.attacks = {
{ name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -24, effect = CONST_ME_DRAWBLOOD }
{ name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -24, effect = CONST_ME_DRAWBLOOD },
}

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

monster.elements = {
Expand All @@ -98,14 +98,14 @@ monster.elements = {
{ type = COMBAT_DROWNDAMAGE, percent = 0 },
{ type = COMBAT_ICEDAMAGE, percent = 10 },
{ type = COMBAT_HOLYDAMAGE, percent = 0 },
{ type = COMBAT_DEATHDAMAGE, percent = 0 }
{ type = COMBAT_DEATHDAMAGE, percent = 0 },
}

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

mType:register(monster)
Loading

0 comments on commit 19b107b

Please sign in to comment.