Skip to content

Commit

Permalink
Merge branch 'main' into improve-save-stash
Browse files Browse the repository at this point in the history
  • Loading branch information
luanluciano93 authored Sep 12, 2024
2 parents 04bdd1e + 5bcbc39 commit 6d06e20
Show file tree
Hide file tree
Showing 1,588 changed files with 885,930 additions and 11,459 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/analysis-qodana.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
name: Analysis - Qodana

on:
workflow_dispatch:
pull_request:
push:
branches:
- main

jobs:
qodana:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
checks: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

# - name: Install Linux Dependencies
# run: >
# sudo apt-get update && sudo apt-get install ccache
# linux-headers-$(uname -r)
# - name: CCache
# uses: hendrikmuhs/ccache-action@main
# with:
# max-size: "1G"
# key: ccache-qodana

# - name: Restore artifacts and install vcpkg
# id: vcpkg-step
# run: |
# vcpkgCommitId=$(grep '.builtin-baseline' vcpkg.json | awk -F: '{print $2}' | tr -d '," ')
# echo "vcpkg commit ID: $vcpkgCommitId"
# echo "VCPKG_GIT_COMMIT_ID=$vcpkgCommitId" >> $GITHUB_ENV
# - name: Get vcpkg commit id from vcpkg.json
# uses: lukka/run-vcpkg@main
# with:
# vcpkgGitURL: "https://github.com/microsoft/vcpkg.git"
# vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT_ID }}

# - name: Get latest CMake and ninja
# uses: lukka/get-cmake@main

# - name: Run CMake
# uses: lukka/run-cmake@main
# with:
# configurePreset: linux-debug

# - name: Qodana Scan
# run: |
# docker run \
# -v $(pwd):/data/project/ \
# -v $(pwd):$(pwd) \
# -e QODANA_TOKEN="${{ secrets.QODANA_TOKEN }}" \
# jetbrains/qodana-clang:2024.1-eap \
# --compile-commands ./build/linux-debug/compile_commands.json

- name: 'Qodana Scan'
uses: JetBrains/[email protected]
with:
args: --compile-commands,./build/linux-debug/compile_commands.json,--baseline,qodana-base.sarif.json
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ endif()

set(VCPKG_FEATURE_FLAGS "versions")
set(VCPKG_BUILD_TYPE "release")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)



# *****************************************************************************
# Project canary
Expand Down
16 changes: 14 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,21 @@
"description": "Build Debug Mode",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"DEBUG_LOG": "ON",
"SPEED_UP_BUILD_UNITY": "OFF",
"ASAN_ENABLED": "ON"
"SPEED_UP_BUILD_UNITY": "OFF"
}
},
{
"name": "linux-debug-asan",
"inherits": "linux-release",
"displayName": "Linux - Debug Build",
"description": "Build Debug Mode With ASAN Enable",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"DEBUG_LOG": "ON",
"ASAN_ENABLED": "ON",
"SPEED_UP_BUILD_UNITY": "OFF"
}
},
{
Expand Down
44 changes: 36 additions & 8 deletions cmake/modules/BaseConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,29 @@ option(BUILD_STATIC_LIBRARY "Build using static libraries" OFF)
option(SPEED_UP_BUILD_UNITY "Compile using build unity for speed up build" ON)
option(USE_PRECOMPILED_HEADER "Compile using precompiled header" ON)

# === TOGGLE_BIN_FOLDER ===
if(TOGGLE_BIN_FOLDER)
log_option_enabled("TOGGLE_BIN_FOLDER")
else()
log_option_disabled("TOGGLE_BIN_FOLDER")
endif(TOGGLE_BIN_FOLDER)

# === TOGGLE_BIN_FOLDER ===
if(OPTIONS_ENABLE_OPENMP)
log_option_enabled("OPTIONS_ENABLE_OPENMP")
else()
log_option_disabled("OPTIONS_ENABLE_OPENMP")
endif(OPTIONS_ENABLE_OPENMP)

# === DEBUG LOG ===
# cmake -DDEBUG_LOG=ON ..
if(DEBUG_LOG)
add_definitions(-DDEBUG_LOG=ON)
log_option_enabled("DEBUG LOG")
else()
log_option_disabled("DEBUG LOG")
endif(DEBUG_LOG)

# === ASAN ===
if(ASAN_ENABLED)
log_option_enabled("asan")
Expand All @@ -87,7 +110,7 @@ else()
log_option_disabled("asan")
endif()

# Build static libs
# === BUILD_STATIC_LIBRARY ===
if(BUILD_STATIC_LIBRARY)
log_option_enabled("STATIC_LIBRARY")

Expand All @@ -102,14 +125,19 @@ else()
log_option_disabled("STATIC_LIBRARY")
endif()

# === DEBUG LOG ===
# cmake -DDEBUG_LOG=ON ..
if(DEBUG_LOG)
add_definitions(-DDEBUG_LOG=ON)
log_option_enabled("DEBUG LOG")
# === SPEED_UP_BUILD_UNITY ===
if(SPEED_UP_BUILD_UNITY)
log_option_enabled("SPEED_UP_BUILD_UNITY")
else()
log_option_disabled("DEBUG LOG")
endif(DEBUG_LOG)
log_option_disabled("SPEED_UP_BUILD_UNITY")
endif(SPEED_UP_BUILD_UNITY)

# === USE_PRECOMPILED_HEADER ===
if(USE_PRECOMPILED_HEADER)
log_option_enabled("USE_PRECOMPILED_HEADER")
else()
log_option_disabled("USE_PRECOMPILED_HEADER")
endif(USE_PRECOMPILED_HEADER)

# *****************************************************************************
# Compiler Options
Expand Down
71 changes: 35 additions & 36 deletions data-canary/monster/magicals/guzzlemaw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ monster.Bestiary = {
CharmsPoints = 50,
Stars = 4,
Occurrence = 0,
Locations = "Guzzlemaw Valley, and a single spawn in a tower in Upper Roshamuul \z
(south of the Depot and west of the entrance to Roshamuul Prison).",
Locations = "Guzzlemaw Valley, and a single spawn in a tower in Upper Roshamuul (south of the Depot and west of the entrance to Roshamuul Prison).",
}

monster.health = 6400
Expand Down Expand Up @@ -64,7 +63,6 @@ monster.flags = {
canWalkOnEnergy = true,
canWalkOnFire = true,
canWalkOnPoison = true,
pet = false,
}

monster.light = {
Expand All @@ -78,63 +76,64 @@ monster.voices = {
}

monster.loot = {
{ id = 3031, chance = 100000, maxCount = 100 }, -- gold coin
{ id = 3035, chance = 100000, maxCount = 7 }, -- platinum coin
{ id = 3104, chance = 10700 }, -- banana skin
{ id = 3110, chance = 10500 }, -- piece of iron
{ id = 3111, chance = 9500 }, -- fishbone
{ name = "gold coin", chance = 100000, maxCount = 100 },
{ name = "platinum coin", chance = 100000, maxCount = 7 },
{ name = "banana skin", chance = 10700 },
{ name = "piece of iron", chance = 10500 },
{ name = "fishbone", chance = 9500 },
{ id = 3114, chance = 10400 }, -- skull
{ id = 3115, chance = 9200 }, -- bone
{ id = 3116, chance = 4500 }, -- big bone
{ id = 3265, chance = 2700 }, -- two handed sword
{ name = "two handed sword", chance = 2700 },
{ id = 3578, chance = 7000, maxCount = 3 }, -- fish
{ id = 3582, chance = 10000 }, -- ham
{ id = 5880, chance = 3000 }, -- iron ore
{ id = 5895, chance = 5000 }, -- fish fin
{ id = 5925, chance = 5700 }, -- hardened bone
{ name = "ham", chance = 10000 },
{ name = "iron ore", chance = 3000 },
{ name = "fish fin", chance = 5000 },
{ name = "hardened bone", chance = 5700 },
{ id = 5951, chance = 9400 }, -- fish tail
{ id = 7404, chance = 1000 }, -- assassin dagger
{ id = 7407, chance = 2000 }, -- haunted blade
{ id = 7418, chance = 380 }, -- nightmare blade
{ id = 238, chance = 17000, maxCount = 3 }, -- great mana potion
{ id = 239, chance = 18500, maxCount = 2 }, -- great health potion
{ id = 10389, chance = 1200 }, -- sai
{ id = 16120, chance = 3000 }, -- violet crystal shard
{ id = 16123, chance = 12000, maxCount = 2 }, -- brown crystal splinter
{ id = 16126, chance = 7600 }, -- red crystal fragment
{ name = "assassin dagger", chance = 1000 },
{ name = "haunted blade", chance = 2000 },
{ name = "nightmare blade", chance = 380 },
{ name = "great mana potion", chance = 17000, maxCount = 3 },
{ name = "great health potion", chance = 18500, maxCount = 2 },
{ name = "sai", chance = 1200 },
{ name = "violet crystal shard", chance = 3000 },
{ name = "brown crystal splinter", chance = 12000, maxCount = 2 },
{ name = "red crystal fragment", chance = 7600 },
{ id = 16279, chance = 12000 }, -- crystal rubbish
{ id = 20062, chance = 920 }, -- cluster of solace
{ id = 20198, chance = 15000 }, -- frazzle tongue
{ id = 20199, chance = 14000 }, -- frazzle skin
{ name = "cluster of solace", chance = 8920 },
{ name = "frazzle tongue", chance = 15000 },
{ name = "frazzle skin", chance = 14000 },
}

monster.attacks = {
{ name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -499 },
-- bleed
{ name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -500, maxDamage = -1000, radius = 3, target = false },
{ name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -900, length = 8, spread = 3, effect = CONST_ME_EXPLOSIONAREA, target = false },
{ name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -500, maxDamage = -1000, radius = 3, effect = CONST_ME_DRAWBLOOD, target = false },
{ name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -900, length = 8, spread = 0, effect = CONST_ME_EXPLOSIONAREA, target = false },
{ name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_STONES, target = true },
{ name = "speed", interval = 2000, chance = 15, speedChange = -100, radius = 6, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 },
{ name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -800, length = 8, spread = 3, effect = CONST_ME_MAGIC_RED, target = false },
{ name = "speed", interval = 2000, chance = 15, speedChange = -800, radius = 6, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 },
{ name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -800, length = 8, spread = 0, effect = CONST_ME_MAGIC_RED, target = false },
}

monster.defenses = {
defense = 50,
armor = 50,
armor = 74,
mitigation = 2.31,
{ name = "combat", interval = 2000, chance = 20, type = COMBAT_HEALING, minDamage = 250, maxDamage = 425, effect = CONST_ME_HITBYPOISON, target = false },
}

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

monster.immunities = {
Expand Down
13 changes: 0 additions & 13 deletions data-canary/scripts/actions/other/blessing_charms.lua

This file was deleted.

11 changes: 0 additions & 11 deletions data-canary/scripts/actions/other/blueberry_bush.lua

This file was deleted.

50 changes: 0 additions & 50 deletions data-canary/scripts/actions/other/clay_lump.lua

This file was deleted.

1 change: 1 addition & 0 deletions data-canary/scripts/actions/other/fluids.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ function fluid.onUse(player, item, fromPosition, target, toPosition, isHotkey)
item:transform(item:getId(), 0)
end
end

return true
end

Expand Down
16 changes: 0 additions & 16 deletions data-canary/scripts/actions/other/piggy_bank.lua

This file was deleted.

9 changes: 0 additions & 9 deletions data-canary/scripts/actions/other/watch.lua

This file was deleted.

Loading

0 comments on commit 6d06e20

Please sign in to comment.