content
stringlengths 5
1.05M
|
|---|
-- marks.nvim
-- A better user experience for viewing and interacting with Vim marks.
-- https://github.com/chentoast/marks.nvim
local marks = require("marks")
marks.setup {}
|
--[[ Copyright (c) 2009 Manuel König
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
local object = {}
object.id = "x_ray"
object.thob = 27
object.research_category = "diagnosis"
object.research_fallback = 39
object.name = _S.object.x_ray
object.tooltip = _S.tooltip.objects.x_ray
object.ticks = false
object.build_preview_animation = 5076
object.default_strength = 12
object.crashed_animation = 3384
object.show_in_town_map = true
local function copy_north_to_south(t)
t.south = t.north
return t
end
object.idle_animations = copy_north_to_south {
north = 1988,
}
object.usage_animations = copy_north_to_south {
north = {
begin_use = { -- Patient walks into X-ray
["Standard Male Patient"] = 1964,
["Standard Female Patient"] = 2948,
["Slack Female Patient"] = 2948,
["Slack Male Patient"] = 5178,
["Elvis Patient"] = 5120,
["Chewbacca Patient"] = 5132,
["Invisible Patient"] = 614,
["Handyman"] = 3558,
},
in_use = { -- Radiation
["Standard Male Patient"] = 1960,
["Standard Female Patient"] = 2952,
["Slack Female Patient"] = 2952,
["Slack Male Patient"] = 5174,
["Elvis Patient"] = 5128,
["Chewbacca Patient"] = 610,
["Invisible Patient"] = 5140,
["Handyman"] = 3562,
},
finish_use = { -- Patient walks away
["Standard Male Patient"] = 1992,
["Standard Female Patient"] = 2956,
["Slack Female Patient"] = 2956,
["Slack Male Patient"] = 5182,
["Elvis Patient"] = 5124,
["Chewbacca Patient"] = 5136, -- or 5138?
["Invisible Patient"] = 618,
["Handyman"] = 3562, -- TODO: Another glitch in the original. This sprite is missing.
},
},
}
object.orientations = {
north = {
use_position = {1, -1},
render_attach_position = {-1, -1},
footprint = { {-2, -2}, {-1, -2},
{-2, -1}, {-1, -1}, {0, -1}, {1, -1, only_passable = true},
{-2, 0}, {-1, 0}, {0, 0} }
},
east = {
use_position = {-1, 1},
render_attach_position = {-1, -1},
footprint = { {-2, -2}, {-1, -2}, {0, -2},
{-2, -1}, {-1, -1}, {0, -1},
{-1, 0}, {0, 0},
{-1, 1, only_passable = true} }
},
}
local anim_mgr = TheApp.animation_manager
anim_mgr:setMarker(object.idle_animations.north, {-2, -2})
return object
|
local AddonName, AddonTable = ...
AddonTable.skinning = {
783, -- Light Hide
2318, -- Light Leather
2319, -- Medium Leather
2934, -- Ruined Leather Scraps
4232, -- Medium Hide
4235, -- Heavy Hide
8154, -- Scorpid Scale
8165, -- Worn Dragonscale
8170, -- Rugged Leather
8171, -- Rugged Hide
15412, -- Green Dragonscale
15414, -- Red Dragonscale
15415, -- Blue Dragonscale
15416, -- Black Dragonscale
17012, -- Core Leather
15408, -- Heavy Scorpid Scale
}
|
local skynet = require "skynet"
local service_name = (...)
local init = {}
function init.init(code, ...)
local start_func
skynet.start = function(f)
start_func = f
end
skynet.dispatch("lua", function() error("No dispatch function") end)
local mainfunc = assert(load(code, service_name))
assert(skynet.pcall(mainfunc,...))
if start_func then
start_func()
end
skynet.ret()
end
skynet.start(function()
skynet.dispatch("lua", function(_,_,cmd,...)
init[cmd](...)
end)
end)
|
--[[------------------------------------------------------------------------
test_zip.lua
test code for luazip
--]]------------------------------------------------------------------------
-- compatibility code for Lua version 5.0 providing 5.1 behavior
if string.find (_VERSION, "Lua 5.0") and not package then
if not LUA_PATH then
LUA_PATH = os.getenv("LUA_PATH") or "./?.lua;"
end
require"compat-5.1"
package.cpath = os.getenv("LUA_CPATH") or "./?.so;./?.dll;./?.dylib"
end
require('zip')
function test_open ()
local zfile, err = zip.open('luazip.zip')
assert(zfile, err)
print("File list begin")
for file in zfile:files() do
print(file.filename)
end
print("File list ended OK!")
print()
print("Testing zfile:open")
local f1, err = zfile:open('README')
assert(f1, err)
local f2, err = zfile:open('luazip.h')
assert(f2, err)
print("zfile:open OK!")
print()
print("Testing reading by number")
local c = f1:read(1)
while c ~= nil do
io.write(c)
c = f1:read(1)
end
print()
print("OK")
print()
end
function test_openfile ()
print("Testing the openfile magic")
local d, err = zip.openfile('a/b/c/d.txt')
assert(d, err)
local e, err = zip.openfile('a/b/c/e.txt')
assert(e == nil, err)
local d2, err = zip.openfile('a2/b2/c2/d2.txt', "ext2")
assert(d2, err)
local e2, err = zip.openfile('a2/b2/c2/e2.txt', "ext2")
assert(e2 == nil, err)
local d3, err = zip.openfile('a3/b3/c3/d3.txt', {"ext2", "ext3"})
assert(d3, err)
local e3, err = zip.openfile('a3/b3/c3/e3.txt', {"ext2", "ext3"})
assert(e3 == nil, err)
print("Smooth magic!")
print()
end
test_open()
test_openfile()
|
-- Load required packages
require 'nn'
require 'optim'
-- Initialise environment and state
env = {}
gridSize = 3
canvas = torch.Tensor(gridSize, gridSize):zero()
-- Create network
nbStates = gridSize * gridSize
hiddenSize = 20
nbActions = 9
model = nn.Sequential()
model:add(nn.Linear(nbStates, hiddenSize))
model:add(nn.ReLU())
model:add(nn.Linear(hiddenSize, hiddenSize))
model:add(nn.ReLU())
model:add(nn.Linear(hiddenSize, nbActions))
-- epsilon-greedy exploration: select action
--[[ Helper function: Chooses a random value between the two boundaries.]] --
function randf(s, e)
return (math.random(0, (e - s) * 9999) / 10000) + s;
end
-- return int to [x][y] coordinate
-- [1 2 3
-- 4 5 6
-- 7 8 9 ]
function coord(num)
if ( num <= 3 ) then
return {1, num}
elseif ( num <= 6 ) then
return {2, num-3}
else
return {3, num-6}
end
end
-- Win Conditions
function checkWinState(canvas, stone)
-- horizontal
for i = 1, 3 do
if ( canvas[i][1] == stone and canvas[i][2] == stone and canvas[i][3] == stone ) then
return true
end
end
-- vertical
for i = 1, 3 do
if ( canvas[1][i] == stone and canvas[2][i] == stone and canvas[3][i] == stone ) then
return true
end
end
-- diagonal
if ( canvas[1][1] == stone and canvas[2][2] == stone and canvas[3][3] == stone ) then
return true
end
if ( canvas[1][3] == stone and canvas[2][2] == stone and canvas[3][1] == stone ) then
return true
end
return false
end
function isMarkable(canvas, coord)
if ( currentState[coord[1]][coord[2]] == 0 ) then
return true
end
return false
end
-- User First
currentState = canvas:clone()
while ( true ) do
action = math.random(1, nbActions)
coordX = coord(action)
if ( isMarkable(currentState, coordX) ) then
break
end
end
-- Update Enviroiment
currentState[coordX[1]][coordX[2]] = -1
-- check state by User
userWinCond = checkWinState(currentState, -1)
function isAllMarked(canvas)
for i= 1, 3 do
for j = 1, 3 do
if ( canvas[i][j] == 0 ) then
return false
end
end
end
return true
end
-- observe reward
reward = 0
winCount = 0
gameOver = false
if ( userWinCond == true ) then
reward = -1
gameOver = true
elseif ( isAllMarked(currentState) ) then
reward = 0.5
gameOver = true
else
-- Bot Later
epsilon = 1
if (randf(0, 1) <= epsilon) then
action = math.random(1, nbActions)
else
q = model:forward(currentState)
_, index = torch.max(q, 1)
action = index[1]
end
coordY = coord(action)
if ( isMarkable(currentState, coordY) ) then
-- Update Environment
nextState = currentState:clone()
nextState[coordY[1]][coordY[2]] = 1
botWinCond = checkWinState(currentState, -1)
if ( botWindCod == true ) then
reward = 1
winCount = winCount + 1
gameOver = true
elseif ( isAllMarked(currentState) ) then
reward = 0.5
gameOver = true
end
else
reward = -10
gameOver= true
end
end
-- Decay the epsilon by multiplying by 0.999, not allowing it to go below a certain threshold.
epsilonMinimumValue = 0.001
if (epsilon > epsilonMinimumValue) then
epsilon = epsilon * 0.999
end
-- Initialise replay memory
memory = {}
-- save an experience to replay memory
table.insert(memory, {
inputState = currentState:view(-1),
action = action,
reward = reward,
nextState = nextState:view(-1),
gameOver = gameOver
});
-- choose mini-batch of transitions
batchSize = 10
memoryLength = #memory
chosenBatchSize = math.min(batchSize, memoryLength)
inputs = torch.Tensor(chosenBatchSize, nbStates):zero()
targets = torch.Tensor(chosenBatchSize, nbActions):zero()
i = 1
-- Choose a random memory experience to add to the batch.
randomIndex = math.random(1, memoryLength)
memoryInput = memory[randomIndex]
-- Calculate Q-value
if (memoryInput.gameOver) then
target[memoryInput.action] = memoryInput.reward
else
discount = 0.9 -- discount factor
-- Gives us Q_sa for all actions
target = model:forward(memoryInput.inputState):clone()
-- reward + discount(gamma) * max_a' Q(s',a')
-- We are setting the Q-value for the action to r + γmax a’ Q(s’, a’).
-- The rest stay the same to give an error of 0 for those outputs.
-- the max q for the next state.
nextStateMaxQ = torch.max(model:forward(memoryInput.nextState), 1)[1]
target[memoryInput.action] = memoryInput.reward + discount * nextStateMaxQ
end
-- Update the inputs and targets.
inputs[i] = memoryInput.inputState
targets[i] = target
-- Train the network which returns the error.
criterion = nn.MSECriterion()
sgdParams = {
learningRate = 0.1,
learningRateDecay = 1e-9,
weightDecay = weightDecay,
momentum = 0.9,
dampening = 0,
nesterov = true
}
loss = 0
x, gradParameters = model:getParameters()
function feval(x_new)
gradParameters:zero()
local predictions = model:forward(inputs)
local loss = criterion:forward(predictions, targets)
local gradOutput = criterion:backward(predictions, targets)
model:backward(inputs, gradOutput)
return loss, gradParameters
end
_, fs = optim.sgd(feval, x, sgdParams)
loss = loss + fs[1]
|
--[[
LuiExtended
License: The MIT License (MIT)
--]]
-- Skill names & Tooltips localization
-- Translation by: KiriX
local strings = {
----------------------------------------------------------------
-- INNATE SKILLS -----------------------------------------------
----------------------------------------------------------------
-- Mundus Stones
SI_LUIE_SKILL_MUNDUS_BASIC_LADY = "Повышает ваши магическую и физическую сопротивляемости на |cFFFFFF2752|r.",
SI_LUIE_SKILL_MUNDUS_BASIC_LOVER = "Повышает ваши магическую и физическую проникновение на |cFFFFFF2752|r.",
SI_LUIE_SKILL_MUNDUS_BASIC_LORD = "Повышает ваш макс.запас Здоровья на |cFFFFFF2230|r.",
SI_LUIE_SKILL_MUNDUS_BASIC_MAGE = "Повышает ваш макс.запас Магии на |cFFFFFF2028|r.",
SI_LUIE_SKILL_MUNDUS_BASIC_TOWER = "Повышает ваш макс. Запас сил на |cFFFFFF2028|r.",
SI_LUIE_SKILL_MUNDUS_BASIC_ATRONACH = "Повышает ваше восстановление Магии на |cFFFFFF238|r.",
SI_LUIE_SKILL_MUNDUS_BASIC_SERPENT = "Повышает ваше восстановление Запаса сил на |cFFFFFF238|r.",
SI_LUIE_SKILL_MUNDUS_BASIC_SHADOW = "Повышает ваш критический урон на |cFFFFFF9|r%.",
SI_LUIE_SKILL_MUNDUS_BASIC_RITUAL = "Повышает наносимое вами исцеление на |cFFFFFF10|r%.",
SI_LUIE_SKILL_MUNDUS_BASIC_THIEF = "Повышает ваш рейтинг критического удара Оружием и Заклинаниями на |cFFFFFF1533|r.",
SI_LUIE_SKILL_MUNDUS_BASIC_WARRIOR = "Повышает ваш урон от Оружия на |cFFFFFF238|r.",
SI_LUIE_SKILL_MUNDUS_BASIC_APPRENTICE = "Повышает ваш урон от Заклинаний на |cFFFFFF238|r.",
SI_LUIE_SKILL_MUNDUS_BASIC_STEED = "Повышает вашу скорость передвижения на |cFFFFFF10|r% и восстановление Здоровья на |cFFFFFF238|r.",
-- Player Innate
SI_LUIE_SKILL_RECALL_PENALTY = "Штраф перемещения",
SI_LUIE_SKILL_MOUNTED = "Верхом",
SI_LUIE_SKILL_RESURRECTION_IMMUNITY = "Иммун воскрешения",
SI_LUIE_SKILL_SOUL_GEM_RESURRECTION = "Воскрешение камнем душ",
SI_LUIE_SKILL_STEALTH_STUN = "Стан из невидимости",
SI_LUIE_SKILL_FALL_DAMAGE = "Урон от падения",
SI_LUIE_SKILL_ABSORBING_SKYSHARD = "Поглощение небесного осколка",
SI_LUIE_SKILL_RECEIVING_BOON = "Получение бонуса Мундуса",
SI_LUIE_SKILL_MOUNT_SPRINT = "Галоп",
SI_LUIE_SKILL_BLOCK_STUN = "Стан от блока",
SI_LUIE_SKILL_AYLEID_WELL = "Айлейдский колодец",
SI_LUIE_SKILL_AYLEID_WELL_TP = "Повышение здоровья на |cFFFFFF10|r% в течение |cFFFFFF10|r минут.",
SI_LUIE_SKILL_AYLEID_WELL_FORTIFIED = "Усиленный Айлейдский колодец",
SI_LUIE_SKILL_AYLEID_WELL_FORTIFIED_TP = "Повышение здоровья на |cFFFFFF10|r% в течение |cFFFFFF30|r минут.",
SI_LUIE_SKILL_IMMOBILIZE_IMMUNITY_TP = "Immune to immobilization effects for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_SNARE_IMMOBILIZE_IMMUNITY_TP = "Immune to snare and immobilization effects for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_DODGE_FATIGUE_TP = "Consecutive roll dodging costs |cFFFFFF33|r% more Stamina per stack for the next |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_HIDDEN_TP = "Крадётесь и сокрыты от чужих глаз.\n\nРасходуется Запас сил при движении.",
SI_LUIE_SKILL_INVISIBLE_TP = "Сокрыты от чужих глаз магией или окружающей средой.",
SI_LUIE_SKILL_SPRINT_TP = "Спринт, скорость передвижения увеличена на |cFFFFFF40|r%.\n\nРасходуется Запас сил при движении.",
SI_LUIE_SKILL_GALLOP_TP = "Галоп, скорость передвижения увеличена на |cFFFFFF30|r%.\n\nРасходуется Запас сил ездового животного при движении.",
SI_LUIE_SKILL_BLOCK_TP = "Блокируется атака, получаемый урон снижен и действует иммунитет к оглушающим и отбрасывающим эффектам .",
SI_LUIE_SKILL_RESURRECTION_IMMUNITY_TP = "Reviving. Immune to damage and all negative effects.", -- TODO: Translate
SI_LUIE_SKILL_TAUNT_TP = "Спровоцирован. Этот противник фокусирует все атаки на вас.",
SI_LUIE_SKILL_DISGUISE_TP = "Маскировка. Вы можете быть обнаружены часовыми или выполняя подозрительную деятельность.\n\nПолучение урона снимет вашу маскировку.",
SI_LUIE_SKILL_BATTLE_SPIRIT_TP = "• Здоровье увеличено на |cFFFFFF5000|r\n• Получаемый урон, исцеление и щиты от урона уменьшены на |cFFFFFF50|r%\n• Дальность действия способностей действующих на расстоянии |cFFFFFF28|r метров и более увеличена на |cFFFFFF8|r",
SI_LUIE_SKILL_RECALL_PENALTY_TP = "Вы недавно пользовались перемещением к дорожному святилищу и должно заплатить дополнительное золото, чтобы воспользоваться им вновь.",
SI_LUIE_SKILL_BATTLEGROUND_DESERTER_TP = "You left a Battleground match early and cannot queue again or earn Alliance points from any PvP sources.", -- TODO: Translate
----------------------------------------------------------------
-- ITEM / CONSUMABLE TOOLTIPS ----------------------------------
----------------------------------------------------------------
-- Glyphs
SI_LUIE_SKILL_GLYPH_CRUSHING = "Crushing (Зачарование)",
SI_LUIE_SKILL_GLYPH_DECREASE_HEALTH = "Снижение здоровья",
SI_LUIE_SKILL_GLYPH_HARDENING = "Hardening (Зачарование)",
SI_LUIE_SKILL_GLYPH_WEAKENING = "Weakening (Зачарование)",
SI_LUIE_SKILL_GLYPH_WEAPON_DAMAGE = "Урон от оружия (Зачарование)",
SI_LUIE_SKILL_GLYPH_HARDENING_TP = "Absorbing damage for |cFFFFFF7|r seconds.",
SI_LUIE_SKILL_GLYPH_WEAKENING_TP = "Reduce Weapon and Spell Damage for |cFFFFFF5|r seconds.",
SI_LUIE_SKILL_GLYPH_WEAPON_DAMAGE_TP = "Increase Weapon and Spell Damage for |cFFFFFF5|r seconds.", -- TODO: Translate this block
-- Crafting Station Creation
SI_LUIE_SKILL_CRAFTING_STATION_JEWELRY = "Настройка Ювелирной станции",
SI_LUIE_SKILL_CRAFTING_STATION_BLACKSMITH = "Настройка Кузницы",
SI_LUIE_SKILL_CRAFTING_STATION_CLOTHING = "Настройка Портняжного станка",
SI_LUIE_SKILL_CRAFTING_STATION_WOODWORK = "Настройка Столярного верстака",
-- Consumable / Food / Drink
SI_LUIE_SKILL_POISON_STEALTH_DRAIN = "Яд скрытности",
SI_LUIE_SKILL_POISON_CONSPICUOUS = "Яд обнаружения",
SI_LUIE_SKILL_DRINK_INCREASE = "Повышение",
SI_LUIE_SKILL_REMOVE_TOOLTIP_SCALED_LEVEL = "Сила эффектов зависит от вашего уровня.", -- Note this needs to be an exact match to the description in Crown Crate food/drink items for it to be correctly removed in each localization.
SI_LUIE_SKILL_REMOVE_TOOLTIP_DOUBLE_BLOODY_MARA = "Если вы вампир, кровь, входящая в состав этого напитка, постепенно утоляет ваш голод.\nСила эффектов зависит от вашего уровня.", -- Must be exact match in each localization
SI_LUIE_SKILL_REMOVE_TOOLTIP_HISSMIR = "Этот напиток также дает вам понимание того, какая рыба водится в различных водоемах, и наделяет особым вниманием к местам рыбной ловли поблизости.\nСила эффектов зависит от вашего уровня.", -- Must be exact match in each localization
SI_LUIE_SKILL_ADD_TOOLTIP_HISSMIR = "\n\nЭтот напиток также дает вам понимание того, какая рыба водится в различных водоемах, и наделяет особым вниманием к местам рыбной ловли поблизости.",
SI_LUIE_SKILL_ESO_PLUS_TP = "Увеличивает получаемые Опыт, Золото и Вдохновение на |cffffff10|r%. Увеличивает скорость исследования особенностей на |cffffff10|r%.",
-- Collectible
SI_LUIE_SKILL_COLLECTIBLE_MYSTERY_MEAT = "Mystery Meat",
-- Experience
SI_LUIE_SKILL_EXPERIENCE_HALF_HOUR_TP = "Увеличивает получаемый опыт на |cffffff<<1>>|r% в течение |cffffff30|r минут.",
SI_LUIE_SKILL_EXPERIENCE_HOUR_TP = "Увеличивает получаемый опыт на |cffffff<<1>>|r% в течение |cffffff<<2>>|r <<2[часа/часов]>>.",
SI_LUIE_SKILL_EXPERIENCE_PELINAL = "Увеличивает получаемые Очки Альянса и опыт, получаемый за убийство игроков на |cffffff100|r% в течение |cffffff<<1>>|r <<1[часа/часов]>>.",
-- Misc
SI_LUIE_SKILL_FILLET_FISH = "Чистка рыбы",
SI_LUIE_SKILL_COUNTERFEIT_PARDON_EDICT = "Поддельный указ о помиловании",
SI_LUIE_SKILL_LENIENCY_EDICT = "Указ о смягчении наказания",
SI_LUIE_SKILL_GRAND_AMNESTY_EDICT = "Указ о большой амнистии",
SI_LUIE_SKILL_REVELRY_PIE_TP = "Covered in pie! Delicious!.", -- TODO: Translate
----------------------------------------------------------------
-- EVENT TOOLTIPS ----------------------------------------------
----------------------------------------------------------------
SI_LUIE_SKILL_EVENT_FREEZING = "Вы замерзаете и скорость вашего передвижения замедлена. Найдите костёр, чтобы согреться.",
SI_LUIE_SKILL_EVENT_WARM = "Вы прижимаетесь к ближайшему костру, чтобы согреться. Время замерзания сокращается на |cffffff10|r секунд каждую |cffffff1|r секунду.",
SI_LUIE_SKILL_EVENT_FESTIVAL_GROG = "You are feeling a bit... disoriented.", -- TODO: Translate
SI_LUIE_SKILL_EVENT_FESTIVAL_MINTS = "Вы ОЧЕНЬ замерзли.",
----------------------------------------------------------------
-- MAJOR / MINOR EFFECTS ---------------------------------------
----------------------------------------------------------------
-- Major / Minor Buffs
SI_LUIE_SKILL_MINOR_RESOLVE_TP = "Повышает физическую сопротивляемость на |cffffff1320|r.",
SI_LUIE_SKILL_MAJOR_RESOLVE_TP = "Повышает физическую сопротивляемость на |cffffff5280|r.",
SI_LUIE_SKILL_MINOR_WARD_TP = "Повышает магическую сопротивляемость на |cffffff1320|r.",
SI_LUIE_SKILL_MAJOR_WARD_TP = "Повышает магическую сопротивляемость на |cffffff5280|r.",
SI_LUIE_SKILL_MINOR_FORTITUDE_TP = "Повышает восстановление здоровья на |cffffff10|r%.",
SI_LUIE_SKILL_MAJOR_FORTITUDE_TP = "Повышает восстановление здоровья на |cffffff20|r%.",
SI_LUIE_SKILL_MINOR_ENDURANCE_TP = "Повышает восстановление запаса сил на |cffffff10|r%.",
SI_LUIE_SKILL_MAJOR_ENDURANCE_TP = "Повышает восстановление запаса сил на |cffffff20|r%.",
SI_LUIE_SKILL_MINOR_INTELLECT_TP = "Повышает восстановление магии на |cffffff10|r%.",
SI_LUIE_SKILL_MAJOR_INTELLECT_TP = "Повышает восстановление магии на |cffffff20|r%.",
SI_LUIE_SKILL_MINOR_SORCERY_TP = "Повышает урон от заклинаний на |cffffff10|r%.",
SI_LUIE_SKILL_MAJOR_SORCERY_TP = "Повышает урон от заклинаний на |cffffff20|r%.",
SI_LUIE_SKILL_MINOR_PROPHECY_TP = "Повышает рейтинг критического удара заклинаниями на |cffffff1320|r.",
SI_LUIE_SKILL_MAJOR_PROPHECY_TP = "Повышает рейтинг критического удара заклинаниями на |cffffff2191|r.",
SI_LUIE_SKILL_MINOR_BRUTALITY_TP = "Повышает урон от оружия на |cffffff10|r%.",
SI_LUIE_SKILL_MAJOR_BRUTALITY_TP = "Повышает урон от оружия на |cffffff20|r%.",
SI_LUIE_SKILL_MINOR_SAVAGERY_TP = "Повышает рейтинг критического удара оружием на |cffffff1320|r.",
SI_LUIE_SKILL_MAJOR_SAVAGERY_TP = "Повышает рейтинг критического удара оружием на |cffffff2191|r.",
SI_LUIE_SKILL_MINOR_BERSERK_TP = "Повышает наносимый урон на |cffffff8|r%.",
SI_LUIE_SKILL_MAJOR_BERSERK_TP = "Повышает наносимый урон на |cffffff25|r%.",
SI_LUIE_SKILL_MINOR_FORCE_TP = "Повышает критический урон на |cffffff10|r%.",
SI_LUIE_SKILL_MAJOR_FORCE_TP = "Повышает критический урон на |cffffff15|r%.",
SI_LUIE_SKILL_MINOR_VITALITY_TP = "Повышает получаемое исцеление на |cffffff8|r%.",
SI_LUIE_SKILL_MAJOR_VITALITY_TP = "Повышает получаемое исцеление на |cffffff30|r%.",
SI_LUIE_SKILL_MINOR_MENDING_TP = "Повышает наносимое исцеление на |cffffff8|r%.",
SI_LUIE_SKILL_MAJOR_MENDING_TP = "Повышает наносимое исцеление на |cffffff25|r%.",
SI_LUIE_SKILL_MINOR_PROTECTION_TP = "Снижает получаемый урон на |cffffff8|r%.",
SI_LUIE_SKILL_MAJOR_PROTECTION_TP = "Снижает получаемый урон на |cffffff30|r%.",
SI_LUIE_SKILL_MINOR_EVASION_TP = "Снижает получаемый урон от атак по площади на |cffffff10|r%.",
SI_LUIE_SKILL_MAJOR_EVASION_TP = "Снижает получаемый урон от атак по площади на |cffffff25|r%.",
SI_LUIE_SKILL_MINOR_EXPEDITION_TP = "Повышает скорость передвижения на |cffffff10|r%.",
SI_LUIE_SKILL_MAJOR_EXPEDITION_TP = "Повышает скорость передвижения на |cffffff30|r%.",
SI_LUIE_SKILL_MAJOR_GALLOP_TP = "Повышает скорость передвижения верхом на |cffffff30|r%.",
SI_LUIE_SKILL_MINOR_HEROISM_TP = "Даёт |cffffff1|r очков ульты каждые |cffffff1.5|r секунды.",
SI_LUIE_SKILL_MAJOR_HEROISM_TP = "Даёт |cffffff3|r очков ульты каждые |cffffff1.5|r секунды.",
SI_LUIE_SKILL_MINOR_TOUGHNESS_TP = "Повышает здоровье на |cffffff10|r%.",
SI_LUIE_SKILL_MINOR_COURAGE_TP = "Повышает урон от оружия и заклинаний на |cffffff129|r.",
SI_LUIE_SKILL_MAJOR_COURAGE_TP = "Повышает урон от оружия и заклинаний на |cffffff258|r.",
-- Major / Minor Debuffs
SI_LUIE_SKILL_MINOR_BREACH_TP = "Снижает магическую сопротивляемость на |cffffff1320|r.",
SI_LUIE_SKILL_MAJOR_BREACH_TP = "Снижает магическую сопротивляемость на |cffffff5280|r.",
SI_LUIE_SKILL_MINOR_FRACTURE_TP = "Снижает физическую сопротивляемость на |cffffff1320|r.",
SI_LUIE_SKILL_MAJOR_FRACTURE_TP = "Снижает физическую сопротивляемость на |cffffff5280|r.",
SI_LUIE_SKILL_MAJOR_FRACTURE_NPC_TP = "Снижает физическую сопротивляемость на |cffffff4000|r.",
SI_LUIE_SKILL_MINOR_VULNERABILITY_TP = "Увеличивает получаемый урон на |cffffff8|r%.",
SI_LUIE_SKILL_MAJOR_VULNERABILITY_TP = "Увеличивает получаемый урон на |cffffff30|r%.",
SI_LUIE_SKILL_MINOR_MAIM_TP = "Снижает наносимый урон на |cffffff15|r%.",
SI_LUIE_SKILL_MAJOR_MAIM_TP = "Снижает наносимый урон на |cffffff30|r%.",
SI_LUIE_SKILL_MINOR_DEFILE_TP = "Снижает получаемое исцеление и восстановление здоровья на |cffffff15|r%.",
SI_LUIE_SKILL_MAJOR_DEFILE_TP = "Снижает получаемое исцеление и восстановление здоровья на |cffffff30|r%.",
SI_LUIE_SKILL_MINOR_MAGICKASTEAL_TP = "Восстанавливает |cffffff300|r магии каждую |cffffff1|r секунду, при получении урона.",
SI_LUIE_SKILL_MINOR_LIFESTEAL_TP = "Восстанавливает |cffffff600|r здоровья каждую |cffffff1|r секунду, при получении урона.",
SI_LUIE_SKILL_MINOR_ENERVATION_TP = "Снижает критический урон на |cffffff10|r%.",
SI_LUIE_SKILL_MINOR_UNCERTAINTY_TP = "Снижает рейтинг критического удара оружием и заклинаниями на |cffffff657|r.",
SI_LUIE_SKILL_MINOR_COWARDICE_TP = "Увеличивает стоимость абсолютной способности на |cffffff60|r%.",
SI_LUIE_SKILL_MINOR_MANGLE_TP = "Снижает макс. здоровье на |cffffff10|r%.",
SI_LUIE_SKILL_HINDRANCE_TP = "Снижает скорость передвижения на |cffffff40|r%.",
-- Slayer / Aegis
SI_LUIE_SKILL_MINOR_SLAYER_TP = "Ваши атаки наносят на |cffffff5|r% больше урона по противникам в Подземельях, Испытаниях и на Аренах.",
SI_LUIE_SKILL_MAJOR_SLAYER_TP = "Ваши атаки наносят на |cffffff15|r% больше урона по противникам в Подземельях, Испытаниях и на Аренах.",
SI_LUIE_SKILL_MINOR_AEGIS_TP = "Вы получаете на |cffffff5|r% меньше урона от противников в Подземельях, Испытаниях и на Аренах.",
SI_LUIE_SKILL_MAJOR_AEGIS_TP = "Вы получаете на |cffffff15|r% меньше урона от противников в Подземельях, Испытаниях и на Аренах.",
-- Empower
SI_LUIE_SKILL_EMPOWER_TP = "Увеличивает урон от вашей следующей обычной атаки на |cffffff40|r%.",
----------------------------------------------------------------
-- CHAMPION POINT SKILLS ---------------------------------------
----------------------------------------------------------------
SI_LUIE_SKILL_PHASE_TP = "Повышает Физическую и Магическую сопротивляемости на |cFFFFFF660|r в течение |cFFFFFF3|r секунд.",
SI_LUIE_SKILL_UNCHAINED_TP = "Снижает расход Запаса сил на вашу следующую способность, применённую в течение |cFFFFFF5|r секунд на |cFFFFFF80|r%.",
SI_LUIE_SKILL_FORESIGHT_TP = "Снижает расход Магии на вашу следующую способность, применённую в течение |cFFFFFF7|r секунд на |cFFFFFF80|r%.",
SI_LUIE_SKILL_RETALIATION_TP = "Ваша следующая Обычная атака, проведённая в течение |cFFFFFF7|r секунд наносит |cFFFFFF30|r% дополнительного урона.",
SI_LUIE_SKILL_OPPORTUNIST_TP = "Ваша следующая способность, наносящая Физический урон, применённая в течение |cFFFFFF7|r секунд наносит |cFFFFFF15|r% дополнительного урона.",
SI_LUIE_SKILL_SIPHONER_TP = "Снижает Здоровье, Магию и Запас сил, а также их восстановление на |cFFFFFF3|r секунд.",
SI_LUIE_SKILL_VENGEANCE_TP = "Ваша следующая способность, расходующая магию, применённая в течение |cFFFFFF5|r секунд обязательно нанесёт Критический удар.",
SI_LUIE_SKILL_VENGEANCE_CHARGE = "Месть",
----------------------------------------------------------------
-- GENERIC / SHARED TOOLTIPS -----------------------------------
----------------------------------------------------------------
-- Test Effect
SI_LUIE_SKILL_TEST_TP = "Это тестовый эффект.",
-- Damage over Time / Heal over Time
SI_LUIE_SKILL_GENERIC_DOT_NO_TICK_TP = "Afflicted with SUBSTRING over time for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_DOT_TP = "Afflicted with SUBSTRING every |cFFFFFF<<2>>|r <<2[second/seconds]>> for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_HOT_TP = "Healing every |cFFFFFF<<2>>|r <<2[second/seconds]>> for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_HOT_POTION_TP = "Healing every |cFFFFFF1|r second for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_HOT_CHANNEL_TP = "Healing every |cFFFFFF<<2>>|r <<2[second/seconds]>> for |cFFFFFF<<1>>|r <<1[second/seconds]>> while the channel is maintained.",
-- Ground over Time
SI_LUIE_SKILL_GENERIC_GROUND_AOE_TP = "Taking SUBSTRING every |cFFFFFF<<2>>|r <<2[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_GROUND_HEAL_TP = "Healing every |cFFFFFF<<2>>|r <<2[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_GROUND_AOE_SNARE_TP = "Taking SUBSTRING every |cFFFFFF<<2>>|r <<2[second/seconds]>> and Movement Speed reduced by |cFFFFFF<<3>>|r%.",
-- Resistances
SI_LUIE_SKILL_GENERIC_PHYSICAL_RESIST_TP = "Increase Physical Resistance for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_GENERIC_SPELL_RESIST_NO_DUR_TP = "Increase Spell Resistance.",
SI_LUIE_SKILL_GENERIC_PHY_SPELL_RESIST = "Повышает Физическую и Магическую сопротивляемости на |cffffff<<1>>|r секунд.",
SI_LUIE_SKILL_GENERIC_PHY_SPELL_RESIST_NO_DUR_TP = "Increase Physical and Spell Resistance.",
SI_LUIE_SKILL_GENERIC_PHY_SPELL_RESIST_NO_DUR_VALUE_TP = "Increase Physical and Spell Resistance by |cFFFFFF<<2>>|r.",
SI_LUIE_SKILL_GENERIC_REDUCE_PHY_SPELL_RESIST_TP = "Reduce Physical and Spell Resistance for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_GENERIC_REDUCE_PHY_SPELL_RESIST_NO_DUR_TP = "Reduce Physical and Spell Resistance.",
-- Resource Regeneration, Shields
SI_LUIE_SKILL_GENERIC_HEALTH_RECOVERY_TP = "Increase Health Recovery for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_GENERIC_MGK_REGEN_TP = "Restoring Magicka every |cFFFFFF<<2>>|r <<2[second/seconds]>> for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_MGK_REGEN_POTION_TP = "Restoring Magicka every |cFFFFFF1|r second for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_STAM_REGEN_TP = "Restoring Stamina every |cFFFFFF<<2>>|r <<2[second/seconds]>> for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_STAM_REGEN_POTION_TP = "Restoring Stamina every |cFFFFFF1|r second for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_DAMAGE_SHIELD_NO_DUR_TP = "Поглощение урона.",
SI_LUIE_SKILL_GENERIC_DAMAGE_SHIELD_TP = "Поглощение урона в течение |cFFFFFF<<1>>|r секунд.", -- TODO: End - Translate this Block
-- Stealth / Detection
SI_LUIE_SKILL_GENERIC_MARKED_TP = "Помечен на |cFFFFFF<<1>>|r секунд. Вы видны для противника, который пометил вас, даже если уходите в скрытность.",
SI_LUIE_SKILL_GENERIC_REVEAL_TP = "Обнаружен на |cFFFFFF<<1>>|r секунд. Вы не можете уйти в невидимость.",
SI_LUIE_SKILL_GENERIC_REVEAL_NO_DUR_TP = "Revealed. You are unable to stealth.", -- TODO: Translate
SI_LUIE_SKILL_GENERIC_INVISIBILITY_TP = "Invisible for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_DETECTION_POTION_TP = "Stealth Detection increased by |cffffff20|r meters for |cFFFFFF<<1>>|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_GENERIC_DETECTION_NPC_TP = "Revealing nearby stealthed and invisible enemies.", -- TODO: Translate
-- Crowd Control / Immunity
SI_LUIE_SKILL_GENERIC_OFF_BALANCE_IMMUNITY_TP = "Иммунитет к эффектам, которые выводят из равновесия и делают уязвимым.",
SI_LUIE_SKILL_GENERIC_OFF_BALANCE_TP = "Off Balance for |cFFFFFF<<1>>|r <<1[second/seconds]>>.", -- TODO: Translate this Block
SI_LUIE_SKILL_GENERIC_SNARE_TP = "Movement Speed reduced by |cFFFFFF<<2>>|r% for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_SNARE_NO_DUR_TP = "Movement Speed reduced by |cFFFFFF<<2>>|r%.",
SI_LUIE_SKILL_GENERIC_IMMOBILIZE_TP = "Immobilized for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_IMMOBILIZE_NO_DUR_TP = "Immobilized.",
SI_LUIE_SKILL_GENERIC_STAGGER_TP = "Staggered.",
SI_LUIE_SKILL_GENERIC_STUN_TP = "Stunned for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_STUN_NO_DUR_TP = "Stunned.",
SI_LUIE_SKILL_GENERIC_LEVITATE_TP = "Levitated for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_KNOCKBACK_TP = "Knocked back for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_KNOCKDOWN_TP = "Knocked down for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_FEAR_TP = "Feared for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_FEAR_NO_DUR_TP = "Feared.",
SI_LUIE_SKILL_GENERIC_SILENCE_TP = "Silenced for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_GENERIC_SILENCE_NO_DUR_TP = "Silenced.", -- TODO: END - Translate this Block
SI_LUIE_SKILL_GENERIC_BLIND_TP = "Ослеплён на |cFFFFFF<<1>>|r секунд. |cffffff100|r% шанс пропустить все атаки.",
SI_LUIE_SKILL_GENERIC_CC_IMMUNITY_TP = "Иммунитет к отбрасыванию и прочим ограничивающим эффектам на |cFFFFFF<<1>>|r секунд.",
SI_LUIE_SKILL_GENERIC_SCARY_IMMUNITIES_TP = "Immune to all crowd control and movement impairing effects.", -- TODO: Translate
SI_LUIE_SKILL_GENERIC_FLYING_IMMUNITIES_TP = "Immune to movement imparing effects.", -- TODO: Translate
SI_LUIE_SKILL_SET_GENERIC_IMMUNITY_TP = "Immune to damage and all negative effects for |cffffff<<1>>|r <<1[second/seconds]>>.", -- TODO: Translate
SI_LUIE_SKILL_GENERIC_DISORIENT_TP = "Disoriented for |cffffff<<1>>|r <<1[second/seconds]>>.", -- TODO: Translate
-- Ravage Potions / Poisons
SI_LUIE_SKILL_GENERIC_RAVAGE_MAGICKA_POTION_TP = "Увеличивает стоимость способностей, расходующих Магию на |cffffff60|r%.",
SI_LUIE_SKILL_GENERIC_RAVAGE_STAMINA_POTION_TP = "Увеличивает стоимость способностей, расходующих Запас сил на |cffffff60|r%.",
SI_LUIE_SKILL_GENERIC_RAVAGE_MAGICKA_POISON_TP = "Увеличивает стоимость способностей, расходующих Магию на |cffffff10|r%.",
SI_LUIE_SKILL_GENERIC_RAVAGE_STAMINA_POISON_TP = "Увеличивает стоимость способностей, расходующих Запас сил на |cffffff10|r.%",
-- Generic Stat Buffs
SI_LUIE_SKILL_SET_GENERIC_WEP_SPELL_DAMAGE_TIME_TP = "Увеличивает урон от Оружия и Заклинаний на |cffffff<<1>>|r секунд.",
SI_LUIE_SKILL_SET_GENERIC_WEP_DAMAGE_TIME_TP = "Увеличивает урон от Оружия на |cffffff<<1>>|r секунд.",
SI_LUIE_SKILL_SET_GENERIC_SPELL_DAMAGE_TIME_TP = "Увеличивает урон от Заклинаний на |cffffff<<1>>|r секунд.",
SI_LUIE_SKILL_SET_GENERIC_LA_HA_DAMAGE = "Ваши обычные и силовые атаки наносят дополнительный урон в течение |cffffff<<1>>|r секунд.",
SI_LUIE_SKILL_SET_GENERIC_MAG_RECOVERY_TIME_TP = "Увеличивает восстановление Магии на |cffffff<<1>>|r секунд.",
SI_LUIE_SKILL_GENERIC_ENRAGE = "Increase damage done by |cFFFFFF<<2>>|r% for |cffffff<<1>>|r seconds.",
SI_LUIE_SKILL_GENERIC_ENRAGE_NO_DUR = "Increase damage done by |cFFFFFF<<2>>|r%.",
SI_LUIE_SKILL_GENERIC_ENRAGE_DAMAGE_TAKEN_NO_DUR = "Increase damage done by |cFFFFFF<<2>>|r% and increase damage taken by |cFFFFFF<<3>>|r%.",
SI_LUIE_SKILL_GENERIC_ENRAGE_DAMAGE_REDUCE_NO_DUR = "Increase damage done by cFFFFFF<<2>>|r% and reduce damage taken by |cFFFFFF<<3>>|r%.",
----------------------------------------------------------------
-- CLASS SKILLS ------------------------------------------------
----------------------------------------------------------------
-- Dragonknight Skills
SI_LUIE_SKILL_SEETHING_FURY_TP = "Increase the damage of your next Molten Whip by |cffffff33|r% and your Weapon and Spell Damage by |cffffff125|r for |cffffff<<1>>|r seconds.\n\nThis effect can stack up to |cffffff3|r times.",
SI_LUIE_SKILL_VENOMOUS_CLAW_TP = "Afflicted with Poison Damage every |cFFFFFF2|r seconds for |cffffff<<1>>|r seconds.\n\nDeals |cFFFFFF12|r% increased damage every |cFFFFFF2|r seconds.",
SI_LUIE_SKILL_BURNING_EMBERS_TP = "Подвержен урону от Огня каждые |cFFFFFF2|r секунды в течение |cffffff<<1>>|r секунд.\n\nИсцеляет рыцаря-дракона на |cffffff75|r% от нанесённого урона по завершению действия эффекта.",
SI_LUIE_SKILL_ENGULFING_FLAMES_TP = "Подвержен урону от Огня каждые |cFFFFFF2|r секунды в течение |cffffff<<1>>|r секунд.\n\nIncrease damage taken from Fire Damage attacks by |cffffff10|r%.",
SI_LUIE_SKILL_ENGULFING_FLAMES_DUMMY_TP = "Increase damage taken from Fire Damage attacks by |cffffff10|r%.",
SI_LUIE_SKILL_INFERNO_TP = "Запускает в ближайшего противника огненный шар, наносящий урон от Огня каждые |cffffff5|r секунд в течение |cffffff15|r секунд.",
SI_LUIE_SKILL_FLAMES_OF_OBLIVION_TP = "Launch a fireball at |cffffff2|r enemies, dealing Flame Damage every |cffffff5|r seconds for |cffffff15|r seconds.",
SI_LUIE_SKILL_CAUTERIZE_TP = "Запускает в ближайшего союзника огненный шар, чтобы прижечь его раны, каждые |cffffff5|r секунды в течение |cffffff15|r секунд.",
SI_LUIE_SKILL_DRAGONKIGHT_STANDARD_TP = "Enemies within the radius of the standard take Flame Damage every |cffffff1|r second and have Major Defile applied to them.", -- TODO: Translate
SI_LUIE_SKILL_STANDARD_OF_MIGHT_TP = "Увеличивает наносимый урон и снижает получаемый урон, пока находитесь в радиусе действия штандарта.",
SI_LUIE_SKILL_SPIKED_ARMOR_TP = "Return Magic Damage to any enemy that uses a direct damage attack against you for |cffffff<<1>>|r seconds.",
SI_LUIE_SKILL_HARDENED_ARMOR_TP = "Return Magic Damage to any enemy that uses a direct damage attack against you for |cffffff<<1>>|r seconds.\n\nAbsorbing damage for |cffffff6|r seconds.",
SI_LUIE_SKILL_BURNING_TALONS_TP = "Afflicted with Flame Damage every |cFFFFFF1|r second and immobilized for |cffffff<<1>>|r seconds.",
SI_LUIE_SKILL_PROTECTIVE_SCALE_TP = "Reduce damage taken from projectiles by |cffffff50|r% for |cffffff6|r seconds.",
SI_LUIE_SKILL_PROTECTIVE_PLATE_TP = "Reduce damage taken from projectiles by |cffffff50|r% for |cffffff6|r seconds.\n\nImmune to snare and immobilization effects for |cffffff2|r seconds.",
SI_LUIE_SKILL_DRAGON_FIRE_SCALE_TP = "Reduce damage taken from projectiles by |cffffff50|r% for |cffffff6|r seconds.\n\nWhen you are hit with a projectile, you retaliate by launching a fiery orb at the attacker that deals Flame Damage. This effect can occur once every half second.",
SI_LUIE_SKILL_INHALE_TP = "After |cffffff2.5|r seconds, you exhale fire, dealing Flame Damage to enemies within |cFFFFFF8|r meters.", -- TODO: Translate
SI_LUIE_SKILL_DRAW_ESSENCE_TP = "After |cffffff2.5|r seconds, you exhale fire, dealing Flame Damage to enemies within |cFFFFFF8|r meters and restoring |cffffff10|r% of the ability's cost for each enemy hit as Magicka.", -- TODO: Translate
SI_LUIE_SKILL_MOLTEN_ARMAMENTS_TP = "Увеличивает урон полностью заряженных Силовых атак на |cffffff40|r% в течение |cffffff<<1>>|r секунд.",
SI_LUIE_SKILL_PETRIFY_STUN_TP = "Обращён в камень и оглушён на |cffffff<<1>>|r секунд. Вы не можете атаковать или двигаться во время оглушения.\n\nПо окончанию действия оглушения, получаете Магический урон.",
SI_LUIE_SKILL_FOSSILIZE_STUN_TP = "Stunned for |cFFFFFF<<1>>|r <<1[second/seconds]>>.\n\nWhen the stun ends, take Magic Damage and become immobilized for |cffffff3|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_SHATTERING_ROCKS_STUN_TP = "Stunned for |cFFFFFF<<1>>|r <<1[second/seconds]>>.\n\nWhen the stun ends, take Magic Damage and your next attack used within |cffffff4|r seconds heals your target.", -- TODO: Translate
SI_LUIE_SKILL_SHATTERING_ROCKS_TP = "Your next attack used within |cffffff<<1>>|r seconds heals your target.", -- TODO: Translate
SI_LUIE_SKILL_ASH_CLOUD_TP = "Enemies in the ash cloud have their Movement Speed reduced by |cffffff70|r%, while you and allies are healed every |cffffff1|r second.", -- TODO: Translate
SI_LUIE_SKILL_ERUPTION_TP = "Enemies in the ash cloud have their Movement Speed reduced by |cffffff70|r% and take Flame Damage every |cffffff1|r second.", -- TODO: Translate
SI_LUIE_SKILL_MAGMA_ARMOR_TP = "Incoming damage is limited to |cffffff3|r% of your Max Health and nearby enemies take Flame Damage every |cffffff1|r second for |cffffff<<1>>|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_CORROSIVE_ARMOR_TP = "Incoming damage is limited to |cffffff3|r% of your Max Health and nearby enemies take Poison Damage every |cffffff1|r second for |cffffff<<1>>|r seconds.\n\nWhile active, your attacks ignore all Physical Resistance.", -- TODO: Translate
-- Nightblade Skills
SI_LUIE_SKILL_DEATH_STROKE_DEBUFF = "Увеличивает урон, получаемый от Клинка ночи на |cFFFFFF20|r% в течение |cFFFFFF6|r секунд.",
SI_LUIE_SKILL_INCAPACITATING_STRIKE = "Increase damage taken from the Nightblade by |cFFFFFF20|r% for |cFFFFFF6|r seconds.\n\nSilenced for |cFFFFFF3|r seconds.",
SI_LUIE_SKILL_SURPRISE_ATTACK_TP = "Reduce Physical Resistance by |cFFFFFF5|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_SHADOWY_DISGUISE_TP = "Invisible for |cFFFFFF<<2>>|r <<2[second/seconds]>>.\n\nYour next direct damage attack used within |cFFFFFF<<1>>|r seconds will always be a Critical Strike.",
SI_LUIE_SKILL_GRIM_FOCUS_TP = "For |cFFFFFF<<1>>|r seconds, hitting an enemy with |cFFFFFF5|r Light or Heavy Attacks changes this ability into Assassin's Will, allowing you to fire a single shot from a spectral bow for half cost at an enemy to deal Magic Damage.\n\nEach stack reduces damage taken by |cFFFFFF3|r%, persisting even after <<2>> fades as long as you remain in combat.\n\nStacks are lost when firing the spectral bow.",
SI_LUIE_SKILL_RELENTLESS_FOCUS_TP = "For |cFFFFFF<<1>>|r seconds, hitting an enemy with |cFFFFFF5|r Light or Heavy Attacks changes this ability into Assassin's Scourge, allowing you to fire a single shot from a spectral bow for half cost at an enemy to deal Disease Damage.\n\nEach stack reduces damage taken by |cFFFFFF3|r%, persisting even after <<2>> fades as long as you remain in combat.\n\nStacks are lost when firing the spectral bow.",
SI_LUIE_SKILL_GRIM_FOCUS_DEFENSE_TP = "Reduce damage taken by |cFFFFFF3|r%, stacking up to |cFFFFFF5|r times.\n\nStacks are lost when firing the spectral bow or exiting combat.",
SI_LUIE_SKILL_PATH_OF_DARKNESS_TP = "You and allies in the corridor of shadows gain Major Expedition for |cFFFFFF4|r seconds every |cFFFFFF1|r second.", -- TODO: Translate
SI_LUIE_SKILL_TWISTING_PATH_TP = "You and allies in the corridor of shadows gain Major Expedition for |cFFFFFF4|r seconds every |cFFFFFF1|r second, while enemies in the area take Magic Damage every |cFFFFFF1|r second.", -- TODO: Translate
SI_LUIE_SKILL_REFRESHING_PATH_TP = "You and allies in the corridor of shadows gain Major Expedition for |cFFFFFF4|r seconds, and heal every |cFFFFFF1|r second for |cFFFFFF2|r seconds.\n\nThis effect is reapplied every |cFFFFFF1|r second.", -- TODO: Translate
SI_LUIE_SKILL_MANIFESTATION_OF_TERROR_TP = "Взрывается, когда близко подходит противник, призывая тёмного духа, который пугает до |cFFFFFF6|r противников на |cFFFFFF4|r секунды.",
SI_LUIE_SKILL_SUMMON_SHADE_TP = "Ваша теневая копия сражается на вашей стороне в течение |cFFFFFF<<1>>|r секунд.",
SI_LUIE_SKILL_SHADOW_IMAGE_TP = "Ваша теневая копия стоит на месте и атакует противников на расстоянии в течение |cFFFFFF<<1>>|r секунд.\n\nПока тень призвана, вы можете активировать способность снова, чтобы переместиться к тени.",
SI_LUIE_SKILL_CORROSIVE_SPIN_TP = "Corrosive Spin",
SI_LUIE_SKILL_HIDDEN_REFRESH_TP = "Invisible, healing every |cFFFFFF0.5|r seconds, and Movement Speed increased by |cFFFFFF70|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_CONSUMING_DARKNESS_TP = "Enemies in the ring of shadow have their Movement Speed reduced by |cFFFFFF70|r%, while you and allies gain Major Protection.\n\nAllies in the area can activate the |cFFFFFFHidden Refresh|r synergy.", -- TODO: Translate
SI_LUIE_SKILL_BOLSTERING_DARKNESS_TP = "Enemies in the ring of shadow have their Movement Speed reduced by |cFFFFFF70|r%, while you and allies gain Major Protection in the ring and even after leaving it.\n\nAllies in the area can activate the |cFFFFFFHidden Refresh|r synergy.", -- TODO: Translate
SI_LUIE_SKILL_VEIL_OF_BLADES_TP = "Enemies in the ring of shadow have their Movement Speed reduced by |cFFFFFF70|r% and take Magic Damage every |cFFFFFF1|r second, while you and allies gain Major Protection.\n\nAllies in the area can activate the |cFFFFFFHidden Refresh|r synergy.", -- TODO: Translate
SI_LUIE_SKILL_MALEVOLENT_OFFERING_TP = "Высасывает здоровье каждую |cFFFFFF1|r секунду в течение |cFFFFFF<<1>>|r секунд.",
SI_LUIE_SKILL_CRIPPLE_TP = "Afflicted with Magic Damage every |cFFFFFF2|r seconds for |cFFFFFF10|r seconds.\n\nMovement Speed reduced by |cFFFFFF<<2>>|r% for |cFFFFFF4|r seconds.",
SI_LUIE_SKILL_CRIPPLING_GRASP_TP = "Afflicted with Magic Damage every |cFFFFFF2|r seconds for |cFFFFFF10|r seconds.\n\nMovement Speed reduced by |cFFFFFF30|r% for |cFFFFFF4|r seconds.\n\nImmobilized for |cFFFFFF2|r seconds.",
SI_LUIE_SKILL_SIPHONING_STRIKES_TP = "Ваши обычные и силовые атаки исцеляют вас в течение |cFFFFFF20|r секунд. Полностью заряженная силовая атака исцеляет в два раза больше.",
SI_LUIE_SKILL_LEECHING_STRIKES_TP = "Ваши обычные и силовые атаки исцеляют вас и восстанавливают Запас сил в течение |cFFFFFF20|r секунд. Полностью заряженная силовая атака восстанавливает в два раза больше ресурсов.\n\nВы восстанавливаете дополнительно до |cFFFFFF4270|r Запаса сил по истечению эффекта, в зависимости от времени действия Leeching Strikes.",
SI_LUIE_SKILL_SIPHONING_ATTACKS_TP = "Ваши обычные и силовые атаки исцеляют вас и восстанавливают Магию в течение |cFFFFFF20|r секунд. Полностью заряженная силовая атака восстанавливает в два раза больше ресурсов.\n\nВы восстанавливаете дополнительно до |cFFFFFF4270|r Магии по истечению эффекта, в зависимости от времени действия Siphoning Attacks.",
SI_LUIE_SKILL_SOUL_TETHER_TP = "Afflicted with Magic Damage every |cFFFFFF1|r second for |cFFFFFF8|r seconds.\n\nStunned for |cFFFFFF4|r seconds.",
SI_LUIE_SKILL_REFRESHING_PATH_GROUND = "Healing every |cFFFFFF1|r second.\n\nThe effect persists for |cFFFFFF2|r seconds after leaving the path.",
-- Sorcerer
SI_LUIE_SKILL_PERSISTENCE = "Reduce the cost of your next Magicka or Stamina ability used within |cFFFFFF4|r seconds by |cFFFFFF<<1>>|r%.", -- TODO: Translate
SI_LUIE_SKILL_CRYSTAL_FRAGMENTS_TP = "Ваше следующее применение Crystal Fragments в течение |cFFFFFF<<1>>|r секунд происходит мгновенно, наносит на |cFFFFFF20|r% больше урона, и расходует на |cFFFFFF50|r% меньше Магии.",
SI_LUIE_SKILL_SHATTERING_PRISON_TP = "Immobilized for |cFFFFFF<<1>>|r <<1[second/seconds]>>.\n\nThe shards deal Magic Damage when the effect ends.", -- TODO: Translate
SI_LUIE_SKILL_RUNE_CAGE_TP = "Imprisoned in a sphere of dark magic and stunned for |cFFFFFF<<1>>|r seconds.\n\nDeals Magic Damage if the stun lasts the full duration.", -- TODO: Translate
SI_LUIE_SKILL_DEFENSIVE_RUNE_TP = "Следующий противник, который атакует вас, окажется заперт в тесную сферу тёмной магии, оглушающую вскоре его на |cFFFFFF3|r секунды.",
SI_LUIE_SKILL_DAEDRIC_MINES_TP = "Взрывается, когда близко подходит противник, нанося Магический урон и обездвиживая его на |cFFFFFF1.5|r секунды.",
SI_LUIE_SKILL_NEGATE_MAGIC_TP = "Enemies in the globe are stunned.\n\nEnemy players will be silenced rather than stunned.", -- TODO: Translate
SI_LUIE_SKILL_SUPPRESSION_FIELD_TP = "Enemies in the globe are stunned and take Magic Damage every |cFFFFFF0.5|r seconds.\n\nEnemy players will be silenced rather than stunned.", -- TODO: Translate
SI_LUIE_SKILL_ABSORPTION_FIELD_TP = "Enemies in the globe are stunned, while you and allies are healed every |cFFFFFF0.5|r seconds.\n\nEnemy players will be silenced rather than stunned.", -- TODO: Translate
SI_LUIE_SKILL_UNSTABLE_FAMILIAR_TP = "Unstable Familiar сражается на вашей стороне. Нестабильный прислужник останется, пока не будет убит или отозван.",
SI_LUIE_SKILL_UNSTABLE_CLANNFEAR_TP = "Unstable Clannfear сражается на вашей стороне. Нестабильный кланфир останется, пока не будет убит или отозван.",
SI_LUIE_SKILL_VOLATILE_FAMILIAR_TP = "Volatile Familiar сражается на вашей стороне. Взрывной прислужник останется, пока не будет убит или отозван.",
SI_LUIE_SKILL_FAMILIAR_DAMAGE_PULSE_SELF_TP = "Your familiar is pulsing waves of unstable electricity, dealing Shock Damage to nearby enemies every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_FAMILIAR_DAMAGE_PULSE_TP = "Pulsing waves of unstable electricity, dealing Shock Damage to nearby enemies every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_FAMILIAR_DAMAGE_PULSE_SELF_STUN_TP = "Your familiar is pulsing waves of volatile electricity, dealing Shock Damage to nearby enemies every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nThe final pulse will stun all enemies hit for |cFFFFFF3|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_FAMILIAR_DAMAGE_PULSE_STUN_TP = "Pulsing waves of volatile electricity, dealing Shock Damage to nearby enemies every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nThe final pulse will stun all enemies hit for |cFFFFFF3|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_UNSTABLE_PULSE = "Нестабильное пульсирование",
SI_LUIE_SKILL_VOLATILE_PULSE = "Переменное пульсирование",
SI_LUIE_SKILL_DAEDRIC_CURSE_TP = "After |cFFFFFF6|r seconds the rune detonates, dealing Magic Damage to you and nearby allies.", -- TODO: Translate
SI_LUIE_SKILL_DAEDRIC_PREY_TP = "After |cFFFFFF6|r seconds the rune detonates, dealing Magic Damage to you and nearby allies.\n\nWhile the curse is active, the Sorcerer's pets deal an additional |cFFFFFF55|r% damage to you.", -- TODO: Translate
SI_LUIE_SKILL_HAUNTING_CURSE_TP = "After |cFFFFFF3.5|r seconds the rune detonates, dealing Magic Damage and splashing to nearby allies.\n\nThe curse will apply a second time, detonating again after |cFFFFFF8.5|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_WINGED_TWILIGHT_TP = "Winged Twilight сражается на вашей стороне. Крылатый сумрак останется, пока не будет убит или отозван.",
SI_LUIE_SKILL_TWILIGHT_TORMENTOR_TP = "Twilight Tormentor сражается на вашей стороне. Сумрак-мучитель останется, пока не будет убит или отозван.",
SI_LUIE_SKILL_TWILIGHT_MATRIARCH_TP = "Twilight Matriarch сражается на вашей стороне. Сумрак-матриарх останется, пока не будет убит или отозван.",
SI_LUIE_SKILL_TORMENTOR_DAMAGE_BOOST_SELF_TP = "Increase Twilight Tormentor damage against enemies above |cFFFFFF50|r% Health by |cFFFFFF53|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_TORMENTOR_DAMAGE_BOOST_TP = "Increase damage against enemies above |cFFFFFF50|r% Health by |cFFFFFF53|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_BOUND_ARMOR_TP = "Увеличивает на |cFFFFFF36|r% блокируемый урон на |cFFFFFF3|r секунды.",
SI_LUIE_SKILL_ATRONACH_ZAP_TP = "Afflicted with Shock Damage every |cFFFFFF1|r second and Movement Speed reduced by |cFFFFFF50|r% for |cFFFFFF<<1>>|r seconds.", -- TODO: Translate this Block
SI_LUIE_SKILL_STORM_ATRONACH_TP = "An immobile storm atronach zaps the closest enemy, dealing Shock Damage every |cFFFFFF1|r second.\n\nAn ally near the atronach can activate the |cFFFFFFCharged Lightning|r synergy.",
SI_LUIE_SKILL_CHARGED_ATRONACH_TP = "An immobile storm atronach zaps the closest enemy, dealing Shock Damage every |cFFFFFF1|r second, and periodically deals Shock Damage to enemies around it.\n\nAn ally near the atronach can activate the |cFFFFFFCharged Lightning|r synergy.",
SI_LUIE_SKILL_MAGES_FURY_TP = "Falling below |cFFFFFF20%|r Health causes an explosion, dealing Shock Damage to you and nearby allies.",
SI_LUIE_SKILL_ENDLESS_FURY_TP = "Falling below |cFFFFFF20%|r Health causes an explosion, dealing Shock Damage to you and nearby allies.\n\nRestore Magicka to the Sorcerer on death.",
SI_LUIE_SKILL_LIGHTNING_FORM_TP = "Enemies within |cFFFFFF5|r meters take Shock Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_HURRICANE_TP = "Enemies within |cFFFFFF5|r meters take Physical Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nThe winds grow in damage and size, increasing up to |cFFFFFF150|r% more damage and up to |cFFFFFF9|r meters in size.",
SI_LUIE_SKILL_LIGHTNING_SPLASH_TP = "Enemies standing in the storm energy take Shock Damage every |cFFFFFF1|r second.",
SI_LUIE_SKILL_SURGE_TP = "Dealing a Critical Strike heals you. This effect can occur once every |cFFFFFF1|r second.", -- TODO: Translate this Block
SI_LUIE_SKILL_BOLT_ESCAPE_FATIGUE_TP = "Consecutive Bolt Escape casts cost |cFFFFFF50|r% more Magicka per stack for the next |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_INTERCEPT_TP = "Заклинания, направленные в вас, будут поглощены |cFFFFFFBall of Lightning|r.",
SI_LUIE_SKILL_OVERLOAD_TP = "Обычные атаки заменены шаровыми молниями, наносящими урон от Электричества, а Силовые атаки сжигают противников уроном от Электричества в радиусе от атакуемой цели.\n\nАтаки расходуют очки абсолютной способности, пока они не закончатся или пока способность не будет отключена.",
SI_LUIE_SKILL_ENERGY_OVERLOAD_TP = "Обычные атаки заменены шаровыми молниями, наносящими урон от Электричества, а Силовые атаки сжигают противников уроном от Электричества в радиусе от атакуемой цели.\n\nОбычные и Силовые атаки восстанавливают Магию.\n\nАтаки расходуют очки абсолютной способности, пока они не закончатся или пока способность не будет отключена.",
SI_LUIE_SKILL_SUPPRESSION_FIELD_STUN = "Stunned and taking Magic Damage every |cFFFFFF0.5|r seconds.",
SI_LUIE_SKILL_SUPPRESSION_FIELD_SILENCE = "Silenced and taking Magic Damage every |cFFFFFF0.5|r seconds.",
-- Templar
SI_LUIE_SKILL_SPEAR_SHARDS_TP = "Enemies in the radius of the spear take Magic Damage every |cFFFFFF1|r second.\n\nAn ally near the spear can activate the |cFFFFFFBlessed Shards|r synergy.", -- TODO: Translate this Block
SI_LUIE_SKILL_LUMINOUS_SHARDS_TP = "Enemies in the radius of the spear take Magic Damage every |cFFFFFF1|r second.\n\nAn ally near the spear can activate the |cFFFFFFHoly Shards|r synergy.",
SI_LUIE_SKILL_BLAZING_SHIELD_TP = "Absorbing damage for |cFFFFFF<<1>>|r seconds.\n\nWhen the shield expires it explodes outward, dealing |cFFFFFF38|r% of the damage it absorbed as Magic Damage to enemies within |cFFFFFF5|r meters.",
SI_LUIE_SKILL_RADIAL_SWEEP_TP = "Enemies within |cFFFFFF8|r meters take Magic Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_EMPOWERING_SWEEP_TP = "Enemies within |cFFFFFF8|r meters take Magic Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nWhile this ability is active you gain |cFFFFFFEmpower|r.",
SI_LUIE_SKILL_SUN_FIRE_TP = "Afflicted with Flame Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nMovement Speed reduced by |cFFFFFF40|r% for |cFFFFFF<<2>>|r seconds.",
SI_LUIE_SKILL_SUN_FIRE_SNARE_TP = "Afflicted with Flame Damage every |cFFFFFF2|r seconds for |cFFFFFF<<2>>|r seconds.\n\nMovement Speed reduced by |cFFFFFF40|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_SOLAR_BARRAGE_TP = "Enemies within |cFFFFFF8|r meters take Magic Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nWhile this ability is active you gain |cFFFFFFEmpower|r.",
SI_LUIE_SKILL_BACKLASH_TP = "|cFFFFFF20|r% of all damage taken for the next |cFFFFFF<<1>>|r seconds will be copied and released as Magic Damage when the effect ends.",
SI_LUIE_SKILL_PURIFYING_LIGHT_TP = "|cFFFFFF20|r% of all damage taken for the next |cFFFFFF<<1>>|r seconds will be copied and released as Magic Damage when the effect ends.\n\nWhen the effect ends, a pool of sunlight remains attached to you, healing the Templar and their allies if they are nearby every |cFFFFFF2|r seconds for |cFFFFFF6|r seconds.", -- TODO: Translate this Block
SI_LUIE_SKILL_PURIFYING_LIGHT_HOT_TP = "Исцеляет ближайших врагов каждые |cFFFFFF2|r секунды в течение |cFFFFFF<<1>>|r секунд.",
SI_LUIE_SKILL_POWER_OF_THE_LIGHT_TP = "|cFFFFFF20|r% of all damage taken for the next |cFFFFFF<<1>>|r seconds will be copied and released as Physical Damage when the effect ends.", -- TODO: Translate this Block
SI_LUIE_SKILL_ECLIPSE_TP = "Take Magic Damage each time you use a direct damage attack for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_TOTAL_DARK_TP = "Take Magic Damage and heal the Templar each time you use a direct damage attack for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_UNSTABLE_CORE_TP = "Take Magic Damage each time you use a direct damage attack for |cFFFFFF<<1>>|r seconds.\n\nAfter |cFFFFFF<<1>>|r seconds, the magnetic energy explodes, dealing Magic Damage to you and nearby allies.",
SI_LUIE_SKILL_RADIANT_DESTRUCTION_TP = "Afflicted with Magic Damage every |cFFFFFF0.75|r seconds for |cFFFFFF<<1>>|r seconds. Deals up to |cFFFFFF480|r% more damage if you are below |cFFFFFF50|r% Health.",
SI_LUIE_SKILL_NOVA_TP = "Enemies in the nova take Magic Damage every |cFFFFFF1|r second and have Major Maim applied to them.\n\nAn ally near the fragment can activate the |cFFFFFFSupernova|r synergy.",
SI_LUIE_SKILL_SOLAR_PRISON_TP = "Enemies in the nova take Magic Damage every |cFFFFFF1|r second and have Major Maim applied to them.\n\nAn ally near the fragment can activate the |cFFFFFFGravity Crush|r synergy.",
SI_LUIE_SKILL_SOLAR_DISTURBANCE_TP = "Enemies in the nova take Magic Damage every |cFFFFFF1|r second and have Major Maim applied to them.\n\nMajor Maim persists on enemies who leave the area for |cFFFFFF<<2>>|r seconds.\n\nAn ally near the fragment can activate the |cFFFFFFSupernova|r synergy.",
SI_LUIE_SKILL_CLEANSING_RITUAL_TP = "You and allies in the area are healed every |cFFFFFF2|r seconds.\n\nAllies in the area can activate the |cFFFFFFPurify|r synergy.",
SI_LUIE_SKILL_CLEANSING_RITUAL_RETRIBUTION_TP = "You and allies in the area are healed every |cFFFFFF2|r seconds, while enemies take Magic Damage every |cFFFFFF2|r seconds.\n\nAllies in the area can activate the |cFFFFFFPurify|r synergy.",
SI_LUIE_SKILL_RITE_OF_PASSAGE_TP = "Healing you and allies within |cFFFFFF20|r meters every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.", -- TODO: Translate
-- Warden
SI_LUIE_SKILL_BOND_WITH_NATURE = "Bond with Nature",
SI_LUIE_SKILL_SCORCH_TP = "Через |cFFFFFF3|r секунды, наносит Магический урон противникам перед вами на расстоянии до |cFFFFFF20|r метров.",
SI_LUIE_SKILL_SUB_ASSAULT_TP = "Через |cFFFFFF3|r секунды, наносит Физический урон и накладывает Major Fracture на |cFFFFFF5|r секунд противникам перед вами на расстоянии до |cFFFFFF20|r метров.",
SI_LUIE_SKILL_DEEP_FISSURE_TP = "Через |cFFFFFF3|r секунды, наносит Магический урон и накладывает Major Breach на |cFFFFFF5|r секунд противникам перед вами на расстоянии до |cFFFFFF20|r метров.",
SI_LUIE_SKILL_FETCHER_INFECTION_BONUS_DAMAGE_TP = "Ваше следующее применение Fetcher Infection нанесёт на |cFFFFFF50|r% больше урона.",
SI_LUIE_SKILL_GROWING_SWARM_TP = "Afflicted with Magic Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nWhen this effect ends, the fetcherflies infect up to |cFFFFFF6|r nearby allies.", -- TODO: Translate
SI_LUIE_SKILL_BETTY_NETCH_TP = "Восстанавливает |cFFFFFF4800|r Магии в течение |cFFFFFF<<1>>|r секунд.",
SI_LUIE_SKILL_BLUE_BETTY_TP = "Восстанавливает |cFFFFFF5376|r Магии в течение |cFFFFFF<<1>>|r секунд.",
SI_LUIE_SKILL_BULL_NETCH_TP = "Восстанавливает |cFFFFFF5376|r Запаса сил в течение |cFFFFFF<<1>>|r секунд.",
SI_LUIE_SKILL_FERAL_GUARDIAN_TP = "На вашей стороне сражается гризли. Гризли остаётся, пока не будет убит или отозван.\n\nВы можете активировать Guardian's Wrath за |cFFFFFF75|r очков ульты, чтобы медведь нанёс сильный удар противнику, наносящий Магический урон.",
SI_LUIE_SKILL_ETERNAL_GUARDIAN_TP = "На вашей стороне сражается гризли. Гризли остаётся, пока не будет убит или отозван.\n\nРаз в минуту гризли автоматически возрождается снова, если будет убит.\n\nВы можете активировать Guardian's Wrath за |cFFFFFF75|r очков ульты, чтобы медведь нанёс сильный удар противнику, наносящий Магический урон.",
SI_LUIE_SKILL_WILD_GUARDIAN_TP = "На вашей стороне сражается гризли. Гризли остаётся, пока не будет убит или отозван.\n\nВы можете активировать Guardian's Savagery за |cFFFFFF75|r очков ульты, чтобы медведь нанёс сильный удар противнику, наносящий Физический урон.",
SI_LUIE_SKILL_GUARDIANS_WRATH_TP = "Цель атаки Guardian's Wrath.",
SI_LUIE_SKILL_GUARDIANS_SAVAGERY_TP = "Цель атаки Guardian's Savagery.",
SI_LUIE_SKILL_ETERNAL_GUARDIAN_COOLDOWN_TP = "Ваш медведь только что был возрождён и не может снова возродиться автоматически.",
SI_LUIE_SKILL_HEALING_SEED_TP = "After |cFFFFFF6|r seconds, heals you and allies in the area.\n\nAn ally within the field can activate the |cFFFFFFHarvest|r synergy.", -- TODO: Translate
SI_LUIE_SKILL_BUDDING_SEEDS_TP = "After |cFFFFFF6|r seconds, heals you and allies in the area.\n\nWhile the field grows, you can activate this ability again to cause it to instantly bloom.\n\nAn ally within the field can activate the |cFFFFFFHarvest|r synergy.", -- TODO: Translate
SI_LUIE_SKILL_CORRUPTING_POLLEN_TP = "After |cFFFFFF6|r seconds, heals you and allies in the area.\n\nEnemies who enter the field are afflicted with Major Defile.\n\nAn ally within the field can activate the |cFFFFFFHarvest|r synergy.",
SI_LUIE_SKILL_LIVING_VINES_TP = "Исцеляет вас, когда вы получаете урон, действует в течение |cFFFFFF<<1>>|r секунд. Эффект может срабатывать раз в |cFFFFFF1|r секунду.",
SI_LUIE_SKILL_LEECHING_VINES_TP = "Исцеляет вас, когда вы получаете урон, действует в течение |cFFFFFF<<1>>|r секунд. Эффект может срабатывать раз в |cFFFFFF1|r секунду.\n\nЛозы накладывают Minor Lifesteal на противника, который наносит вам урон, на |cFFFFFF10|r секунд.",
SI_LUIE_SKILL_LIVING_TRELLIS_TP = "Исцеляет вас, когда вы получаете урон, действует в течение |cFFFFFF<<1>>|r секунд. Эффект может срабатывать раз в |cFFFFFF1|r секунду.\n\nКогда лозы исчезают, дополнительно восстанавливает здоровье.",
SI_LUIE_SKILL_LOTUS_FLOWER_TP = "Your Light and Heavy Attacks heal you or an ally within |cFFFFFF28|r meters for |cFFFFFF20|r seconds. Fully charged Heavy Attacks restore three times the value.",
SI_LUIE_SKILL_NATURES_GRASP_TP = "Исцеляет каждую |cFFFFFF1|r секунду в течение |cFFFFFF<<1>>|r секунд.\n\nХранитель получает |cFFFFFF3|r очка ульты, когда эффект заканчивается, если находится в бою.",
SI_LUIE_SKILL_NATURES_GRASP_SELF_TP = "Исцеляет каждую |cFFFFFF1|r секунду в течение |cFFFFFF<<1>>|r секунд.\n\nВы получаете |cFFFFFF3|r очка ульты, когда эффект заканчивается, если находитесь в бою.",
SI_LUIE_SKILL_SECLUDED_GROVE_TP = "Healing you and allies in the area every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_HEALING_THICKET_TP = "Every |cFFFFFF1|r second apply a |cFFFFFF4.1|r second duration heal over time effect on you and allies in the |cFFFFFF8|r meter radius of the healing forest.", -- TODO: Translate
SI_LUIE_SKILL_IMPALING_SHARDS_TP = "Enemies in the area take Frost Damage and have their movement speed reduced by |cFFFFFF30|r% for |cFFFFFF3|r seconds every |cFFFFFF1|r second.\n\nThis ability has a higher chance to apply the Chilled status effect.",
SI_LUIE_SKILL_CRYSTALLIZED_SHIELD_TP = "Поглощает урон максимум |cFFFFFF3|r снарядов.\n\nКаждый раз при поглощении снаряда вы восстанавливаете Магии.",
SI_LUIE_SKILL_CRYSTALLIZED_SLAB_TP = "Поглощает урон максимум |cFFFFFF3|r снарядов.\n\nКаждый раз при поглощении снаряда вы восстанавливаете Магии и запускаете обратно во врага ледяной шар, наносящий урон от Мороза.",
SI_LUIE_SKILL_SHIMMERING_SHIELD_TP = "Поглощает урон максимум |cFFFFFF3|r снарядов.\n\nКаждый раз при поглощении снаряда вы восстанавливаете Магии и даёт Major Heroism в течение |cFFFFFF6|r секунд.",
SI_LUIE_SKILL_FROZEN_GATE_TP = "Detonates when a enemy comes close, dealing Frost Damage, teleporting the enemy to you, and immobilizing them for |cFFFFFF3|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_FROZEN_DEVICE_TP = "Взрывается при приближении противника, нанося урон от Мороза, перемещая противника к вам и обездвиживая его на |cFFFFFF3|r секунды и накладывая Major Maim на |cFFFFFF4|r секунд.",
SI_LUIE_SKILL_FROZEN_RETREAT_TP = "Detonates when a enemy comes close, dealing Frost Damage, teleporting the enemy to you, and immobilizing them for |cFFFFFF3|r seconds.\n\nAn ally in the portal can activate the |cFFFFFFIcy Escape|r synergy.", -- TODO: Translate
SI_LUIE_SKILL_SLEET_STORM_TP = "Enemies in the storm take Frost Damage and have their movement speed reduced by |cFFFFFF40|r% every |cFFFFFF1|r second.", -- TODO: Translate
SI_LUIE_SKILL_PERMAFROST_TP = "Enemies in the storm take Frost Damage and have their movement speed reduced by |cFFFFFF40|r% every |cFFFFFF1|r second.\n\nDamaging an enemy three times with the storm will stun them for |cFFFFFF3|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_PERMAFROST_GROUND_TP = "Taking Frost Damage every |cFFFFFF1|r second and Movement Speed reduced by |cFFFFFF40|r%.\n\nIf you take damage from the storm three times, you will be stunned for |cFFFFFF3|r seconds.",
-- Necromancer
SI_LUIE_SKILL_REUSABLE_PARTS_TP = "Reduce the cost of your next Blastbones, Skeletal Mage, or Spirit Mender by |cFFFFFF<<1>>|r%.",
SI_LUIE_SKILL_FLAME_SKULL_TP = "Every third cast of <<2>> deals |cFFFFFF20|r% increased damage.",
SI_LUIE_SKILL_RICOCHET_SKULL_TP = "Every third cast of Ricochet Skull deals |cFFFFFF20|r% increased damage and will bounce up to |cFFFFFF2|r times to other nearby enemies.",
SI_LUIE_SKILL_BLASTBONES_TP = "A flaming skeleton runs toward your target and explodes when it gets close to them, dealing Flame Damage to all enemies within |cFFFFFF6|r meters.\n\nThe skeleton remains for |cFFFFFF8|r seconds or until it explodes.\n\nCreates a corpse on death.",
SI_LUIE_SKILL_BLIGHTED_BLASTBONES_TP = "A decaying skeleton runs toward your target and explodes when it gets close to them, dealing Disease Damage to all enemies within |cFFFFFF6|r meters and applying Major Defile to them for |cFFFFFF4|r seconds.\n\nThe skeleton remains for |cFFFFFF8|r seconds or until it explodes.\n\nCreates a corpse on death.",
SI_LUIE_SKILL_STALKING_BLASTBONES_TP = "A flaming skeleton runs toward your target and explodes when it gets close to them, dealing Flame Damage to all enemies within |cFFFFFF6|r meters.\n\nEvery second the skeleton spends chasing its target increases the damage of the explosion by |cFFFFFF10|r% up to a maximum of |cFFFFFF50|r% more damage.\n\nThe skeleton remains for |cFFFFFF8|r seconds or until it explodes.\n\nCreates a corpse on death.",
SI_LUIE_SKILL_BONEYARD_TP = "Enemies in the |cFFFFFF6|r meter radius of the graveyard take Frost Damage every |cFFFFFF1|r second.\n\nAn ally standing in the graveyard can activate the |cFFFFFFGrave Robber|r synergy.",
SI_LUIE_SKILL_UNNERVING_BONEYARD_TP = "Enemies in the |cFFFFFF6|r meter radius of the graveyard take Frost Damage every |cFFFFFF1|r second and have Major Breach and Major Fracture applied to them.\n\nAn ally standing in the graveyard can activate the |cFFFFFFGrave Robber|r synergy.",
SI_LUIE_SKILL_AVID_BONEYARD_TP = "Enemies in the |cFFFFFF6|r meter radius of the graveyard take Frost Damage every |cFFFFFF1|r second.\n\nYou or an ally standing in the graveyard can activate the |cFFFFFFGrave Robber|r synergy.",
SI_LUIE_SKILL_SKELETAL_MAGE_TP = "A skeletal mage fights at your side. The skeletal mage remains for |cFFFFFF<<1>>|r seconds.\n\nThe mage attacks the closest enemy every |cFFFFFF2|r seconds, dealing Shock Damage.\n\nCreates a corpse on death.",
SI_LUIE_SKILL_SKELETAL_ARCHER_TP = "A skeletal archer fights at your side. The skeletal archer remains for |cFFFFFF<<1>>|r seconds.\n\nThe archer attacks the closest enemy every |cFFFFFF2|r seconds, dealing Physical Damage.\n\nEach time the archer deals damage, its next attack will do |cFFFFFF10|r% more damage than the previous attack.\n\nCreates a corpse on death.",
SI_LUIE_SKILL_SKELETAL_ARCANIST_TP = "A skeletal arcanist fights at your side. The skeletal arcanist remains for |cFFFFFF<<1>>|r seconds.\n\nThe arcanist attacks the closest enemy every |cFFFFFF2|r seconds, dealing Shock Damage to them and enemies with |cFFFFFF4|r meters.\n\nCreates a corpse on death.",
SI_LUIE_SKILL_SHOCKING_SIPHON_TP = "Enemies within |cFFFFFF5|r meters of the corpse and between you and the corpse take Shock Damage over |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_SHOCKING_SIPHON_GROUND_TP = "Taking rapidly ticking Shock Damage.",
SI_LUIE_SKILL_DETONATING_SIPHON_TP = "Enemies within |cFFFFFF5|r meters of the corpse and between you and the corpse take Disease Damage over |cFFFFFF<<1>>|r seconds.\n\nIf the siphon lasts its full duration it causes the corpse to explode, dealing additional Disease Damage to all enemies around the corpse.",
SI_LUIE_SKILL_DETONATING_SIPHON_GROUND_TP = "Taking rapidly ticking Disease Damage.\n\nIf the siphon lasts its full |cFFFFFF12|r second duration the corpse explodes, dealing Disease Damage to you and nearby allies.",
SI_LUIE_SKILL_MYSTIC_SIPHON_TP = "Enemies within |cFFFFFF5|r meters of the corpse and between you and the corpse take Shock Damage over |cFFFFFF<<1>>|r seconds.\n\nYou also restore Magicka over |cFFFFFF<<1>>|r seconds while siphoning the corpse.",
SI_LUIE_SKILL_FROZEN_COLOSSUS_TP = "A frostbitten Flesh Colossus smashes the ground three times over |cFFFFFF3|r seconds, dealing Frost Damage to enemies within |cFFFFFF8|r meters.\n\nEach smash applies Major Vulnerability to any enemy hit for |cFFFFFF3|r seconds.",
SI_LUIE_SKILL_PESTILENT_COLOSSUS_TP = "A pestilent Flesh Colossus smashes the ground three times over |cFFFFFF3|r seconds, dealing increasing Disease Damage to enemies within |cFFFFFF8|r meters.\n\nEach smash applies Major Vulnerability to any enemy hit for |cFFFFFF3|r seconds.",
SI_LUIE_SKILL_GLACIAL_COLOSSUS_TP = "A frostbitten Flesh Colossus smashes the ground three times over |cFFFFFF3|r seconds, dealing Frost Damage to enemies within |cFFFFFF8|r meters.\n\nThe final smash stuns all enemies hit for |cFFFFFF<<2>>|r seconds.\n\nEach smash applies Major Vulnerability to any enemy hit for |cFFFFFF3|r seconds.",
SI_LUIE_SKILL_GLACIAL_COLOSSUS_GROUND_TP = "Taking Frost Damage every |cFFFFFF1|r second.\n\nThe final hit will knock you down for |cFFFFFF4|r seconds.",
SI_LUIE_SKILL_RUINOUS_SCYTHE_TP = "Every third cast of Ruinous Scythe will set all enemies hit Off Balance.",
SI_LUIE_SKILL_BONE_TOTEM_TP = "You and allies within the |cFFFFFF6|r meter radius of the totem gain Minor Protection.\n\nAfter |cFFFFFF2|r seconds, the totem instills fear in enemies, holding them in place for |cFFFFFF4|r seconds.",
SI_LUIE_SKILL_AGONY_TOTEM_TP = "You and allies within the |cFFFFFF6|r meter radius of the totem gain Minor Protection.\n\nAfter |cFFFFFF2|r seconds, the totem instills fear in enemies, holding them in place for |cFFFFFF4|r seconds.\n\nAllies can activate the |cFFFFFFPure Agony|r synergy.",
SI_LUIE_SKILL_EMPOWERING_GRASP_TP = "Increase damage and healing done by |cFFFFFF40|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_BONE_GOLIATH_TRANSFORMATION_TP = "Transformed into a Bone Goliath for |cFFFFFF<<1>>|r seconds.\n\nWhile transformed, your Light Attacks and Heavy Attacks restore Health.\n\nYou cannot generate Ultimate while transformed.",
SI_LUIE_SKILL_PUMMELING_GOLIATH_TP = "Transformed into a Pummeling Goliath for |cFFFFFF<<1>>|r seconds.\n\nWhile transformed, your Light Attacks and Heavy Attacks restore Health.\n\nYour bash attacks hit multiple targets in front of you and deal additional damage.\n\nYou cannot generate Ultimate while transformed.",
SI_LUIE_SKILL_RAVENOUS_GOLIATH_TP = "Transformed into a Ravenous Goliath for |cFFFFFF<<1>>|r seconds.\n\nWhile transformed, your Light Attacks and Heavy Attacks restore Health.\n\nYou deal Magic Damage to nearby enemies every |cFFFFFF1|r second and heal for |cffffff100|r% of the damage done.\n\nYou cannot generate Ultimate while transformed.",
SI_LUIE_SKILL_RAVENOUS_GOLIATH_GROUND_TP = "Taking Magic Damage every |cFFFFFF1|r second.\n\nEach tick heals the Necromancer for |cffffff100|r% of the damage done.",
SI_LUIE_SKILL_RESISTANT_FLESH_TP = "Increase Physical and Spell Resistance by |cFFFFFF50|r% of the amount healed by the last cast of Resistant Flesh for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_LIFE_AMID_DEATH_TP = "Healing you and allies within |cFFFFFF8|r meters of the consumed corpse every |cFFFFFF1|r second.",
SI_LUIE_SKILL_SPIRIT_MENDER_TP = "A ghostly spirit stays by your side. The ghostly spirit remains for |cFFFFFF<<1>>|r seconds.\n\nThe spirit heals you or the lowest Health ally around you every |cFFFFFF2|r seconds.\n\nCreates a corpse on death.",
SI_LUIE_SKILL_SPIRIT_GUARDIAN_TP = "A ghostly spirit stays by your side. The ghostly spirit remains for |cFFFFFF<<1>>|r seconds.\n\nThe spirit heals you or the lowest Health ally around you every |cFFFFFF2|r seconds.\n\nWhile active, |cFFFFFF10|r% of the damage you take is transferred to the spirit instead.\n\nCreates a corpse on death.",
SI_LUIE_SKILL_RESTORING_TETHER_TP = "You and all allies between you and the corpse heal over |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_BRAIDED_TETHER_TP = "You, all allies around you, and all allies between you and the corpse heal over |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_MORTAL_COIL_TP = "You and all allies between you and the corpse heal over |cFFFFFF<<1>>|r seconds.\n\nYou also restore |cFFFFFF2844|r Stamina over |cFFFFFF<<1>>|r seconds while siphoning the corpse.",
----------------------------------------------------------------
-- WEAPON SKILLS -----------------------------------------------
----------------------------------------------------------------
-- Shared
SI_LUIE_SKILL_PASSIVE_HEAVY_MAIN_HAND = "Силовая атака (Ведущая рука)",
SI_LUIE_SKILL_PASSIVE_HEAVY_OFF_HAND = "Силовая атака (Вторая рука)",
-- Two-Handed
SI_LUIE_SKILL_FOLLOW_UP_TP = "Ваша следующая атака с прямым уроном, нанесённая в течение |cFFFFFF7|r секунд нанесёт |cFFFFFF<<1>>|r% дополнительного урона.",
SI_LUIE_SKILL_BATTLE_RUSH_TP = "Увеличивает восстановление Запаса сил на |cFFFFFF<<1>>|r% в течение |cFFFFFF10|r секунд.",
SI_LUIE_SKILL_RALLY_TP = "Healing every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds, and for additional Health when Rally expires.\n\nThe final heal is increased by up to |cFFFFFF564|r%, in proportion to the length of time Rally has been active.", -- TODO: Translate
SI_LUIE_SKILL_BERSERKER_STRIKE_TP = "Увеличивает в течение |cFFFFFF<<1>>|r секунд Физическую и Магическую сопротивляемости на величину, равную проигнорированному способностью Berserker Strike сопротивлению цели.",
SI_LUIE_SKILL_ONSLAUGHT_TP = "Увеличивает в течение |cFFFFFF<<1>>|r секунд Физическую и Магическую сопротивляемости на величину, равную проигнорированному способностью Onslaught сопротивлению цели.",
SI_LUIE_SKILL_BERSERKER_RAGE_TP = "Увеличивает в течение |cFFFFFF<<1>>|r секунд Физическую и Магическую сопротивляемости на величину, равную проигнорированному способностью Berserker Rage сопротивлению цели.\n\nВы получаете иммунитет к обездвиживанию, замедлению и обезмолвливанию на время действия эффекта.",
-- One Hand and Shield
SI_LUIE_SKILL_DEFENSIVE_POSTURE_TP = "Отражает обратной в противника следующий направленный в вас снаряд заклинания, выпущенный в течение |cFFFFFF<<1>>|r секунд.",
SI_LUIE_SKILL_DEFENSIVE_STANCE_TP = "Отражает обратной в противника следующий направленный в вас снаряд заклинания, выпущенный в течение |cFFFFFF<<1>>|r секунд.\n\nОтражённый снаряд оглушает цель на |cFFFFFF4|r секунды.",
SI_LUIE_SKILL_ABSORB_MAGIC_TP = "Поглощает урон следующего направленного в вас снаряда заклинания, выпущенный в течение |cFFFFFF<<1>>|r секунд и исцеляет вас на |cFFFFFF15|r% от вашего максимального запаса Здоровья.",
SI_LUIE_SKILL_POWER_SLAM_TP = "Ваше следующее применение способности Power Slam в течение |cFFFFFF<<1>>|r секунд наносит |cFFFFFF25|r% дополнительного урона.",
SI_LUIE_SKILL_SHIELD_WALL_TP = "Автоматически блокирует все атаки в течение |cFFFFFF<<1>>|r секунд, не расходуя ресурсов.",
SI_LUIE_SKILL_SPELL_WALL_TP = "Автоматически блокирует все атаки и отражает снаряды в течение |cFFFFFF<<1>>|r секунд, не расходуя ресурсов.",
SI_LUIE_SKILL_SHIELD_DISCIPLINE_TP = "Автоматически блокирует все атаки в течение |cFFFFFF<<1>>|r секунд, не расходуя ресурсов.\n\nВаши способности из ветки Одноручного оружия и Щита расходуют на |cFFFFFF100|r% меньше ресурсов, пока активно.",
-- Dual Wield
SI_LUIE_SKILL_RENDING_SLASHES_TP = "Afflicted with Bleeding Damage every |cFFFFFF2|r seconds and Movement Speed reduced by |cFFFFFF40|r% for |cFFFFFF<<1>>|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_BLOOD_CRAZE_TP = "Подвержен Кровотечению каждые |cFFFFFF2|r секунды в течение |cFFFFFF<<1>>|r секунд.\n\nАтакуюие вас исцеляются каждые |cFFFFFF2|r секунды, пока активная способность Blood Craze.",
SI_LUIE_SKILL_BLOOD_CRAZE_HEAL_TP = "Исцеляет каждые |cFFFFFF2|r секунды в течение |cFFFFFF<<1>>|r секунд, пока на вашей цели активе эффект Blood Craze.",
SI_LUIE_SKILL_BLADE_CLOAK_TP = "Кольцо летающих острых лезвий окружает вас, нанося Физический урон всем ближайшим противникам каждые |cFFFFFF3|r секунды в течение |cFFFFFF<<1>>|r секунд.",
SI_LUIE_SKILL_LACERATE_TP = "Afflicted with Bleeding Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nEvery time this effect deals damage, your attacker heals for |cFFFFFF50|r% of the damage done.", -- TODO: Translate
SI_LUIE_SKILL_THRIVE_IN_CHAOS_TP = "Увеличивает наносимый урон на |cFFFFFF5|r% за каждый удар способностью Thrive in Chaos, максимум на |cFFFFFF30|r%.",
-- Bow
SI_LUIE_SKILL_HAWK_EYE_TP = "Increase the damage of your Bow abilities by |cFFFFFF<<1>>|r% for |cFFFFFF5|r seconds, stacking up to |cFFFFFF5|r times.",
SI_LUIE_SKILL_VOLLEY_TP = "Arrows rain down from the sky, dealing Physical Damage to enemies in the target area every |cFFFFFF0.5|r seconds.",
SI_LUIE_SKILL_ENDLESS_HAIL_TP = "Arrows rain down from the sky, dealing Physical Damage to enemies in the target area every |cFFFFFF0.5|r seconds.",
SI_LUIE_SKILL_DRAINING_SHOT_TP = "Stunned for |cFFFFFF<<1>>|r seconds.\n\nWhen the stun ends, your attacker heals.",
SI_LUIE_SKILL_BOMBARD_TP = "Immobilized and Movement Speed reduced by |cFFFFFF40|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_POISON_INJECTION_TP = "Afflicted with Poison Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nDeals up to |cFFFFFF200|r% more damage in proportion to your missing health under |cFFFFFF50|r%.",
SI_LUIE_SKILL_BALLISTA_TP = "Your ballista turret unleashes a barrage of arrows, dealing Physical Damage over |cFFFFFF<<1>>|r seconds.",
-- Destruction Staff
SI_LUIE_HEAVY_ATTACK_LIGHTNING_STAFF_TP = "Afflicted with Shock Damage over time for |cFFFFFF<<1>>|r seconds.\n\nDeals additional Shock Damage if the channel is finished.",
SI_LUIE_SKILL_WOE_FIRE_TP = "Enemies standing in the elemental barrier take Flame Damage every |cFFFFFF1|r second.\n\nBurning enemies take |cFFFFFF20|r% more damage from this ability.",
SI_LUIE_SKILL_WOE_FROST_TP = "Enemies standing in the elemental barrier take Frost Damage and have their Movement Speed reduced by |cFFFFFF40|r% every |cFFFFFF1|r second.\n\nChilled enemies become frozen and are immobilized for |cFFFFFF4|r seconds.",
SI_LUIE_SKILL_WOE_SHOCK_TP = "Enemies standing in the elemental barrier take Shock Damage every |cFFFFFF1|r second.\n\nConcussed enemies are set Off Balance for |cFFFFFF5|r seconds.",
SI_LUIE_SKILL_UWOE_FIRE_TP = "Enemies standing in the elemental barrier take Flame Damage every |cFFFFFF1|r second.\n\nBurning enemies take |cFFFFFF20|r% more damage from this ability.\n\nThe wall explodes when it expires, dealing additional Flame Damage.",
SI_LUIE_SKILL_UWOE_FROST_TP = "Enemies standing in the elemental barrier take Frost Damage and have their Movement Speed reduced by |cFFFFFF40|r% every |cFFFFFF1|r second.\n\nChilled enemies become frozen and are immobilized for |cFFFFFF4|r seconds.\n\nThe wall explodes when it expires, dealing additional Frost Damage.",
SI_LUIE_SKILL_UWOE_SHOCK_TP = "Enemies standing in the elemental barrier take Shock Damage every |cFFFFFF1|r second.\n\nConcussed enemies are set Off Balance for |cFFFFFF5|r seconds.\n\nThe wall explodes when it expires, dealing additional Shock Damage.",
SI_LUIE_SKILL_FLAME_TOUCH_TP = "Afflicted with Flame Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nKnocked back for |cFFFFFF1.8|r seconds.",
SI_LUIE_SKILL_FLAME_TOUCH_ALT_TP = "Afflicted with Flame Damage every |cFFFFFF2|r seconds for |cFFFFFF10|r seconds.\n\nKnocked back for |cFFFFFF1.8|r seconds.",
SI_LUIE_SKILL_SHOCK_TOUCH_TP = "Afflicted with Shock Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nStunned for |cFFFFFF2.5|r seconds.",
SI_LUIE_SKILL_SHOCK_TOUCH_ALT_TP = "Afflicted with Shock Damage every |cFFFFFF2|r seconds for |cFFFFFF10|r seconds.\n\nStunned for |cFFFFFF2.5|r seconds.",
SI_LUIE_SKILL_FROST_TOUCH_TP = "Afflicted with Frost Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nImmobilized for |cFFFFFF4|r seconds.",
SI_LUIE_SKILL_FROST_TOUCH_ALT_TP = "Afflicted with Frost Damage every |cFFFFFF2|r seconds for |cFFFFFF10|r seconds.\n\nImmobilized for |cFFFFFF4|r seconds.",
SI_LUIE_SKILL_FROST_CLENCH_TP = "Afflicted with Frost Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nImmobilized for |cFFFFFF6.5|r seconds.",
SI_LUIE_SKILL_FROST_CLENCH_ALT_TP = "Afflicted with Frost Damage every |cFFFFFF2|r seconds for |cFFFFFF10|r seconds.\n\nImmobilized for |cFFFFFF6.5|r seconds.",
SI_LUIE_SKILL_ELEMENTAL_STORM_TP = "A cataclysmic storm builds for |cFFFFFF2|r seconds then lays waste to all enemies in the area, dealing <<1>> Damage every |cFFFFFF1|r second.",
SI_LUIE_SKILL_ICY_RAGE_TP = "A cataclysmic storm builds for |cFFFFFF2|r seconds then lays waste to all enemies in the area, dealing Frost Damage every |cFFFFFF1|r second.\n\nImmobilizes enemies hit for |cFFFFFF3|r seconds.",
SI_LUIE_SKILL_EYE_OF_THE_STORM_TP = "A cataclysmic storm builds around you for |cFFFFFF2|r seconds then lays waste to all enemies within |cFFFFFF8|r meters, dealing <<1>> Damage every |cFFFFFF1|r second.",
SI_LUIE_SKILL_WALL_OF_ELEMENTS_GROUND_FIRE = "Taking Flame Damage every |cFFFFFF1|r second.\n\nIf you are Burning, take |cFFFFFF20|r% more damage from this ability.",
SI_LUIE_SKILL_WALL_OF_ELEMENTS_GROUND_FROST = "Taking Frost Damage every |cFFFFFF1|r second and Movement Speed reduced by |cFFFFFF40|r%.\n\nIf you are Chilled you will be immobilized for |cFFFFFF4|r seconds.",
SI_LUIE_SKILL_WALL_OF_ELEMENTS_GROUND_SHOCK = "Taking Shock Damage every |cFFFFFF1|r second.\n\nIf you are Concussed you will be set Off Balance for |cFFFFFF5|r seconds.",
SI_LUIE_SKILL_U_WALL_OF_ELEMENTS_GROUND_FIRE = "Taking Flame Damage every |cFFFFFF1|r second.\n\nIf you are Burning, take |cFFFFFF20|r% more damage from this ability.\n\nThe wall explodes when it expires, dealing additional Flame Damage.",
SI_LUIE_SKILL_U_WALL_OF_ELEMENTS_GROUND_FROST = "Taking Frost Damage every |cFFFFFF1|r second and Movement Speed reduced by |cFFFFFF40|r%.\n\nIf you are Chilled you will be immobilized for |cFFFFFF4|r seconds.\n\nThe wall explodes when it expires, dealing additional Frost Damage.",
SI_LUIE_SKILL_U_WALL_OF_ELEMENTS_GROUND_SHOCK = "Taking Shock Damage every |cFFFFFF1|r second.\n\nIf you are Concussed you will be set Off Balance for |cFFFFFF5|r seconds.\n\nThe wall explodes when it expires, dealing additional Shock Damage.",
-- Restoration Staff
SI_LUIE_SKILL_BLESSING_OF_RESTORATION = "Blessing of Restoration",
SI_LUIE_SKILL_MUTAGEN = "Healing every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nIf you fall below |cFFFFFF20%|r Health, the Mutagen is consumed but instantly heals and removes |cFFFFFF1|r harmful effect.",
SI_LUIE_SKILL_HEALING_WARD = "Absorbing damage for |cFFFFFF<<1>>|r seconds.\n\nWhen the shield expires, heal based of the shield's remaining strength.",
SI_LUIE_SKILL_LIGHTS_CHAMPION = "Healing every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nGain Major Force and Major Protection for |cFFFFFF5|r seconds every time this effect heals.",
----------------------------------------------------------------
-- ARMOR SKILLS ------------------------------------------------
----------------------------------------------------------------
-- Light Armor
SI_LUIE_SKILL_HARNESS_MAGICKA = "Absorbing damage for |cFFFFFF<<1>>|r seconds.\n\nWhile active, up to three times when spell damage is absorbed, you restore Magicka.",
----------------------------------------------------------------
-- WORLD SKILLS ------------------------------------------------
----------------------------------------------------------------
-- Soul Magic
SI_LUIE_SKILL_SOUL_SUMMONS_TP = "Вы недавно воскресли без затрат Камня душ и не можете воскреснуть сова не потратив камня душ в течение |cFFFFFF<<1>>|r час.", -- TODO: Check Translation
SI_LUIE_SKILL_SOUL_TRAP = "Afflicted with Magic Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nYour attacker fills a soul gem if you die under this effect.",
SI_LUIE_SKILL_CONSUMING_TRAP = "Afflicted with Magic Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nYour attacker fills a soul gem and restores Health, Magicka, and Stamina if you die under this effect.",
-- Werewolf
SI_LUIE_SKILL_SANIES_LUPINUS_TP = "Вы были укушены Оборотнем и заразились Гнойным люпинусом.",
SI_LUIE_SKILL_LYCANTHROPHY_TP = "Вы можете обратиться в дикого Оборотня.\n\nВы получаете на |cFFFFFF25|r% больше урона от Яда, пока находитесь в форме Вервольфа.",
SI_LUIE_SKILL_BLOOD_MOON_TP = "Вы укусили другого игрока. Вы не сможете сделать этого снова в течение |cFFFFFF7|r дней.", -- TODO: Check Translation
SI_LUIE_SKILL_FEEDING_FREZNY_TP = "Empowered for |cFFFFFF<<1>>|r seconds, increasing the damage of your Light Attacks by |cFFFFFF40|r%.",
SI_LUIE_SKILL_CLAWS_OF_LIFE_TP = "Afflicted with Disease Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nEvery time this effect deals damage, your attacker heals for |cFFFFFF50|r% of the damage done.",
SI_LUIE_SKILL_WEREWOLF_TRANSFORMATION_TP = "Transformed into a werewolf.\n\nWhile transformed, your Light Attacks apply a bleed over |cFFFFFF4|r seconds, your Heavy Attacks deal |cFFFFFF50|r% splash damage, and your Max Stamina is increased by |cFFFFFF30|r%.\n\nYou cannot generate Ultimate while transformed.",
SI_LUIE_SKILL_PACK_LEADER_TP = "Transformed into a werewolf.\n\nWhile transformed, your Light Attacks apply a bleed over |cFFFFFF4|r seconds, your Heavy Attacks deal |cFFFFFF50|r% splash damage, and your Max Stamina is increased by |cFFFFFF30|r%.\n\nSummon two direwolves while transformed. If killed, they return after |cFFFFFF10|r seconds.\n\nYou cannot generate Ultimate while transformed.",
-- Vampire
SI_LUIE_SKILL_PASSIVE_NOXIPHILIC_SANGUIVORIA = "Noxiphilic Sanguivoria",
SI_LUIE_SKILL_NOXIPHILIC_SANGUIVORIA_TP = "You have been bitten by a Vampire and contracted Noxiphilic Sanguivoria.",
SI_LUIE_SKILL_VAMPIRISM_STAGE1_TP = "• Using Vampire abilities advances your vampirism stage\n• Feeding reduces your vampirism stage, sneak up behind an enemy humanoid to feed",
SI_LUIE_SKILL_VAMPIRISM_STAGE2_TP = "• Reduce Health Recovery by |cFFFFFF25|r%\n• Increase Fire Damage taken by |cFFFFFF15|r%\n• Vampire abilities cost |cFFFFFF7|r% less and advance your vampirism stage\n• Feeding reduces your vampirism stage, sneak up behind an enemy humanoid to feed",
SI_LUIE_SKILL_VAMPIRISM_STAGE3_TP = "• Reduce Health Recovery by |cFFFFFF50|r%\n• Increase Fire Damage taken by |cFFFFFF20|r%\n• Vampire abilities cost |cFFFFFF14|r% less and advance your vampirism stage\n• Feeding reduces your vampirism stage, sneak up behind an enemy humanoid to feed",
SI_LUIE_SKILL_VAMPIRISM_STAGE4_TP = "• Reduce Health Recovery by |cFFFFFF75|r%\n• Increase Fire Damage taken by |cFFFFFF25|r%\n• Vampire abilities cost |cFFFFFF21|r% less and advance your vampirism stage\n• Feeding reduces your vampirism stage, sneak up behind an enemy humanoid to feed",
SI_LUIE_SKILL_FEED_TP = "A Vampire is draining your life force, healing every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds and reducing their vampirism Stage when the effect ends.\n\nStunned for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_BLOOD_RITUAL_TP = "You have fed on another player. You may not do so again for |cFFFFFF7|r days.",
SI_LUIE_SKILL_PROFANE_SYMBOL = "Profane Symbol",
SI_LUIE_SKILL_DRAIN_ESSENCE_TP = "Afflicted with Magic Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds. Each tick heals the vampire for |cFFFFFF20|r% of their missing health.",
SI_LUIE_SKILL_INVIGORATING_DRAIN_TP = "Afflicted with Magic Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds. Each tick heals the vampire for |cFFFFFF20|r% of their missing health and generates |cFFFFFF2|r Ultimate.",
SI_LUIE_SKILL_MIST_FORM_TP = "Reduce damage taken by |cFFFFFF75|r% for |cFFFFFF<<1>>|r seconds.\n\nImmune to all disabling and immobilization effects while active, but cannot be healed and Magicka Recovery is disabled.",
SI_LUIE_SKILL_BALEFUL_MIST_TP = "Reduce damage taken by |cFFFFFF75|r% and enemies within |cFFFFFF5|r meters take Magic Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nImmune to all disabling and immobilization effects while active, but cannot be healed and Magicka Recovery is disabled.",
SI_LUIE_SKILL_BAT_SWARM_TP = "Enemies within |cFFFFFF10|r meters take Magic Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_DEVOURING_SWARM_TP = "Enemies within |cFFFFFF10|r meters take Magic Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nThe bats heal you for each enemy they damage.",
SI_LUIE_SKILL_DEVOURING_SWARM_GROUND_TP = "Taking Magic Damage every |cFFFFFF1|r second.\n\nEach tick heals the Vampire.",
----------------------------------------------------------------
-- GUILD SKILLS ------------------------------------------------
----------------------------------------------------------------
-- Fighters Guild
SI_LUIE_SKILL_CIRCLE_OF_PROTECTION_TP = "You and allies in the rune gain Minor Protection and Minor Endurance.",
SI_LUIE_SKILL_RING_OF_PRESERVATION_TP = "You and allies in the rune have the cost of Roll Dodge reduced by |cFFFFFF20|r% and gain Minor Protection and Minor Endurance.",
SI_LUIE_SKILL_RING_OF_PRESERVATION_GROUND_TP = "The cost of Roll Dodge is reduced by |cFFFFFF20|r%.",
SI_LUIE_SKILL_EXPERT_HUNTER_TP = "Revealing stealthed and invisible enemies within |cFFFFFF6|r meters for |cFFFFFF<<1>>|r seconds.\n\nExposed enemies cannot return to stealth or invisibility for |cFFFFFF3|r seconds.",
SI_LUIE_SKILL_EVIL_HUNTER_TP = "Revealing stealthed and invisible enemies within |cFFFFFF6|r meters for |cFFFFFF<<1>>|r seconds.\n\nExposed enemies cannot return to stealth or invisibility for |cFFFFFF3|r seconds.\n\nWhile active the Stamina costs of your Fighters Guild abilities are reduced by |cFFFFFF25|r%.",
SI_LUIE_SKILL_TRAP_BEAST_TP = "Triggers when an enemy comes close, dealing Physical Damage and afflicting them with Bleeding Damage for |cFFFFFF6|r seconds as well as immobilizing them.\n\nWhen triggered, grants you Minor Force for |cFFFFFF8|r seconds.",
SI_LUIE_SKILL_TRAP_BEAST_DEBUFF_TP = "Afflicted with Bleeding Damage every |cFFFFFF2|r seconds and immobilized for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_REARMING_TRAP_TP = "Triggers when an enemy comes close, dealing Physical Damage and afflicting them with Bleeding Damage for |cFFFFFF6|r seconds as well as immobilizing them.\n\nWhen triggered, grants you Minor Force for |cFFFFFF8|r seconds.\n\nAfter being triggered the trap resets and can be triggered one more time.",
SI_LUIE_SKILL_DAWNBREAKER_OF_SMITING_TP = "Afflicted with Bleeding Damage every |cFFFFFF2|r seconds for |cFFFFFF6|r seconds.\n\nStunned for |cFFFFFF2|r seconds.",
-- Mages Guild
SI_LUIE_SKILL_RADIANT_MAGELIGHT_TP = "Revealing stealthed and invisible enemies within |cFFFFFF12|r meters for |cFFFFFF<<1>>|r seconds.\n\nExposed enemies cannot return to stealth or invisibility for |cFFFFFF3|r seconds.",
SI_LUIE_SKILL_ENTROPY_TP = "Afflicted with Magic Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nYour attacker heals every |cFFFFFF6|r seconds while Entropy remains active.",
SI_LUIE_SKILL_STRUCTURED_ENTROPY_TP = "Afflicted with Magic Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nYour attacker heals every |cFFFFFF6|r seconds while Structured Entropy remains active.",
SI_LUIE_SKILL_DEGENERATION_TP = "Afflicted with Magic Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.\n\nYour attacker heals every |cFFFFFF6|r seconds while Degeneration remains active.\n\nLight and Heavy attacks made against you by your attacker have a |cFFFFFF15|r% chance to heal them for |cFFFFFF100|r% of the damage dealt.",
SI_LUIE_SKILL_FIRE_RUNE_TP = "When triggered, the rune blasts all enemies in the target area for Flame Damage.",
SI_LUIE_SKILL_VOLCANIC_RUNE_TP = "When triggered, the rune blasts all enemies in the target area for Flame Damage, knocks them into the air, and stuns them for |cFFFFFF4|r seconds.",
SI_LUIE_SKILL_SCALDING_RUNE_TP = "When triggered, the rune blasts all enemies in the target area for Flame Damage and afflicts them with additional Flame Damage over time.",
SI_LUIE_SKILL_EQUILIBRIUM_TP = "Reduce healing done and damage shield strength by |cFFFFFF50|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_SPELL_SYMMETRY_TP = "Reduce the cost of your next Magicka ability used within |cFFFFFF<<1>>|r seconds by |cFFFFFF28|r%.",
SI_LUIE_SKILL_METEOR_TP = "Enemies in the impact area take Flame Damage every |cFFFFFF1|r second.",
SI_LUIE_SKILL_ICE_COMET_TP = "Enemies in the impact area take Frost Damage every |cFFFFFF1|r second.",
-- Psijic Order
SI_LUIE_SKILL_SPELL_ORB_TP = "When you cast a Psijic Order ability while you are in combat, you generate a spell charge.\n\nWhen you reach |cFFFFFF5|r spell charges, you launch a spell orb at the closest enemy to you dealing Magic Damage or Physical Damage, whichever is higher.",
SI_LUIE_SKILL_CONCENTRATED_BARRIER_TP = "Absorbing damage while blocking.\n\nThis damage shield recharges back to full strength after you spend |cFFFFFF10|r seconds not blocking.",
SI_LUIE_SKILL_TIME_STOP_TP = "Gradually being slowed over time for |cFFFFFF2|r seconds.\n\nIf you are still in the area of effect at end of this duration you will be stunned for |cFFFFFF3|r seconds.",
SI_LUIE_SKILL_TIME_BORROWED_TIME_TP = "Gradually being slowed over time for |cFFFFFF2|r seconds.\n\nIf you are still in the area of effect at end of this duration you will be stunned and have the next |cFFFFFF5000|r points of healing negated for |cFFFFFF3|r seconds.",
SI_LUIE_SKILL_TIME_BORROWED_TIME_STUN_TP = "Negating the next |cFFFFFF5000|r points of healing for |cFFFFFF<<1>>|r seconds.\n\nStunned for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_TIME_FREEZE_TP = "Gradually being slowed over time for |cFFFFFF4|r seconds.\n\nIf you are still in the area of effect at end of this duration you will be stunned for |cFFFFFF3|r seconds.",
SI_LUIE_SKILL_IMBUE_WEAPON_TP = "Your next Light Attack used within |cFFFFFF2|r seconds deals additional Physical Damage.\n\nIf the power is not consumed in time, regain a portion of the resources spent.",
SI_LUIE_SKILL_ELEMENTAL_WEAPON_TP = "Your next Light Attack used within |cFFFFFF2|r seconds deals additional Magic Damage and applies the Burning, Concussion, or Chill status effect.\n\nIf the power is not consumed in time, regain a portion of the resources spent.",
SI_LUIE_SKILL_CRUSHING_WEAPON_TP = "Your next Light Attack used within |cFFFFFF2|r seconds deals additional Physical Damage and heals you for |cFFFFFF25|r% of the damage done.\n\nIf the power is not consumed in time, regain a portion of the resources spent.",
SI_LUIE_SKILL_MEND_WOUNDS_TP = "Your Light and Heavy attacks are replaced with healing abilities that can only be used on allies.\n\nYour Light Attack launches a restorative sphere at your ally, instantly healing them.\n\nYour Heavy Attack heals every |cFFFFFF1|r second and restores Magicka to you while channeling.",
SI_LUIE_SKILL_MEND_SPIRIT_TP = "Your Light and Heavy attacks are replaced with healing abilities that can only be used on allies.\n\nYour Light Attack launches a restorative sphere at your ally, instantly healing them.\n\nYour Heavy Attack heals every |cFFFFFF1|r second and restores Magicka to you while channeling.\n\nAfter you heal an ally you grant them Major Resolve and Major Ward for |cFFFFFF5|r seconds.",
SI_LUIE_SKILL_SYMBIOSIS_TP = "Your Light and Heavy attacks are replaced with healing abilities that can only be used on allies.\n\nYour Light Attack launches a restorative sphere at your ally, instantly healing them.\n\nYour Heavy Attack heals every |cFFFFFF1|r second and restores Magicka to you while channeling.\n\nYou heal yourself for |cFFFFFF50|r% of the amount of healing done to the ally.",
SI_LUIE_SKILL_MEDITATE_TP = "Healing and restoring Magicka and Stamina every |cFFFFFF1|r second.\n\nYou will remain in a meditative state until you toggle this ability off or are interrupted.",
SI_LUIE_SKILL_INTROSPECTION_TP = "Healing and restoring Magicka and Stamina every |cFFFFFF1|r second.\n\nMaintaining the channel increases the Health restored by |cFFFFFF10|r% every tick, up to a maximum of |cFFFFFF50|r%.\n\nYou will remain in a meditative state until you toggle this ability off or are interrupted.",
-- Undaunted
SI_LUIE_SKILL_BLOOD_ALTAR_TP = "Enemies within |cFFFFFF28|r meters of the Altar are afflicted with Minor Lifesteal.\n\nAllies in the area can activate the |cFFFFFFBlood Funnel|r synergy, healing for |cFFFFFF40|r% of their Max Health.",
SI_LUIE_SKILL_OVERFLOWING_ALTAR_TP = "Enemies within |cFFFFFF28|r meters of the Altar are afflicted with Minor Lifesteal.\n\nAllies in the area can activate the |cFFFFFFBlood Feast|r synergy, healing for |cFFFFFF65|r% of their Max Health.",
SI_LUIE_SKILL_TRAPPING_WEBS_TP = "Enemies caught in the webs are snared, reducing their Movement Speed by |cFFFFFF50|r%.\n\nAfter |cFFFFFF5|r seconds the webs explode, dealing Poison Damage to enemies within.\n\nA ranged ally targeting an enemy in the webs can activate the |cFFFFFFSpawn Broodlings|r synergy.",
SI_LUIE_SKILL_SHADOW_SILK_TP = "Enemies caught in the webs are snared, reducing their Movement Speed by |cFFFFFF50|r%.\n\nAfter |cFFFFFF5|r seconds the webs explode, dealing Poison Damage to enemies within.\n\nA ranged ally targeting an enemy in the webs can activate the |cFFFFFFBlack Widows|r synergy.",
SI_LUIE_SKILL_TANGLING_WEBS_TP = "Enemies caught in the webs are snared, reducing their Movement Speed by |cFFFFFF50|r%.\n\nAfter |cFFFFFF5|r seconds the webs explode, dealing Poison Damage to enemies within.\n\nA ranged ally targeting an enemy in the webs can activate the |cFFFFFFArachnophobia|r synergy.",
SI_LUIE_SKILL_TRAPPING_WEBS_SNARE_TP = "Movement Speed reduced by |cFFFFFF50|r%.\n\nAfter |cFFFFFF5|r seconds the webs explode, dealing Poison damage.",
SI_LUIE_SKILL_RADIATE_TP = "Afflicted with Magic Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nWhen this effect ends, you and nearby allies take additional Magic Damage.",
SI_LUIE_SKILL_SPAWN_BROODLINGS_TP = "Attacking nearby enemies. The spider remains for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_BONE_SHIELD_TP = "Absorbing damage for |cFFFFFF<<1>>|r seconds.\n\nAn ally near you can activate the |cFFFFFFBone Wall|r synergy.",
SI_LUIE_SKILL_SPIKED_BONE_SHIELD_TP = "Absorbing damage for |cFFFFFF<<1>>|r seconds and returning |cFFFFFF43|r% of any direct damage absorbed back to the enemy.\n\nAn ally near you can activate the |cFFFFFFBone Wall|r synergy.",
SI_LUIE_SKILL_BONE_SURGE_TP = "Absorbing damage for |cFFFFFF<<1>>|r seconds.\n\nAn ally near you can activate the |cFFFFFFSpinal Surge|r synergy.",
----------------------------------------------------------------
-- AVA SKILLS --------------------------------------------------
----------------------------------------------------------------
-- Assault
SI_LUIE_SKILL_CONTINUOUS_ATTACK_RANK_1_TP = "Increase Weapon and Spell Damage by |cFFFFFF5|r% and Magicka and Stamina Recovery by |cFFFFFF10|r% for |cFFFFFF10|r minutes.",
SI_LUIE_SKILL_CONTINUOUS_ATTACK_RANK_2_TP = "Increase Weapon and Spell Damage by |cFFFFFF10|r% and Magicka and Stamina Recovery by |cFFFFFF20|r% for |cFFFFFF10|r minutes.",
SI_LUIE_SKILL_RAPID_MANEUVER_TP = "Gain Major Expedition and Major Gallop for |cFFFFFF<<1>>|r seconds.\n\nThe effect ends if you cast any spell on an enemy or ally.",
SI_LUIE_SKILL_RETREATING_MANEUEVER_TP = "Gain Major Expedition and Major Gallop for |cFFFFFF<<1>>|r seconds.\n\nAttacks from behind deal |cFFFFFF15|r% less damage while this effect persists.\n\nThe effect ends if you cast any spell on an enemy or ally.",
SI_LUIE_SKILL_CHARGING_MANEUVER_TP = "Gain Major Expedition and Major Gallop for |cFFFFFF<<1>>|r seconds.\n\nThe effect ends if you cast any spell on an enemy or ally, but you gain Minor Expedition for |cFFFFFF8|r seconds.",
SI_LUIE_SKILL_CALTROPS_TP = "Enemies standing in the caltrops take Physical Damage every |cFFFFFF1|r second and have their Movement Speed reduced by |cFFFFFF30|r%.",
SI_LUIE_SKILL_ANTI_CAVALRY_CALTROPS_TP = "Enemies standing in the caltrops take Physical Damage every |cFFFFFF1|r second and have their Movement Speed reduced by |cFFFFFF30|r%.\n\nThe caltrops rapidly drain the Mount Stamina of any enemy in the area.",
SI_LUIE_SKILL_ANTI_CAVALRY_CALTROPS_DEBUFF_TP = "Taking Physical Damage every |cFFFFFF1|r second and Movement Speed reduced by |cFFFFFF30|r%.\n\nThe caltrops rapidly drain Mount Stamina.",
SI_LUIE_SKILL_MAGICKA_DETONATION_TP = "Cursed with a magical bomb that explodes after |cFFFFFF<<1>>|r seconds, dealing Magic Damage to you and any allies within |cFFFFFF8|r meters.\n\nEach ally within the bomb's radius increases the damage by |cFFFFFF25|r%, up to a maximum of |cFFFFFF250|r% increased damage.",
SI_LUIE_SKILL_INEVITABLE_DETONATION_TP = "Cursed with a magical bomb that explodes after |cFFFFFF<<1>>|r seconds, dealing Magic Damage to you and any allies within |cFFFFFF8|r meters.\n\nEach ally within the bomb's radius increases the damage by |cFFFFFF25|r%, up to a maximum of |cFFFFFF250|r% increased damage.\n\nIf the bomb is dispelled or removed early, the explosion is triggered immediately.",
SI_LUIE_SKILL_PROXIMITY_DETONATION_TP = "Charging a magical bomb that explodes after |cFFFFFF<<1>>|r seconds, dealing Magic Damage to all enemies within |cFFFFFF8|r meters.\n\nEach enemy within the bomb's radius increases the damage by |cFFFFFF25|r%, up to a maximum of |cFFFFFF250|r% increased damage.",
SI_LUIE_SKILL_WAR_HORN_TP = "Increase Max Stamina and Max Magicka by |cFFFFFF10|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_WAR_HORN_DUMMY_TP = "Increase Max Stamina and Max Magicka.",
-- Support
SI_LUIE_SKILL_SIEGE_SHIELD_TP = "Reduce damage taken from siege weapons by |cFFFFFF50|r%.",
SI_LUIE_SKILL_SIEGE_SHIELD_GROUND_TP = "A protective sphere guards you and allies, reducing damage taken from siege weapons while in the bubble by |cFFFFFF50|r%.",
SI_LUIE_SKILL_SIEGE_WEAPON_SHIELD_TP = "Reduce damage taken from siege weapons by |cFFFFFF50|r%.\n\nYour siege weapons take |cFFFFFF90|r% reduced damage from enemy siege weapons.",
SI_LUIE_SKILL_SIEGE_WEAPON_SHIELD_GROUND_TP = "A protective sphere guards you and allies, reducing damage taken from siege weapons while in the bubble by |cFFFFFF50|r%.\n\nYou and allies' siege weapons in the bubble take |cFFFFFF90|r% reduced damage from enemy siege weapons.",
SI_LUIE_SKILL_PROPELLING_SHIELD_TP = "Reduce damage taken from siege weapons by |cFFFFFF50|r% and increase the range of abilities with a range greater than |cFFFFFF20|r meters by |cFFFFFF7|r meters.\n\nDoes not effect Leap, Move Position, and Pull abilities.",
SI_LUIE_SKILL_PROPELLING_SHIELD_GROUND_TP = "A protective sphere guards you and allies, reducing damage taken from siege weapons while in the bubble by |cFFFFFF50|r%.\n\nIncrease the range of you and allies' abilities with a range greater than |cFFFFFF20|r meters by |cFFFFFF7|r meters in the bubble.\n\nDoes not effect Leap, Move Position, and Pull abilities.",
SI_LUIE_SKILL_PURGE_TP = "Reduce the duration of new negative effects applied on you by |cFFFFFF50|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_GUARD_SELF_TP = "While the lifebond holds, |cFFFFFF30|r% of the damage your ally takes is redistributed to you.",
SI_LUIE_SKILL_GUARD_OTHER_TP = "While the lifebond holds, |cFFFFFF30|r% of the damage you take is redistributed to your ally.",
SI_LUIE_SKILL_REVEALING_FLARE_TP = "Revealed. You are unable to stealth.\n\nMovement Speed reduced by |cFFFFFF50|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_LINGERING_FLARE_TP = "Enemies in the target area are revealed and have their Movement Speed reduced by |cFFFFFF50|r% for |cFFFFFF3|r seconds.",
SI_LUIE_SKILL_SCORCHING_FLARE_TP = "Revealed. You are unable to stealth.\n\nAfflicted with Flame Damage every |cFFFFFF1.5|r seconds and Movement Speed reduced by |cFFFFFF50|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_REVIVING_BARRIER_TP = "Absorbing damage and healing every |cFFFFFF1.5|r seconds for |cFFFFFF30|r seconds.",
----------------------------------------------------------------
-- RACIAL SKILLS -----------------------------------------------
----------------------------------------------------------------
SI_LUIE_SKILL_HUNTERS_EYE_TP = "Increase Movement Speed by |cFFFFFF<<1>>|r% and Physical and Spell Penetration by |cFFFFFF<<2>>|r for |cFFFFFF6|r seconds.",
----------------------------------------------------------------
-- CYRODIIL ----------------------------------------------------
----------------------------------------------------------------
SI_LUIE_SKILL_AVA_SANCTUARY_TP = "While in a Sanctuary, you cannot attack other players and other players cannot attack you.",
SI_LUIE_SKILL_STOW_SIEGE_WEAPON = "Stow Siege Weapon",
SI_LUIE_SKILL_DEPLOY = "Deploy",
SI_LUIE_SKILL_PACT = "Pact",
SI_LUIE_SKILL_COVENANT = "Covenant",
SI_LUIE_SKILL_DOMINION = "Dominion",
SI_LUIE_SKILL_LIGHTNING_BALLISTA = "Lightning Ballista",
SI_LUIE_SKILL_LIGHTNING_BALLISTA_BOLT_TP = "Afflicted with Shock Damage every |cFFFFFF2|r seconds and Movement Speed reduced by |cFFFFFF50|r% for |cFFFFFF<<1>>|r seconds. Each tick drains |cFFFFFF10|r% of your Max Magicka.",
SI_LUIE_SKILL_MEATBAG_CATAPULT_TP = "Healing and Health Recovery reduced by |cFFFFFF50|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_MEATBAG_CATAPULT_GROUND_TP = "Enemies in the area take Disease Damage every |cFFFFFF1|r second and suffer |cFFFFFF50|r% reduced Healing and Health Recovery for |cFFFFFF6|r seconds.",
SI_LUIE_SKILL_OIL_CATAPULT_GROUND_TP = "Enemies in the oil are snared, reducing their Movement Speed by |cFFFFFF50|r% for |cFFFFFF6|r seconds.",
SI_LUIE_SKILL_SCATTERSHOT_CATAPULT_TP = "Increase damage taken from all sources by |cFFFFFF20|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_SCATTERSHOT_CATAPULT_GROUND_TP = "Enemies in the area take Physical Damage every |cFFFFFF1|r second and take |cFFFFFF20|r% more damage from all sources for |cFFFFFF6|r seconds.",
SI_LUIE_SKILL_COLD_STONE_TREBUCHET = "Cold Stone Trebuchet",
SI_LUIE_SKILL_COLD_FIRE_TREBUCHET = "Cold Fire Trebuchet",
SI_LUIE_SKILL_COLD_FIRE_BALLISTA = "Cold Fire Ballista",
SI_LUIE_SKILL_GUARD_DETECTION = "Vigilance",
SI_LUIE_SKILL_GUARD_DETECTION_TP = "Guards are particularly vigilant and can see nearby players that are hiding in stealth.",
SI_LUIE_SKILL_BLESSING_OF_WAR_TP = "Increase Alliance Points earned by |cFFFFFF20|r% for |cFFFFFF1|r hour.\n\nOnly active while in Cyrodiil or Cyrodiil delves.",
SI_LUIE_SKILL_PUNCTURE_CYRODIIL_TP = "Increase damage taken by |cFFFFFF30|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_RAZOR_ARMOR_TP = "Reduce damage taken by |cFFFFFF30|r% for |cFFFFFF<<1>>|r seconds.\n\nWhile active the armor returns Physical Damage to attackers.",
SI_LUIE_SKILL_PUNCTURING_CHAINS_TP = "Increase damage taken by |cFFFFFF21.5|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_UNSTABLE_CORE_CYRODIIL_TP = "Your single target ranged abilities are reflected back on you for |cFFFFFF<<1>>|r seconds.\n\nThe core explodes when this effect ends, dealing Magic Damage.",
SI_LUIE_SKILL_SHATTERING_PRISON_CYRODIIL_TP = "Disoriented for |cffffff<<1>>|r <<1[second/seconds]>>.\n\nThe prison shatters when this effect ends, dealing Magic Damage.",
SI_LUIE_SKILL_LETHAL_ARROW_CYRODIIL_TP = "Reduce healing received by |cFFFFFF50|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_SIEGE_SHIELD_CYRODIIL_TP = "Negate damage taken from Siege Weapons for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_POWER_BASH_CYRODIIL_TP = "Stunned for |cFFFFFF<<1>>|r seconds.\n\nWhen this effect ends you will be disoriented for |cffffff15|r seconds.",
SI_LUIE_SKILL_ELDER_SCROLL_TP = "Carrying the |cFFFFFF<<1>>|r.",
SI_LUIE_SKILL_MEATBAG_CATAPULT_AOE_TP = "Taking Disease Damage every |cFFFFFF1|r second.\n\nHealing and Health Recovery reduced by |cFFFFFF50|r% for |cFFFFFF6|r seconds whenever you take damage from this effect.",
SI_LUIE_SKILL_SCATTERSHOT_CATAPULT_AOE_TP = "Taking Physical Damage every |cFFFFFF1|r second.\n\nIncrease damage taken from all sources by |cFFFFFF20|r% for |cFFFFFF6|r seconds whenever you take damage from this effect.",
SI_LUIE_SKILL_CONSUME_LIFEFORCE = "Consume Lifeforce",
SI_LUIE_SKILL_RUINOUS_CYCLONE = "After |cFFFFFF2|r seconds, enemies within |cFFFFFF8|r meters take Physical Damage every |cFFFFFF0.5|r seconds for |cFFFFFF7|r seconds as long as the channel is maintained.\n\nEnemies within |cFFFFFF15|r meters are pulled closer to you while channeling.",
----------------------------------------------------------------
-- BATTLEGROUNDS -----------------------------------------------
----------------------------------------------------------------
SI_LUIE_SKILL_MARK_OF_THE_WORM_TP = "Cursed with a magical bomb that explodes after |cFFFFFF<<1>>|r seconds, dealing Magic Damage.",
----------------------------------------------------------------
-- TRAPS -------------------------------------------------------
----------------------------------------------------------------
SI_LUIE_SKILL_LAVA_STACK_TP = "Taking increasing Flame Damage every |cFFFFFF0.75|r seconds.\n\nDamage taken increased by |cFFFFFF75|r% per stack.",
SI_LUIE_SKILL_LAVA_TP = "Taking Flame Damage every |cFFFFFF0.75|r seconds.",
SI_LUIE_SKILL_LAVA_TRAP = "Lava Trap",
SI_LUIE_SKILL_LIGHTNING_TRAP = "Lightning Trap",
SI_LUIE_SKILL_SPIKE_TRAP_TP = "Movement Speed reduced by |cFFFFFF25|r% for |cFFFFFF5|r seconds.\n\nImmobilized for |cFFFFFF0.8|r seconds.",
SI_LUIE_SKILL_SPIKE_TRAP_AURIDON_TP = "Movement Speed reduced by |cFFFFFF25|r% for |cFFFFFF10|r seconds.\n\nThis effect stacks up to |cFFFFFF3|r times, to a maximum of |cFFFFFF75|r% Movement Speed reduction.\n\nStunned for |cFFFFFF1|r second.",
----------------------------------------------------------------
-- SETS --------------------------------------------------------
----------------------------------------------------------------
-- Set Names
SI_LUIE_SKILL_SET_BOGDAN_THE_NIGHTFLAME = "Bogdan the Nightflame",
SI_LUIE_SKILL_SET_LORD_WARDEN_DUSK = "Lord Warden Dusk",
SI_LUIE_SKILL_SET_MALUBETH_THE_SCOURGER = "Malubeth the Scourger",
SI_LUIE_SKILL_SET_TROLL_KING = "Troll King",
SI_LUIE_SKILL_SET_REDISTRIBUTION = "Redistribution",
SI_LUIE_SKILL_SET_ICE_FURNACE = "Ice Furnace",
SI_LUIE_SKILL_SET_COOLDOWN = "Перезарядка", -- Used as suffix for certain abilities internal cooldown
SI_LUIE_SKILL_DISGUISE_MONKS_DISGUISE = "Monk\'s Disguise",
-- Weapon Sets
SI_LUIE_SKILL_SET_ASYLUM_BOW = "Your next Snipe, Scatter Shot, or Poison Arrow used within |cffffff6|r seconds deals |cffffff<<1>>|r% additional damage.", -- TODO: Translate
SI_LUIE_SKILL_SET_ASYLUM_DESTRUCTION_STAFF = "Каждое третье применение Force Shock в течение |cffffff10|r секунд будет всегда накладывать эффекты Burning, Concussion и Chilled.",
SI_LUIE_SKILL_SET_ASYLUM_DESTRUCTION_STAFF_PERFECT = "Каждое второе применение Force Shock в течение |cffffff10|r секунд будет всегда накладывать эффекты Burning, Concussion и Chilled.",
SI_LUIE_SKILL_SET_ASYLUM_RESTORATION_STAFF = "Reduce the cost of your Magicka and Stamina healing abilities by |cffffff<<1>>|r% for |cffffff3|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_SET_MAELSTROM_DW = "Ваше следующие применение DoT-способности в течение |cffffff10|r секунд даст |cffffff2003|r урона Заклинаниями и Оружием.",
SI_LUIE_SKILL_SET_MAELSTROM_1H = "Ваша следующая полностью заряженная Силовая атака, применённая в течение |cffffff5|r секунд дополнительно восстановит |cffffff2000|r Магии и Запаса сил.",
SI_LUIE_SKILL_SET_MASTER_1H = "Gain up to |cffffff2500|r Spell and Physical Resistance for |cffffff3|r seconds based off the amount you healed with Puncturing Remedy.", -- TODO: Translate
SI_LUIE_SKILL_SET_BLACKROSE_1H_TP = "Снижает стоимость применения следующей способности ветки Одноручного оружия и щита на |cffffff100|r%.",
SI_LUIE_SKILL_SET_BLACKROSE_DESTRO_TP = "Afflicted with consecutive Flame, Shock, and Frost Damage every |cffffff2|r seconds for |cffffff8|r seconds.", -- TODO: Translate
-- Monster Helms
SI_LUIE_SKILL_SET_BALORGH = "Увеличивает урон от Оружия и Заклинаний на значение, вдвое большее, чем потраченные при применении ульты очки, на |cFFFFFF10|r секунд.",
SI_LUIE_SKILL_SET_BOGDAN = "You and allies within |cFFFFFF5|r meters of the totem are healed every |cFFFFFF1|r second.", -- TODO: Translate
SI_LUIE_SKILL_SET_DOMIHAUS_BUFF_STAMINA = "Повышает урон от Оружия, пока находитесь в круге.",
SI_LUIE_SKILL_SET_DOMIHAUS_DAMAGE_STAMINA = "Enemies on the edge of the ring take Physical Damage every |cffffff1|r second.\n\nIncrease Weapon Damage while standing within the ring.",
SI_LUIE_SKILL_SET_DOMIHAUS_BUFF_MAGICKA = "Повышает урон от Заклинаний, пока находитесь в круге.",
SI_LUIE_SKILL_SET_DOMIHAUS_DAMAGE_MAGICKA = "Enemies on the edge of the ring take Flame Damage every |cffffff1|r second.\n\nIncrease Spell Damage while standing within the ring.", -- TODO: Translate
SI_LUIE_SKILL_SET_EARTHGORE = "You and allies in the pool of blood are healed every |cFFFFFF1|r second.", -- TODO: Translate
SI_LUIE_SKILL_SET_GROTHDARR = "Enemies within |cFFFFFF8|r meters take Flame Damage every |cFFFFFF1|r секунду в течение |cFFFFFF5|r секунд.",
SI_LUIE_SKILL_SET_ICEHEART = "Absorbing damage for |cFFFFFF<<1>>|r seconds.\n\nEnemies within |cFFFFFF5|r meters take Frost Damage every |cFFFFFF1|r second while the damage shield holds.", -- TODO: Translate
SI_LUIE_SKILL_SET_ILAMBRIS = "Enemies within |cffffff4|r meters of the meteor shower take <<1>> Damage every |cFFFFFF1|r second.", -- TODO: Translate
SI_LUIE_SKILL_SET_LORD_WARDEN_BUFF = "You and allies within |cFFFFFF8|r meters of the shadow orb have increased Physical and Spell Resistance.", -- TODO: Translate
SI_LUIE_SKILL_SET_MALUBETH = "Высасывает здоровье каждые |cFFFFFF0.5|r секунды в течение |cFFFFFF4|r секунд, пока луч активен.",
SI_LUIE_SKILL_SET_MAW_OF_THE_INFERNAL = "A fire breathing Daedroth fights at your side. The daedroth remains for |cFFFFFF15|r seconds or until killed.", -- TODO: Translate
SI_LUIE_SKILL_SET_MIGHTY_CHUDAN = "Mighty Chudan",
SI_LUIE_SKILL_SET_MOLAG_KENA_TP = "При нанесении урона |cFFFFFF2|r последовательными обычными атаками, активируется способность |cFFFFFFOverload|r на |cFFFFFF6|r секунд.",
SI_LUIE_SKILL_SET_MOLAG_KENA_OVERKILL_TP = "Увеличивает урон от Оружия и Заклинания, но повышает стоимость способностей на |cFFFFFF20|r% в течение |cFFFFFF6|r секунд.",
SI_LUIE_SKILL_SET_PIRATE_SKELETON_TP = "Gain Major Protection and Minor Defile for |cFFFFFF12|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_SET_SENTINEL_OF_REKUGAMZ_TP = "After |cFFFFFF2|r seconds, you and allies within |cffffff5|r meters of the Dwemer Spider are healed every |cffffff1|r second.", -- TODO: Translate
SI_LUIE_SKILL_SET_SHADOWREND_TP = "A shadowy Clannfear fights at your side. The clannfear remains for |cFFFFFF15|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_SET_SLIMECRAW = "Slimecraw",
SI_LUIE_SKILL_SET_SPAWN_OF_MEPHALA_TP = "Противники в радиусе |cffffff4|r метров от паутины получают урон Ядом каждую |cffffff1|r секунду, а их скорость передвижения снижена на |cffffff50|r% в течение |cffffff10|r секунд.",
SI_LUIE_SKILL_SET_STORMFIST_TP = "Enemies within |cffffff4|r meters of the thunderfist take Shock Damage every |cffffff1|r second.\n\nAfter |cffffff3|r seconds the fist closes, dealing Physical Damage.", -- TODO: Translate
SI_LUIE_SKILL_STORMFIST_GROUND_TP = "Taking Shock Damage every |cFFFFFF1|r second.\n\nAfter |cffffff3|r seconds the fist closes, dealing Physical Damage.", -- TODO: Translate
SI_LUIE_SKILL_SET_ENGINE_GUARDIAN = "Восстанавливает <<1>> каждые |cffffff0.5|r секунды в течение |cffffff6.5|r секунд.",
SI_LUIE_SKILL_SET_THE_TROLL_KING_TP = "Восстановление Здоровья увеличено в течение |cffffff10|r секунд.",
SI_LUIE_SKILL_SET_THURVOKUN_TP = "Enemies in the pool take Disease Damage every |cffffff1|r second and are afflicted with Minor Maim and Minor Defile for |cffffff4|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_SET_ZAAN_TP = "Afflicted with Flame Damage every |cffffff1|r second for |cffffff5|r seconds while the beam holds.\n\nDeals |cFFFFFF50|r% increased damage every |cFFFFFF1|r second.",
SI_LUIE_SKILL_SET_ENERGY_CHARGE = "Energy Charge",
SI_LUIE_SKILL_SET_ENERGY_CHARGE_TP = "Gain an Energy Charge for |cffffff<<1>>|r seconds when you block an attack.\n\nWhen you gain |cffffff6|r charges, release the energy, restoring Stamina and Magicka and Healing.",
SI_LUIE_SKILL_SET_MERIDIAS_FAVOR_TP = "Restoring Magicka or Stamina, whichever maximum is higher, every |cffffff1|r second for |cffffff<<1>>|r seconds.",
SI_LUIE_SKILL_SET_AURORANS_THUNDER_TP = "Enemies in a cone in front of you take Shock Damage every |cffffff0.5|r seconds for |cffffff<<1>>|r seconds.",
SI_LUIE_SKILL_SET_TZOGVINS_WARBAND_TP = "Increase Weapon Critical for |cffffff10|r seconds, stacking up to |cffffff10|r times.\n\nAt max stacks, you also gain Minor Force.",
SI_LUIE_SKILL_SET_FROZEN_WATCHER_TP = "Nearby enemies take Frost Damage every |cffffff1|r second while you are blocking.\n\nYour blizzard has a |cffffff15|r% chance of inflicting Chilled on enemies damaged.",
-- Crafted Sets
SI_LUIE_SKILL_SET_ALESSIAS_BULWARK = "Урон от Оружия снижен на |cffffff10|r% в течение |cFFFFFF5|r секунд.",
SI_LUIE_SKILL_SET_CLEVER_ALCHEMIST = "Урон от оружие и Заклинаний увеличен в течение |cFFFFFF15|r секунд.",
SI_LUIE_SKILL_SET_ETERNAL_HUNT = "Взрывается при приближении противника, нанося урон Ядом и обездвиживая их на |cFFFFFF1.5|r секунды.",
SI_LUIE_SKILL_SET_MORKULDIN = "An animated weapon fights at your side. The animated weapon remains for |cFFFFFF15|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_SET_TAVAS_FAVOR = "Generating |cFFFFFF3|r Ultimate every |cFFFFFF1|r second for |cFFFFFF3|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_SET_TRIAL_BY_FIRE = "Повышает <<1>> сопротивляемость в течении |cffffff4|r секунд.",
SI_LUIE_SKILL_SET_VARENS_LEGACY = "Your next direct damage area of effect attack used within |cFFFFFF<<1>>|r seconds deals additional damage.", -- TODO: Translate
SI_LUIE_SKILL_SET_MECHANICAL_ACUITY = "Повышает шанс критического удара Заклинанием и Оружием до |cFFFFFF100|r% в течение |cffffff5|r секунд.",
SI_LUIE_SKILL_SET_ADEPT_RIDER = "Enemies in the dust cloud take Physical Damage every |cffffff1|r second.", -- TODO: Translate
SI_LUIE_SKILL_SET_SENCHE_RAHTS_GRIT = "Increase healing received by |cffffff6|r% and Physical and Spell Resistance for |cffffff<<1>>|r seconds.",
SI_LUIE_SKILL_SET_VASTARIES_TUTELAGE = "Increase Weapon and Spell Damage and reduce the Magicka, Stamina, and Health cost of abilities by |cffffff10|r% for |cffffff<<1>>|r seconds.",
-- Light / Medium / Heavy Armor Sets
SI_LUIE_SKILL_SET_BAHRAHAS_CURSE_TP = "Enemies in the desecrated ground take Magic Damage every |cffffff1|r second and have their Movement Speed reduced by |cffffff70|r%.\n\nYou heal for |cffffff100|r% of the damage done.", -- TODO: Translate
SI_LUIE_SKILL_BAHRAHAS_CURSE_GROUND_TP = "Taking Magic Damage every |cFFFFFF1|r second and Movement Speed reduced by |cFFFFFF70|r%.\n\nEach tick heals your attacker.", -- TODO: Translate
SI_LUIE_SKILL_SET_WAY_OF_MARTIAL_KNOWLEDGE_TP = "Increase damage taken from the next attack by |cffffff10|r%.", -- TODO: Translate
SI_LUIE_SKILL_SET_BRIARHEART_TP = "Ваши критические удары исцеляют вас в течение |cffffff10|r секунд.",
SI_LUIE_SKILL_SET_SENCHE_TP = "Увеличен урон от Оружия и шанс критического удара на |cffffff5|r секунд.",
SI_LUIE_SKILL_SET_UNFATHOMABLE_DARKNESS_TP = "Every |cffffff3|r seconds a crow will be sent to peck the closest enemy within |cffffff12|r meters, dealing Physical Damage.", -- TODO: Translate
SI_LUIE_SKILL_SET_SHALK_EXOSKELETON = "Shalk Exoskeleton",
SI_LUIE_SKILL_SET_ORDER_OF_DIAGNA = "Order of Diagna",
SI_LUIE_SKILL_SET_STORM_KNIGHT_TP = "Enemies within |cffffff5|r meters take Shock Damage every |cffffff2|r seconds for |cffffff6|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_SET_VAMPIRE_CLOAK = "Vampire Cloak",
SI_LUIE_SKILL_SET_WARRIOR_POET = "Warrior-Poet",
SI_LUIE_SKILL_SET_GRACE_OF_GLOOM_TP = "Your Light and Heavy Attacks heal you for the next |cffffff5|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_SET_DRAUGRS_REST_TP = "You and allies within |cffffff5|r meters of the consecrated circle heal every |cffffff1|r second.", -- TODO: Translate
SI_LUIE_SKILL_SET_OVERWHELMING_SURGE_TP = "The closest enemy within |cffffff12|r meters takes Shock Damage every |cffffff1|r second for |cffffff6|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_SANCTUARY_TP = "Увеличивает получаемое исцеление на |cffffff12|r%.",
SI_LUIE_SKILL_SHROUD_OF_THE_LICH_TP = "Увеличивает восстановление Магии на |cffffff20|r секунд.",
SI_LUIE_SKILL_SET_NOBLE_DUELIST = "Noble Duelist's Silks",
SI_LUIE_SKILL_SET_WORMS_RAIMENT_TP = "Снижает стоимость способностей, расходующих Магию, на |cffffff4|r%.",
SI_LUIE_SKILL_SET_HIRCINES_VENEER_TP = "Снижает стоимость способностей, расходующих Запас сил, на |cffffff4|r%.",
SI_LUIE_SKILL_SET_JAILBREAKER = "Jailbreaker",
SI_LUIE_SKILL_PLAGUE_SLINGER_TP = "Выпускает ядовитый шар в ближайшего противника, нанося урон от Яда каждую |cffffff1|r секунду в течение |cffffff<<1>>|r секунд.",
SI_LUIE_SKILL_SET_STORM_MASTER_TP = "Ваши Обычные атаки наносят урон от Электричества в течение |cffffff20|r секунд.",
SI_LUIE_SKILL_SET_TOOTHROW = "Toothrow",
SI_LUIE_SKILL_SET_BLOOD_SCENT = "When you deal Critical Damage with a melee Light Attack, you gain a stack of Blood Scent for |cffffff8|r seconds.\n\nWhen you gain |cffffff5|r stacks, you become Frenzied for |cffffff5|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_SET_FRENIZED = "Увеличивает урон от Обычных атак и их скорость на |cffffff50|r% а течение |cffffff5|r секунд.",
SI_LUIE_SKILL_SET_EBON_ARMORY = "Увеличивает максимальное Здоровье.",
SI_LUIE_SKILL_SET_EMBERSHIELD = "Increase Spell Resistance.\n\nEnemies within |cffffff5|r meters take Flame Damage every |cffffff1|r second for |cffffff6|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_SET_HAGRAVENS_GARDEN = "Any damage you take from enemies outside of the preservation is reduced by |cffffff50|r%.\n\nThe first time an enemy tries to enter the preservation they are knocked back |cffffff5|r meters.", -- TODO: Translate
SI_LUIE_SKILL_SET_JOLTING_ARMS = "Increase Spell Resistance for |cffffff<<1>>|r seconds and your next Bash deals additional Shock Damage.", -- TODO: Translate
SI_LUIE_SKILL_SET_LEECHING_PLATE_TP = "Enemies in the |cffffff5|r meter radius of the poison cloud take Poison Damage every |cffffff1|r second.\n\nYou heal for |cffffff100|r% of the damage dealt.",
SI_LUIE_SKILL_SET_MEDUSA = "Medusa",
SI_LUIE_SKILL_SET_HAND_OF_MEPHALA_TP = "Enemies in the web have their Movement Speed reduced by |cffffff50|r% for |cffffff5|r seconds.\n\nAfter |cffffff5|r seconds the webs burst into venom, dealing Poison Damage and applying Minor Fracture to any enemy hit for |cffffff5|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_SET_RATTLECAGE = "Rattlecage",
SI_LUIE_SKILL_SET_DREUGH_KING_SLAYER = "Dreugh King Slayer",
SI_LUIE_SKILL_LEECHING_PLATE_GROUND_TP = "Taking Poison Damage every |cFFFFFF1|r second.\n\nEach tick heals your attacker for |cffffff100|r% of the damage dealt.",
SI_LUIE_SKILL_HAND_OF_MEPHALA_GROUND_TP = "Movement Speed reduced by |cffffff50|r%.\n\nAfter |cffffff5|r seconds the webs burst into venom, dealing Poison Damage and applying Minor Fracture for |cffffff5|r seconds.",
-- Trial Sets
SI_LUIE_SKILL_SET_BERSERKING_WARRIOR_TP = "Increase Weapon Critical for |cffffff<<1>>|r seconds, stacking up to |cffffff5|r times.", -- TODO: Translate
SI_LUIE_SKILL_SET_ETERNAL_IMMORTAL_WARRIOR_TP = "Вы недавно были обращены в статую и не можете избежать смерти этим способом снова.",
SI_LUIE_SKILL_SET_DESTRUCTIVE_MAGE_TP = "Когда другой игрок поразит эту же цель полностью заряженной Силовой атакой, бомба взорвётся, нанося Магический урон всем противникам в радиусе |cffffff8|r метров.",
SI_LUIE_SKILL_SET_HEALING_MAGE_TP = "Снижает урон от Оружия на |cffffff3|r секунды.",
SI_LUIE_SKILL_SET_TWICE_FANGED_SERPENT_TP = "Повышает Физическое пробитие на |cffffff3|r секунды, суммируется до |cffffff5|r раз.",
SI_LUIE_SKILL_SET_LUNAR_BASTION_TP = "Absorb damage every |cffffff2|r seconds while standing in the lunar blessing.", -- TODO: Translate
SI_LUIE_SKILL_SET_VESTMENT_OF_OLORIME_TP = "You and allies standing in the circle of might gain Major Courage for |cffffff30|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_SET_MANTLE_OF_SIRORIA_TP = "Standing in the ring grants you a stack of Siroria's Boon every |cffffff1|r second.", -- TODO: Translate
SI_LUIE_SKILL_SET_SIRORIAS_BOON_TP = "Увеличивает урон от Заклинаний на |cffffff30|r в течение |cffffff5|r секунд, суммируется максимум до |cffffff20|r раз.",
SI_LUIE_SKILL_SET_RELEQUENS_TP = "Afflicted with Physical damage every |cffffff1|r second for |cffffff5|r seconds.", -- TODO: Translate
SI_LUIE_SKILL_SET_EYE_OF_NAHVIINTAAS = "Reduce the Magicka, Stamina, and Health cost of abilities by |cffffff12|r% for |cffffff<<1>>|r seconds.",
-- Battleground Sets
SI_LUIE_SKILL_SET_COWARDS_GEAR = "Coward's Gear",
SI_LUIE_SKILL_SET_VANGUARDS_CHALLENGE_TP = "Наносите на |cffffff100|r% больше урона игроку, который провоцирует вас, но на |cffffff50|r% меньше урона другим игрокам в течение |cffffff15|r секунд.",
-- Imperial City Sets
SI_LUIE_SKILL_SET_GALERIONS_REVENGE_TP = "Marked for |cffffff15|r seconds.\n\nIf |cffffff6|r Marks of Revenge are applied they detonate for Magic Damage.", -- TODO: Translate
SI_LUIE_SKILL_SET_MERITORIUS_SERVICE_TP = "Increase Physical and Spell Resistance for |cffffff2|r minutes.", -- TODO: Translate
SI_LUIE_SKILL_SET_PHOENIX_TP = "Вы недавно возродились как феникс и не можете избежать смерти этим способом снова.",
SI_LUIE_SKILL_SET_VICECANON_OF_VENOM_TP = "Afflicted with Poison Damage every |cffffff1|r second for |cffffff<<1>>|r seconds.\n\nEach tick heals your attacker.",
-- Alliance War Sets
SI_LUIE_SKILL_SET_SOLDIER_OF_ANGUISH_TP = "Нивелирует получаемое исцеление в течение |cffffff4|r секунд.",
SI_LUIE_SKILL_SET_SPELL_STRATEGIST_TP = "Увеличивает урон от Заклинаний против цели в течение |cffffff5|r секунд.",
SI_LUIE_SKILL_SET_SUCCESSION_TP = "Увеличивает урон от Заклинаний атакам, наносящим урон с типом \"<<1>>\", в течение |cffffff4|r секунд.",
SI_LUIE_SKILL_SET_PARA_BELLUM_TP = "Даёт щит от урона, если вы не получали никакого урона в течение как минимум |cffffff10|r секунд.",
SI_LUIE_SKILL_SET_GLORIOUS_DEFENDER_TP = "|cffffff100|r% шанс уклониться от следующей атаки.",
SI_LUIE_SKILL_SET_HEALERS_HABIT = "Healer's Habit",
SI_LUIE_SKILL_SET_CYRODIILS_LIGHT_TP = "Ваша следующая способность, расходующая Магию, применённая в течение |cffffff30|r секунд, будет применена бесплатно.",
SI_LUIE_SKILL_SET_MORAG_TONG_TP = "Увеличивает урон, получаемый от способностей с уроном от Яда, на |cffffff10|r% в течение |cffffff5|r секунд.",
SI_LUIE_SKILL_SET_WARRIORS_FURY_TP = "Increase Weapon Damage for |cffffff6|r seconds when you take Critical Damage, stacking up to |cffffff25|r times.",
SI_LUIE_SKILL_SET_ROBES_OF_TRANSMUTATION_TP = "Increase Critical Resistance for |cffffff20|r seconds.",
SI_LUIE_SKILL_SET_BECKONING_STEEL_TP = "Reduce damage taken from projectiles by |cffffff10|r%.",
SI_LUIE_SKILL_SET_SENTRY_TP = "Dramatically increase Stealth Detection radius for |cffffff<<1>>|r seconds.",
SI_LUIE_SKILL_SET_SENTRY_ICD_TP = "You have recently crouched to increase detection and cannot do so again.",
----------------------------------------------------------------
-- NPC ABILITY / QUEST TOOLTIPS --------------------------------
----------------------------------------------------------------
SI_LUIE_SKILL_ANCHOR_DROP = "Anchor Drop",
SI_LUIE_SKILL_SHIELD_RUSH = "Shield Rush",
SI_LUIE_SKILL_BLITZ = "Blitz",
SI_LUIE_SKILL_BARRELING_CHARGE = "Barreling Charge",
SI_LUIE_SKILL_ZOOM = "Zoom",
SI_LUIE_SKILL_PLOW = "Plow",
SI_LUIE_SKILL_DEFENSIVE_WARD = "Defensive Ward",
SI_LUIE_SKILL_INSPIRE = "Inspire",
SI_LUIE_SKILL_HIDE_IN_SHADOWS = "Hide in Shadows",
SI_LUIE_SKILL_SHADOWY_BARRIER = "Shadowy Barrier",
SI_LUIE_SKILL_MIGHTY_CHARGE = "Mighty Charge",
SI_LUIE_SKILL_DETECTION = "Detection",
SI_LUIE_SKILL_IMPROVED_SHOCK_TORRENT = "Improved Shock Torrent",
SI_LUIE_SKILL_SIEGE_BARRIER = "Siege Barrier",
SI_LUIE_SKILL_PUNCTURING_CHAINS = "Puncturing Chains",
SI_LUIE_SKILL_IMPROVED_VOLLEY = "Improved Volley",
SI_LUIE_SKILL_FIRE_TORRENT = "Fire Torrent",
SI_LUIE_SKILL_RIP_AND_TEAR = "Rip and Tear",
SI_LUIE_SKILL_LEECHING_BITE = "Leeching Bite",
SI_LUIE_SKILL_FETCHERFLY_COLONY = "Fetcherfly Colony",
SI_LUIE_SKILL_EMPOWER_ATRONACH_FLAME = "Empower Atronach: Flame",
SI_LUIE_SKILL_EMPOWER_ATRONACH_FROST = "Empower Atronach: Frost",
SI_LUIE_SKILL_EMPOWER_ATRONACH_STORM = "Empower Atronach: Storm",
SI_LUIE_SKILL_EMPOWER_ATRONACH_FLAME_TP = "The death of a nearby Flame Atronach has empowered this Air Atronach, granting it the use of |cFFFFFFFlame Tornado|r for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_EMPOWER_ATRONACH_FLAME_UNLIMITED_TP = "This Air Atronach is empowered, granting it the use of |cFFFFFFFlame Tornado|r.",
SI_LUIE_SKILL_EMPOWER_ATRONACH_STORM_TP = "The death of a nearby Storm Atronach has empowered this Air Atronach, granting it the use of |cFFFFFFLightning Rod|r for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_EMPOWER_ATRONACH_FROST_TP = "The death of a nearby Frost Atronach has empowered this Air Atronach, granting it the use of |cFFFFFFIce Vortex|r for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_STORM_BOUND_TP = "Afflicted with Shock Damage every |cFFFFFF1|r second and Movement Speed reduced by |cFFFFFF50|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_CHILLING_AURA_TP = "Nearby enemies have their Movement Speed reduced by |cFFFFFF20|r%.",
SI_LUIE_SKILL_RADIANCE_TP = "Nearby enemies take Flame Damage every |cFFFFFF1|r second.",
SI_LUIE_SKILL_LIGHTNING_ROD_TP = "Afflicted with Shock Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nDeals additional Shock Damage if the channel is finished.",
SI_LUIE_SKILL_COLOSSAL_STOMP = "Colossal Stomp",
SI_LUIE_SKILL_DUST_CLOUD = "Dust Cloud",
SI_LUIE_SKILL_BATTLE_SPIRIT = "Battle Spirit",
SI_LUIE_SKILL_COLD_FIRE_TRAP = "Cold Fire Trap",
SI_LUIE_SKILL_LAVA_FOOT_STOMP = "Lava Foot Stomp",
SI_LUIE_SKILL_KNIFE_JUGGLING = "Knife Juggling",
SI_LUIE_SKILL_TORCH_JUGGLING = "Torch Juggling",
SI_LUIE_SKILL_WALL_OF_FLAMES = "Wall of Flames",
SI_LUIE_SKILL_TRAIL_OF_FLAMES = "Trail of Flames",
SI_LUIE_SKILL_CONSECRATE_SHRINE = "Consecrate Shrine",
SI_LUIE_SKILL_UNSTABLE_PORTAL = "Unstable Portal",
SI_LUIE_SKILL_STABILIZE_PORTAL = "Stabilize Portal",
SI_LUIE_SKILL_CLOSE_UNSTABLE_RIFT = "Close Unstable Rift",
SI_LUIE_SKILL_FLAME_BLOSSOM = "Flame Blossom",
SI_LUIE_SKILL_SAHDINAS_ESSENCE = "Sahdina's Essence",
SI_LUIE_SKILL_RASHOMTAS_ESSENCE = "Rashomta's Essence",
SI_LUIE_SKILL_POLYMORPH_SKELETON = "Polymorph: Skeleton",
SI_LUIE_SKILL_DRAIN_ENERGY = "Drain Energy",
SI_LUIE_SKILL_FIRELIGHT_TP = "Увеличивает Запас сил на |cFFFFFF5|r% в течение |cFFFFFF30|r минут.",
SI_LUIE_SKILL_BARRIER_REBUKE = "Barrier Rebuke",
SI_LUIE_SKILL_TELEPORT_SCROLL = "Teleport Scroll",
SI_LUIE_SKILL_BIND_HANDS = "Bind Hands",
SI_LUIE_SKILL_BIND_BEAR = "Bind Bear",
SI_LUIE_SKILL_IMPROVED = "Improved",
SI_LUIE_SKILL_AETHERIAL_SHIFT = "Aetherial Shift",
SI_LUIE_SKILL_FREE_SPIRIT = "Free Spirit",
SI_LUIE_SKILL_UNBIND = "Unbind",
SI_LUIE_SKILL_BACKFIRE = "Backfire",
SI_LUIE_SKILL_DIVINE_SPEED_TP = "A divine blessing boosts your Movement Speed for |cFFFFFF2|r minutes.", -- TODO: ADD % -- TODO: Translate
SI_LUIE_SKILL_QUEST_LIGHTNING_FURY_TP = "Lightning courses through your body causing all weapon attacks to deal Shock Damage.", -- TODO: Translate
SI_LUIE_SKILL_MANTLES_SHADOW = "Mantle's Shadow",
SI_LUIE_SKILL_THROW_WATER = "Throw Water",
SI_LUIE_SKILL_VISION_JOURNEY_TP = "Вам открывается истинная природа леса.",
SI_LUIE_SKILL_SNAKE_SCALES_TP = "Увеличивает наносимый урон на |cffffff5|r% и снижает получаемый урон на |cffffff5|r% пока вы в Гратвуде.",
SI_LUIE_SKILL_WOLFS_PELT_TP = "Увеличивает скорость передвижения на |cffffff4|r% и наносимый урон на |cffffff5|r% пока вы в Гратвуде.",
SI_LUIE_SKILL_TIGERS_FUR_TP = "Увеличивает скорость передвижения на |cffffff4|r% и снижает получаемый урон на |cffffff5|r% пока вы в Гратвуде.",
SI_LUIE_SKILL_SOUL_BINDING_TP = "Вызывает ослабленную душу даэдра, заряжающую сигильскую жеоду.",
SI_LUIE_SKILL_EMPOWER_TWILIT_HEART = "Empower Twilit Heart",
SI_LUIE_SKILL_BLACKSAPS_BREW_TP = "Повышает скорость передвижения на |cffffff4|r% и снижает получаемый урон на |cffffff10|r% в течение |cffffff30|r минут.",
SI_LUIE_SKILL_SPIRIT_ARMOR_TP = "Увеличивает броню на |cffffff5|r%.",
SI_LUIE_SKILL_RESTRICTING_VINES = "Restricting Vines",
SI_LUIE_SKILL_CHANGE_CLOTHES = "Change Clothes",
SI_LUIE_SKILL_FANCY_CLOTHING = "Fancy Clothing",
SI_LUIE_SKILL_FANCY_CLOTHING_TP = "Dressed to impress!",
SI_LUIE_SKILL_BURROW_TP = "Вы защищены от вреда и сокрыты земным покровом.",
SI_LUIE_SKILL_SERPENT_SPIT = "Serpent Spit",
SI_LUIE_SKILL_SHADOW_WOOD = "Shadow Wood",
SI_LUIE_SKILL_SHADOW_WOOD_TP = "Слуга тени принца Неймона утащил вас в Теневое древо.",
SI_LUIE_SKILL_BEAR_FEROCITY_TP = "Immune to all crowd control and movement impairing effects for |cffffff<<1>>|r seconds.",
SI_LUIE_SKILL_BOSS_CC_IMMUNITY = "Boss Immunities",
SI_LUIE_SKILL_SLAUGHTERFISH_ATTACK_TP = "You are being devoured by a swarm of Slaughterfish, turn back before it's too late!",
SI_LUIE_SKILL_RECOVER_TP = "Wounded and out of the fight, recovering Health over |cffffff<<1>>|r seconds.",
SI_LUIE_SKILL_RECOVER_DUEL_TP = "Wounded and recovering, you will heal after |cffffff<<1>>|r seconds.",
SI_LUIE_SKILL_BACKSTABBER_TP = "Increase damage done by |cffffff20|r% when you attack an enemy from behind.",
SI_LUIE_SKILL_HARDENED_CARAPACE_TP = "Reduce damage taken by |cffffff<<1>>|r% for each stack remaining.\n\nLose one stack upon taking any damage.",
SI_LUIE_SKILL_CLEAVE_STANCE_TP = "Cleaving with wild abandon for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_DEFENSIVE_WARD_TP = "Reduce damage taken by |cFFFFFF75|r% for |cFFFFFF<<1>>|r seconds as long as the channel is maintained.",
SI_LUIE_SKILL_SOUL_TETHER_NPC_TP = "Afflicted with Magic Damage every |cFFFFFF1|r second for |cFFFFFF8|r seconds.\n\nStunned for |cFFFFFF2|r seconds.",
SI_LUIE_SKILL_SIPHONING_STRIKES_NPC_TP = "Your attacks heal you while this ability is toggled on.",
SI_LUIE_SKILL_FOCUSED_HEALING_TP = "Healing every |cFFFFFF0.5|r seconds for |cFFFFFF<<1>>|r seconds while the channel is maintained.\n\nHealing doubles in power after |cFFFFFF2|r seconds.",
SI_LUIE_SKILL_RITE_OF_PASSAGE_NPC_TP = "Reduce damage taken by |cFFFFFF80|r% while the channel is maintained.",
SI_LUIE_SKILL_INJECT_LARVA_TP = "You have been injected with a wasp larva. At the end of its |cFFFFFF<<1>>|r second gestation, it will burst out of you, dealing Physical Damage and spawning a Young Wasp.",
SI_LUIE_SKILL_THROW_DAGGER_TP = "Afflicted with Bleeding Damage every |cFFFFFF1|r second for |cFFFFFF8|r seconds.\n\nMovement Speed reduced by |cFFFFFF40|r% for |cFFFFFF4|r seconds.",
SI_LUIE_SKILL_AGONY_TP = "Stunned for |cFFFFFF<<1>>|r <<1[second/seconds]>>.\n\nWhen this effect ends you will be afflicted with Magic Damage every |cFFFFFF1|r second for |cFFFFFF7|r seconds.",
SI_LUIE_SKILL_HARMONY_TP = "Reduce damage taken by |cFFFFFF20|r% for |cFFFFFF<<1>>|r seconds as long as another Lamia is nearby.",
SI_LUIE_SKILL_SUMMON_SPECTRAL_LAMIA_TP = "A Spectral Lamia fights at your side. The lamia remains for |cFFFFFF2|r minutes or until killed.",
SI_LUIE_SKILL_WEAKNESS_NPC_SUMMON_TP = "Reduce damage done by |cFFFFFF50|r% as long as a summoned creature fights at your side.",
SI_LUIE_SKILL_WEAKNESS_LION_TP = "Reduce damage done by |cFFFFFF15|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_ICE_BARRIER_TP = "Intercepting frontal attacks for the caster for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_DEVOUR_CLANNFEAR_TP = "Afflicted with Bleeding Damage every |cFFFFFF0.5|r seconds for |cFFFFFF<<1>>|r seconds. \n\nEach tick heals the clannfear.",
SI_LUIE_SKILL_AURA_OF_PROTECTION_TP = "The Shaman and allies within the radius of the aura take |cFFFFFF25|r% less damage for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_AURA_OF_PROTECTION_OTHER_TP = "Reduce damage taken by |cFFFFFF25|r% while in proximity of the Aura of Protection.",
SI_LUIE_SKILL_AGONIZING_FURY_TP = "Movement Speed reduced by |cFFFFFF10|r% for |cFFFFFF<<1>>|r seconds.\n\nThis effect stacks up to |cFFFFFF5|r times, to a maximum of |cFFFFFF50|r% Movement Speed reduction.",
SI_LUIE_SKILL_GRASPING_VINES_TP = "Afflicted with Bleeding Damage every |cFFFFFF0.5|r seconds and immobilized for |cFFFFFF<<1>>|r seconds.\n\nThe vines explode at the end of the duration, dealing fire damage if you do not move away.",
SI_LUIE_SKILL_RETALIATION_NPC_TP = "Blocking and counterattacking any incoming hits for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_BRIARHEART_RESURRECTION_TP = "A Hagraven has restarted the beating briarheart of this enemy, restoring them to life.",
SI_LUIE_SKILL_ENRAGE_DEVOTED_TP = "Increase damage done by |cFFFFFF20|r% for |cFFFFFF2|r minutes.",
SI_LUIE_SKILL_ICE_PILLAR_TP = "Nearby enemies are chilled, reducing their Movement Speed by |cFFFFFF60|r%.\n\nThe Ogre Shaman's Frost Bolts will apply a |cFFFFFF4|r second immobilize on any chilled targets.",
SI_LUIE_SKILL_SUMMON_BEAST_TP = "A beast fights at your side. The beast remains for |cFFFFFF2|r minutes or until killed.",
SI_LUIE_SKILL_CONTROL_BEAST_TP = "Increase damage done by |cFFFFFF83|r% for |cFFFFFF<<1>>|r seconds while the channel is maintained.",
SI_LUIE_SKILL_HEALING_SALVE_TP = "Healing every |cFFFFFF0.5|r seconds for |cFFFFFF<<1>>|r seconds while the channel is maintained.\n\nHealing doubles in power after |cFFFFFF2|r seconds, leading into a stronger burst heal at the end of the channel.",
SI_LUIE_SKILL_LATCH_ON_TP = "Afflicted with Bleeding Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nEach tick heals the hoarvor.",
SI_LUIE_SKILL_KOTU_GAVA_SWARM_TP = "Afflicted with Poison Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nAfter |cFFFFFF<<2>>|r <<2[second/seconds]>>, a swarm of Kotu Gava will spawn around you.",
SI_LUIE_SKILL_HARDENED_SHELL_TP = "Chance when hit to reduce damage taken by |cFFFFFF50|r%.",
SI_LUIE_SKILL_UNCANNY_DODGE_TP = "Unable to be taken off guard. Will always dodge the initial hit when engaged.",
SI_LUIE_SKILL_BLOCK_NPC_TP = "Brace for attack, reducing damage taken and granting immunity to Stun and Knockback effects.\n\nIncoming melee Heavy Attacks will be counterattacked while active.",
SI_LUIE_SKILL_CALL_ALLY_TP = "A summoned beast ally fights at your side. The beast remains for |cFFFFFF2|r minutes or until killed.",
SI_LUIE_SKILL_VAMPIRIC_DRAIN_TP = "Afflicted with Magic Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nEach tick heals the vampire.",
SI_LUIE_SKILL_DEVOUR_HUNGER_TP = "Stunned and afflicted with Bleeding Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nWhen this effect ends you will be knocked back for |cFFFFFF1.5|r seconds.",
SI_LUIE_SKILL_TORPOR_TP = "You are hallucinating.",
SI_LUIE_SKILL_COLONIZE_TP = "After |cFFFFFF5|r seconds this Fetcherfly Colony will turn into a nest.",
SI_LUIE_SKILL_FERAL_GUARDIAN_NPC_TP = "A grizzly fights at your side. The grizzly remains for |cFFFFFF1|r minute or until killed.",
SI_LUIE_SKILL_BASILISK_POWDER_TP = "Stunned and Silenced for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_SHADOWY_DUPLICATE_TP = "Detonating after |cFFFFFF<<1>>|r seconds, dealing Magic Damage to nearby enemies and stunning them for |cFFFFFF2|r seconds.",
SI_LUIE_SKILL_SHADOWY_BARRIER_TP = "Absorbing damage for |cFFFFFF5|r seconds.",
SI_LUIE_SKILL_FIENDISH_HEALING_TP = "Healing every |cFFFFFF0.5|r seconds for |cFFFFFF<<1>>|r seconds while the channel is maintained.\n\nHealing doubles in power after |cFFFFFF2|r seconds.\n\nEach tick enrages the Skaafin, increasing damage done by |cFFFFFF20|r%.",
SI_LUIE_SKILL_SLASH_CLIFF_STRIDER_TP = "Afflicted with Bleeding Damage every |cFFFFFF1|r second and Movement Speed reduced by |cFFFFFF40|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_WAR_HORN_NPC_TP = "Increase Max Health by |cFFFFFF15|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_RADIANT_MAGELIGHT_NPC_TP = "Revealing nearby stealthed and invisible enemies.\n\nReduce damage taken from stealth attacks by |cFFFFFF50|r%.",
SI_LUIE_SKILL_SUMMON_SPIDERLING_TP = "A spiderling fights at your side. The spiderling remains for |cFFFFFF2|r minutes or until killed.",
SI_LUIE_SKILL_UNYIELDING_MACE_TP = "Afflicted with Bleeding Damage every |cFFFFFF1|r second and Movement Speed reduced by |cFFFFFF50|r% for |cFFFFFF8|r seconds.\n\nStunned for |cFFFFFF1.5|r seconds.",
SI_LUIE_SKILL_REFLECTIVE_SHADOWS_TP = "Reflecting projectiles for |cffffff<<1>>|r seconds.",
SI_LUIE_SKILL_STEAL_ESSENCE_TP = "Afflicted with Magic Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nDeals additional Magic Damage if the channel is finished.",
SI_LUIE_SKILL_DAMPEN_MAGIC_TP = "Absorbing |cFFFFFF40|r% of incoming Flame, Frost, Shock, and Magic Damage for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_FLAME_RAY_TP = "Afflicted with Flame Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nDeals additional Flame Damage if the channel is finished.",
SI_LUIE_SKILL_FROST_RAY_TP = "Afflicted with Frost Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nDeals additional Frost Damage if the channel is finished.",
SI_LUIE_SKILL_LACERATE_GARGOYLE_TP = "Afflicted with Bleeding Damage every |cFFFFFF2.5|r seconds for |cFFFFFF16.5|r seconds.\n\nKnocked down for |cFFFFFF2|r seconds.",
SI_LUIE_SKILL_VAMPIRIC_TOUCH_GARGOYLE_TP = "Single target direct damage attacks restore Health.",
SI_LUIE_SKILL_SUMMON_THE_DEAD_TP = "An risen undead companion fights at your side. The undead remains for |cFFFFFF2|r minutes or until killed.",
SI_LUIE_SKILL_BURDENING_EYE_TP = "The Burdening Eye seeks out a nearby enemy and explodes, dealing Magic Damage and reducing the targets Movement Speed by |cFFFFFF80|r% for |cFFFFFF2|r seconds.",
SI_LUIE_SKILL_SPELL_ABSORPTION_TP = "Reduce Flame, Frost, Shock, and Magic Damage taken by |cFFFFFF90|r% for |cFFFFFF<<1>>|r seconds while the channel is maintained.",
SI_LUIE_SKILL_SHARD_SHIELD_TP = "Absorbing damage for |cFFFFFF5|r minutes.\n\nWhen the shield takes damage, as long as absorption remains, your attacker takes Physical Damage and is stunned for |cFFFFFF1.2|r seconds.",
SI_LUIE_SKILL_TIL_DEATH_TP = "Protected from death by a bodyguard. When you take lethal damage the bodyguard will swap places with you and absorb the killing blow, providing you with immunity to damage and all negative effects for |cFFFFFF3|r seconds.",
SI_LUIE_SKILL_TIL_DEATH_SELF_TP = "Protecting a nearby ally from death. When your ally takes lethal damage, swap places with them and absorb the killing blow, providing you with immunity to damage and all negative effects for |cFFFFFF3|r seconds.",
SI_LUIE_SKILL_DUTIFUL_FURY_TP = "When a nearby ally takes damage, you enrage, causing your next attack to deal |cFFFFFF5|r% additional damage.",
SI_LUIE_SKILL_DUTIFUL_FURY_PROC_TP = "Your next attack deals |cFFFFFF5|r% additional damage.",
SI_LUIE_SKILL_ELEMENTAL_WEAPON_NPC_TP = "Augment your next |cFFFFFF3|r uses of Chop or Cleave for |cFFFFFF<<1>>|r seconds.\n\nChop creates an elemental pool on the ground that deals Flame Damage every |cFFFFFF0.7|r seconds for |cFFFFFF5.5|r seconds.\n\nCleave fires 3 elemental waves, dealing Flame Damage to enemies in the path.",
SI_LUIE_SKILL_BALEFUL_CALL_TP = "Increase Max Health and damage done by |cFFFFFF33|r%.",
SI_LUIE_SKILL_REGENERATION_TROLL_TP = "Regenerating Health every |cFFFFFF2.5|r seconds.",
SI_LUIE_SKILL_CONSUMING_OMEN_TP = "Dealing Magic Damage to nearby allies every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_CONSUMING_OMEN_SNARE_TP = "Movement speed reduced by |cFFFFFF50|r% for |cFFFFFF1.5|r seconds.",
SI_LUIE_SKILL_CLOSE_WOUNDS_TP = "Healing every |cFFFFFF0.5|r seconds for |cFFFFFF<<1>>|r seconds while the channel is maintained, leading into a stronger burst heal at the end of the channel.",
SI_LUIE_SKILL_STATIC_FIELD_TP = "Enemies in the field take Shock Damage every |cFFFFFF1|r second while allied Dwemer can draw power from the field to |cFFFFFFOvercharge|r, increasing their damage done by |cFFFFFF25|r%.",
SI_LUIE_SKILL_SHOCK_BARRAGE_TP = "Being targeted and bombarded by Shock Barrage, taking Shock Damage every |cFFFFFF0.75|r seconds for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_POLARIZING_FIELD_TP = "While active, the Polarizing Field returns Shock Damage to attackers.",
SI_LUIE_SKILL_STATIC_SHIELD_TP = "Absorbing damage for |cFFFFFF<<1>>|r seconds.\n\nIf the shield is not destroyed it will detonate at the end of the duration, dealing Shock Damage to nearby enemies.",
SI_LUIE_SKILL_TURRET_MODE_TP = "Charged by a power conduit, enabling the Sentry to shield itself with |cFFFFFFStatic Shield|r and use the |cFFFFFFThunderbolt|r ability.",
SI_LUIE_SKILL_STATIC_CHARGE_TP = "Residual static energy from the Dolmen is suppressing your Health Recovery and you will be targeted by Static Charge, taking Oblivion damage.\n\nMove to reduce to the static buildup.",
SI_LUIE_SKILL_INCAPACITATING_TERROR_TP = "Feared and taking Frost Damage every |cFFFFFF3|r seconds.",
SI_LUIE_SKILL_SPIRITUAL_CLOAK_TP = "Prevent Soul Thirsters from pulling you into the spirit realm.",
SI_LUIE_SKILL_BLESSING_GATHWEN_TP = "Reduce damage taken by |cFFFFFF3|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_MAIM_NPC_TP = "Reduce damage done by |cFFFFFF40|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_DRAIN_ESSENCE_NPC_TP = "Afflicted with Magic Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nEach tick heals the caster.",
SI_LUIE_SKILL_SUMMON_DARK_PROXY_TP = "A shadowy Clannfear fights at your side. The clannfear remains for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_SUMMON_CLANNFEAR_TP = "A Clannfear fights at your side. The clannfear remains for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_POOL_OF_FIRE = "Pool of Fire",
SI_LUIE_SKILL_SISTERS_BOND = "Sister's Bond",
SI_LUIE_SKILL_CURSE_OF_SUFFERING_TP = "Afflicted with with Magic Damage every |cFFFFFF2|r seconds and Movement Speed reduced by |cFFFFFF40|r%.\n\nEnter the Red Sigil to remove the curse.",
SI_LUIE_SKILL_CURSE_OF_DOMINANCE_TP = "Afflicted with with Magic Damage every |cFFFFFF2|r seconds and Movement Speed reduced by |cFFFFFF40|r%.\n\nEnter the Black Sigil to remove the curse.",
SI_LUIE_SKILL_HEAL_SPORES = "Healing Spores",
SI_LUIE_SKILL_SUMMON_STRANGLER_SAPLINGS = "Summon Strangler Saplings",
SI_LUIE_SKILL_SIPHON_MAGICKA = "Siphon Magicka",
SI_LUIE_SKILL_SIPHON_MAGICKA_TP = "Draining |cFFFFFF5|r% Max Magicka every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_SIPHON_STAMINA = "Siphon Stamina",
SI_LUIE_SKILL_SIPHON_STAMINA_TP = "Draining |cFFFFFF5|r% Max Stamina every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_DARK_ROOT_STAMINA_TP = "Dramatically increase Max Stamina and Stamina Recovery.",
SI_LUIE_SKILL_DARK_ROOT_MAGICKA_TP = "Dramatically increase Max Magicka and Magicka Recovery.",
SI_LUIE_SKILL_SHADOW_TENDRIL = "Shadow Tendril",
SI_LUIE_SKILL_NOVA_TENDRIL = "Nova Tendril",
SI_LUIE_SKILL_BLAZING_ARROW_TP = "Afflicted with Flame Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r <<1[second/seconds]>>.\n\nPut out the flames by jumping in the water.",
SI_LUIE_SKILL_BLAZING_EMBERS_TP = "Afflicted with Flame Damage every |cFFFFFF1|r second for |cFFFFFF5|r seconds.\n\nPut out the flames by jumping in the water.",
SI_LUIE_SKILL_OBLIVION_GATE = "Oblivion Gate",
SI_LUIE_SKILL_ENRAGED_FORTITUDE = "Enraged Fortitude",
SI_LUIE_SKILL_ENRAGE_HORVANTUD = "Increase damage done by |cFFFFFF5|r%, stacking up to |cFFFFFF3|r times.",
SI_LUIE_SKILL_FLAME_TSUNAMI = "Flame Tsunami",
SI_LUIE_SKILL_FLAME_TSUNAMI_TP = "Afflicted with Flame Damage every |cFFFFFF1|r second for |cFFFFFF2|r seconds.\n\nStunned for |cFFFFFF1.5|r seconds.",
SI_LUIE_SKILL_FLAME_TORNADO_SHIELD_TP = "Absorbing |cFFFFFF35|r% of damage taken for |cFFFFFF<<1>>|r <<1[second/seconds]>>.",
SI_LUIE_SKILL_IGNORE_PAIN = "Ignore Pain",
SI_LUIE_SKILL_IGNORE_PAIN_TP = "Reduce damage taken by |cFFFFFF95|r%.",
SI_LUIE_SKILL_MAGMA_PRISON_TP = "Stunned and afflicted with Flame Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_VOLCANIC_SHIELD = "Volcanic Shield",
SI_LUIE_SKILL_VOLCANIC_SHIELD_TP = "Absorbing damage and launching bolts of fire at all nearby enemies every |cFFFFFF1|r second while the shield holds.",
SI_LUIE_SKILL_SIGIL_OF_HASTE_TP = "Increase Movement Speed by |cffffff40|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_SIGIL_OF_POWER_TP = "Increase Weapon and Spell Damage by |cFFFFFF<<1>>|r for |cFFFFFF30|r seconds.",
SI_LUIE_SKILL_SIGIL_OF_HEALING_TP = "Healing for |cFFFFFF10|r% of your Max Health every |cFFFFFF0.5|r seconds for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_SIGIL_OF_DEFENSE_TP = "Reduce damage taken by |cffffff50|r% and reflect all projectiles cast at you for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_DEFILED_GRAVE_TP = "Immobilized and taking Magic Damage every |cFFFFFF1|r second.",
SI_LUIE_SKILL_SUDDEN_STORM = "Sudden Storm",
SI_LUIE_SKILL_BACKSTAB_TP = "Afflicted with Bleeding Damage every |cFFFFFF2|r seconds and Movement Speed reduced by |cFFFFFF60|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_CALL_STORM_ATRONACH = "Call Storm Atronachs",
SI_LUIE_SKILL_ENERVATING_STONE_TP = "Stunned and taking Shock Damage every |cFFFFFF1|r second.",
SI_LUIE_SKILL_ETHEREAL_CHAIN_TP = "Levitated and afflicted with Magic Damage every |cFFFFFF1.5|r seconds for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_PRIMAL_SWARM = "Primal Swarm",
SI_LUIE_SKILL_ENSNARE_TP = "Stunned for |cFFFFFF4|r seconds.\n\nMovement Speed reduced by |cFFFFFF50|r% for |cFFFFFF8|r seconds.",
SI_LUIE_SKILL_MIRROR_WARD_TP = "Reflect all projectiles cast at you.",
SI_LUIE_SKILL_POISON_SHOT_TP = "Afflicted with Poison Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds, stacking indefinitely.",
SI_LUIE_SKILL_VENOMOUS_BURST_TP = "You and nearby allies take Poison Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_SELENES_ROSE = "Selene's Roses",
SI_LUIE_SKILL_WEB_WRAP_TP = "Wrapped in webs and unable to take any actions for |cFFFFFF<<1>>|r seconds. Break free to remove.",
SI_LUIE_SKILL_PRIMAL_MAUL = "Primal Maul",
SI_LUIE_SKILL_ROOT_GUARD = "Root Guard",
SI_LUIE_SKILL_EARTH_MENDER = "Earth Mender",
SI_LUIE_SKILL_TRUE_SHOT = "True Shot",
SI_LUIE_SKILL_SENCHE_SPIRIT = "Senche Spirit",
SI_LUIE_SKILL_INJECT_POISON_TP = "Afflicted with Poison Damage every |cFFFFFF2|r seconds for |cFFFFFF6|r seconds.\n\nKnocked back for |cFFFFFF2|r seconds.",
SI_LUIE_SKILL_SPAWN_HATCHLINGS = "Spawn Hatchlings",
SI_LUIE_SKILL_FIGHTERS_BOON_TP = "Increase Armor by |cFFFFFF559|r for |cFFFFFF2|r minutes.",
SI_LUIE_SKILL_ENERVATING_SEAL_TP = "Afflicted with Magic Damage every |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds. Each tick drains |cFFFFFF15|r% of your Max Stamina and Magicka.",
SI_LUIE_SKILL_BLOOD_POOL_TP = "Taking Physical Damage every |cFFFFFF<<2>>|r <<2[second/seconds]>>. Each tick heals the Vampire.",
SI_LUIE_SKILL_WRACKING_PAIN = "Wracking Pain",
SI_LUIE_SKILL_METEORIC_STRIKE = "Meteoric Strike",
SI_LUIE_SKILL_EXPERT_HUNTER_NPC_TP = "|cFFFFFF20|r% chance on hit to deal additional Magic Damage to Undead and Daedric enemies for |cFFFFFF<<1>>|r seconds.\n\nKilling an Undead or Daedric enemy increases the duration by |cFFFFFF15|r seconds.",
SI_LUIE_SKILL_CIRCLE_OF_PROTECTION_NPC_TP = "Healing every |cFFFFFF1|r second and damage taken reduced by |cFFFFFF55|r%.",
SI_LUIE_SKILL_PIERCE_ARMOR_NPC_TP = "Reduce Physical and Spell Resistance by |cFFFFFF43|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_BITING_COLD_TP = "Taking Frost Damage every |cFFFFFF1|r second and Movement Speed reduced by |cFFFFFF10|r%.\n\nThis effect stacks up to |cFFFFFF8|r times, to a maximum of |cFFFFFF80|r% Movement Speed reduction.",
SI_LUIE_SKILL_BITING_COLD_VET_TP = "Taking increasing Frost Damage every |cFFFFFF1|r second and Movement Speed reduced by |cFFFFFF10|r%.\n\nDamage taken increased by |cFFFFFF22|r% per stack.\n\nThe snare stacks up to |cFFFFFF8|r times, to a maximum of |cFFFFFF80|r% Movement Speed reduction.",
SI_LUIE_SKILL_FROST_CLENCH_NPC_TP = "Stunned for |cFFFFFF0.5|r seconds.\n\nImmobilized for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_UWOF_NPC_TP = "Taking Frost Damage every |cFFFFFF1|r second and Movement Speed reduced by |cFFFFFF60|r%.\n\nThe wall explodes when it expires, dealing additional Frost Damage.",
SI_LUIE_SKILL_ELEMENTAL_SUSCEPTIBILITY_NPC_TP = "Reduce Spell Resistance by |cFFFFFF30|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_WITHER_TP = "Increase damage taken by |cffffff15|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_EMBER_EXPLOSION_TP = "|cFFFFFF40|r% chance to miss all attacks for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_THUNDERING_PRESENCE_NPC_TP = "Increase Physical and Spell Resistance by |cFFFFFF23100|r and enemies within |cFFFFFF5|r meters take Shock Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_BOUND_AEGIS_NPC_TP = "Reduce damage taken by |cffffff20|r%.",
SI_LUIE_SKILL_MARK_TARGET_NPC_TP = "Reduce Physical and Spell Resistance by |cFFFFFF75|r% for |cFFFFFF<<1>>|r seconds.\n\nThe Nightblade heals for |cFFFFFF40|r% of their Max Health if you die under this effect.",
SI_LUIE_SKILL_ENSLAVEMENT_TP = "Afflicted with Magic Damage every |cFFFFFF1|r second and Movement Speed gradually reduced over time by up to |cFFFFFF40|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_MOLTEN_ARMAMENTS_NPC_TP = "Increase Weapon and Spell Damage for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_CINDER_STORM_NPC_TP = "Taking Flame Damage every |cffffff1|r second, |cFFFFFF30|r% chance to miss all attacks, and Movement Speed reduced by |cffffff70|r%.",
SI_LUIE_SKILL_CAUSTIC_ARMOR = "Caustic Armor",
SI_LUIE_SKILL_CORROSIVE_ARMOR_NPC_TP = "Incoming damage is limited to |cffffff3|r% of your Max Health and nearby enemies suffer |cFFFFFF34|r% reduced Weapon Damage and take Flame Damage and every |cffffff1|r second for |cffffff<<1>>|r seconds.",
SI_LUIE_SKILL_CORROSIVE_ARMOR_NPC_DEBUFF_TP = "Taking Flame Damage every |cffffff1|r second and Weapon Damage reduced by |cFFFFFF34|r%.",
SI_LUIE_SKILL_PETRIFY_NPC_TP = "Stunned and absorbing damage for |cFFFFFF<<1>>|r seconds.\n\nThe stun breaks after taking enough damage.",
SI_LUIE_SKILL_CELESTIAL_WARD_TP = "While standing in the ward you are protected from Celestial Blast.\n\nHealing every |cffffff0.25|r seconds.",
SI_LUIE_SKILL_CELESTIAL_BLAST_TP = "Targeted by Celestial Blast, after |cFFFFFF<<1>>|r seconds you will take a massive amount of Unmitigable Damage and be stunned for |cFFFFFF4|r seconds.\n\nEnter the lit Celestial Rune to protect yourself.",
SI_LUIE_SKILL_STANDARD_OF_MIGHT_NPC_TP = "Increase damage done and reduce damage taken by |cFFFFFF35|r% while standing within the radius of the standard.",
SI_LUIE_SKILL_STANDARD_OF_MIGHT_NPC_GROUND_TP = "Taking Flame Damage every |cFFFFFF1|r second and healing received reduced by |cFFFFFF50|r%.",
SI_LUIE_SKILL_DRAINING_POISON_TP = "Afflicted with Poison Damage every |cFFFFFF1|r second and Magicka and Stamina Recovery reduced for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_NATURES_BLESSING = "Nature's Blessing",
SI_LUIE_SKILL_NATURES_BLESSING_TP = "Nature's Blessing deals increased Unmitigable Damage for each stack for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_NATURES_BLESSING_GROUND_TP = "Restoring |cFFFFFF13|r% of your Max Stamina and Magicka every |cFFFFFF1|r second.\n\nTaking stacking Unmitigable Damage every |cFFFFFF1|r second.",
SI_LUIE_SKILL_ACID_SPRAY_NPC_TP = "Afflicted with Poison Damage every |cFFFFFF1|r second and Movement Speed reduced by |cFFFFFF40|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_SUMMON_DAEDRIC_TITAN = "Summon Daedric Titan",
SI_LUIE_SKILL_DARK_FLARE_NPC_TP = "Reduce healing received by |cFFFFFF40%|r.",
SI_LUIE_SKILL_PURIFYING_LIGHT_NPC_TP = "|cFFFFFF33|r% of all damage taken for the next |cFFFFFF<<1>>|r seconds will be copied and released as Magic Damage when the effect ends.\n\nWhen the effect ends, a pool of sunlight remains on the ground, healing the Templar and their allies if they are nearby every |cFFFFFF2|r seconds for |cFFFFFF6|r seconds.",
SI_LUIE_SKILL_UNSTABLE_CORE_NPC_TP = "Your single target ranged abilities are reflected back on you for |cFFFFFF<<1>>|r seconds.\n\nThe core explodes when this effect ends, dealing Magic Damage to you and nearby allies.",
SI_LUIE_SKILL_SEARING_LIGHT_TP = "|cFFFFFF50|r% chance to miss all attacks for |cFFFFFF4|r seconds.\n\nStunned for |cFFFFFF2|r seconds.",
SI_LUIE_SKILL_SOLAR_DISTURBANCE_NPC_TP = "Taking Magic Damage every |cFFFFFF1|r second, damage done reduced by |cFFFFFF25|r%, and Movement Speed reduced by |cffffff60|r%.",
SI_LUIE_SKILL_DARK_DEAL_NPC_TP = "Increase Physical and Spell Resistance, and heal every |cFFFFFF1|r second after |cFFFFFF2|r seconds for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_ICE_CHARGE_TP = "You and nearby allies take Frost Damage every |cFFFFFF2|r seconds, and Movement Speed reduced by |cFFFFFF90|r% for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_POISON_MIST_TP = "Reduce damage taken by |cFFFFFF75|r% and enemies within |cFFFFFF5|r meters take Poison Damage every |cFFFFFF1.5|r seconds for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_DRAIN_ESSENCE_VAMP_NPC_TP = "Stunned and afflicted with Magic Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nEach tick heals the vampire.",
SI_LUIE_SKILL_MALEFIC_WREATH_TP = "Stunned for |cFFFFFF<<1>>|r seconds.\n\nTake Magic Damage when the effect ends, increased for each second the effect lasts.\n\nThe stun breaks after taking damage.",
SI_LUIE_SKILL_CRIPPLING_GRASP_NPC_TP = "Afflicted with Magic Damage every |cFFFFFF2|r seconds and Movement Speed reduced by |cFFFFFF20|r% for |cFFFFFF8|r seconds.\n\nImmobilized for |cFFFFFF3|r seconds.",
SI_LUIE_SKILLPOWER_EXTRACTION_NPC_TP = "Increase damage done by |cFFFFFF10|r% for each enemy hit by Power Extraction.",
SI_LUIE_SKILL_MARKED_FOR_DEATH_TP = "You and nearby allies take Flame Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nWhen the effect ends, a deadly pool of fire will drop on the ground beneath your feet.",
SI_LUIE_SKILL_ENRAGE_FG_GLADIATOR_TP = "Increase damage done by |cFFFFFF100|r% and increase damage taken by |cFFFFFF20|r% per stack.",
SI_LUIE_SKILL_EMPOWERED_BY_THE_LIGHT = "Empowered by the Light",
SI_LUIE_SKILL_ARENA_TORCH = "Arena Torch",
SI_LUIE_SKILL_TORCH_GRAB_TP = "Carrying a torch and silenced for |cFFFFFF<<1>>|r seconds, you can use the torch to reignite a bonfire.",
SI_LUIE_SKILL_WARMING_AURA_TP = "Protected from Biting Cold by the warmth of a bonfire.",
SI_LUIE_SKILL_GROWING_TORMENT_TP = "Increase damage done by |cFFFFFF6|r% per stack.",
SI_LUIE_SKILL_DEFENSIVE_PROTOCOL = "Defensive Protocol",
SI_LUIE_SKILL_DEFENSIVE_PROTOCOL_TP = "Absorbing damage and unable to take any action, while nearby enemies take Shock Damage every |cFFFFFF0.5|r seconds for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_OVERCHARGED_DWEMER_TP = "Striking distant enemies with bolts, dealing Shock Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_OVERHEATED_DWEMER_TP = "Venting flames, dealing Flame Damage to nearby enemies every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_OVERHEATED_DWEMER_VET_TP = "Venting flames, dealing Flame Damage to nearby enemies every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nDistant enemies will be bombarded with a volley of flames every |cFFFFFF2|r seconds.",
SI_LUIE_SKILL_VENTING_FLAMES = "Venting Flames",
SI_LUIE_SKILL_VOLTAIC_OVERLOAD_TP = "Nearby enemies take Shock Damage every |cFFFFFF0.5|r seconds for |cFFFFFF<<1>>|r seconds.",
SI_LUIE_SKILL_FRIGID_WATERS_TP = "Taking increasing Frost Damage every |cFFFFFF1|r second.\n\nDamage taken increased by |cFFFFFF100|r% per stack.",
SI_LUIE_SKILL_COLD_SNAP_TP = "Increase damage taken from Cold Snap by |cFFFFFF<<2>>|r% per stack.",
SI_LUIE_SKILL_SUMMON_DEATHLESS_WOLF = "Summon Deathless Wolf",
SI_LUIE_SKILL_BLADE_TRAP_VMA = "Afflicted with Bleeding Damage every |cFFFFFF1|r second for |cFFFFFF<<1>>|r seconds.\n\nThis effect stacks up to |cFFFFFF25|r times, dealing |cFFFFFF5|r% increased damage per stack.",
SI_LUIE_SKILL_ENERGIZE = "Energize",
SI_LUIE_SKILL_REFLECTIVE_SCALE = "Reflective Scale",
SI_LUIE_SKILL_FETCHERFLY_SWARM = "Fetcherfly Swarm",
SI_LUIE_SKILL_WING_GUST_STUN = "Knocked back for |cFFFFFF<<1>>|r seconds.\n\nMovement speed reduced by |cFFFFFF50|r% for |cFFFFFF<<2>>|r seconds.",
SI_LUIE_SKILL_WING_GUST_SNARE = "Knocked back for |cFFFFFF<<2>>|r seconds.\n\nMovement speed reduced by |cFFFFFF50|r% for |cFFFFFF<<1>>|r seconds.",
}
for stringId, stringValue in pairs(strings) do
ZO_CreateStringId(stringId, stringValue)
SafeAddVersion(stringId, 1)
end
|
local current = (...):gsub('%.[^%.]+$', '');
-- ------------------------------------------------
-- Required Modules
-- ------------------------------------------------
local Node = require(current .. '.Node');
local Edge = require(current .. '.Edge');
-- ------------------------------------------------
-- Module
-- ------------------------------------------------
local Graph = {};
function Graph.new()
local self = {};
local nodes = {}; -- Contains all nodes in the graph.
local edges = {}; -- Contains all edges in the graph.
local edgeIDs = 0; -- Used to create a unique ID for new edges.
local minX, maxX, minY, maxY; -- The boundaries of the graph.
-- ------------------------------------------------
-- Local Functions
-- ------------------------------------------------
---
-- (Re-)Sets the graph's boundaries to nil.
--
local function resetBoundaries()
minX, maxX, minY, maxY = nil, nil, nil, nil;
end
---
-- Updates the boundaries of the graph.
-- This represents the rectangular area in which all nodes are contained.
-- @param nx - The new x position to check.
-- @param ny - The new y position to check.
--
local function updateBoundaries( nx, ny )
return math.min( minX or nx, nx ), math.max( maxX or nx, nx ), math.min( minY or ny, ny ), math.max( maxY or ny, ny );
end
---
-- Adds a new edge between two nodes.
-- @param origin - The node from which the edge originates.
-- @param target - The node to which the edge is pointing to.
--
local function addEdge( origin, target )
for _, edge in pairs( edges ) do
if edge.origin == origin and edge.target == target then
error "Trying to connect nodes which are already connected.";
end
end
assert( origin ~= target, "Tried to connect a node with itself." );
edges[edgeIDs] = Edge.new( edgeIDs, origin, target );
edgeIDs = edgeIDs + 1;
end
-- ------------------------------------------------
-- Public Functions
-- ------------------------------------------------
---
-- Adds a node to the graph.
-- @param id - The ID will be used to reference the Node inside of the graph.
-- @param x - The x coordinate the Node should be spawned at (optional).
-- @param y - The y coordinate the Node should be spawned at (optional).
-- @param anchor - Wether the node should be locked in place or not (optional).
-- @param ... - Additional parameters (useful when a custom Node class is used).
--
function self:addNode( id, name, x, y, anchor, ... )
assert( not nodes[id], "Node IDs must be unique." );
nodes[id] = Node.new( id, name, x, y, anchor, ... );
return nodes[id];
end
---
-- Removes a node from the graph.
-- This will also remove all edges pointing to, or originating from this
-- node.
-- @param node - The node to remove from the graph.
--
function self:removeNode( node )
nodes[node:getID()] = nil;
self:removeEdges( node );
end
---
-- Creates a graph from a .tgf formatted file.
-- @param path (string) The path to the .tgf file to load.
-- @param x (number) The x coordinate the nodes should be spawned at (optional).
-- @param y (number) The y coordinate the nodes should be spawned at (optional).
--
function self:loadTGF( path, x, y )
local dx = x or 0;
local dy = y or 0;
local n = {};
local e = {};
local target = n;
for line in io.lines( path ) do
-- '#' marks the definitions for edges in the .tgf file.
if line == '#' then
target = e;
else
target[#target + 1] = line;
end
end
for _, line in ipairs( n ) do
local tmp = {}
for part in line:gmatch( '[^%s]+' ) do
tmp[#tmp + 1] = part;
end
-- Add a slight random variation to the spawn coordinates to kick start
-- the physics simulation.
local rx = love.math.random( 2, 5 );
local ry = love.math.random( 2, 5 );
self:addNode( tmp[1], tmp[2], dx + rx, dy + ry, tmp[1] == '1' );
end
for _, line in ipairs( e ) do
local tmp = {}
for part in line:gmatch( '[^%s]+' ) do
tmp[#tmp + 1] = part;
end
self:connectIDs( tmp[1], tmp[2] );
end
end
---
-- Adds a new edge between two nodes.
-- @param origin - The node from which the edge originates.
-- @param target - The node to which the edge is pointing to.
--
function self:connectNodes( origin, target )
addEdge( origin, target );
end
---
-- Adds a new edge between two nodes referenced by their IDs.
-- @param origin - The node id from which the edge originates.
-- @param target - The node id to which the edge is pointing to.
--
function self:connectIDs( originID, targetID )
assert( nodes[originID], string.format( "Tried to add an Edge to the nonexistent Node \"%s\".", originID ));
assert( nodes[targetID], string.format( "Tried to add an Edge to the nonexistent Node \"%s\".", targetID ));
addEdge( nodes[originID], nodes[targetID] );
end
---
-- Removes all edges leading to, or originating from a node.
-- @param node - The node to remove all edges from.
--
function self:removeEdges( node )
for id, edge in pairs( edges ) do
if edge.origin == node or edge.target == node then
edges[id] = nil;
end
end
end
---
-- Updates the graph.
-- @param dt - The delta time between frames.
-- @param nodeCallback - A callback called on every node (optional).
-- @param edgeCallback - A callback called on every edge (optional).
--
function self:update( dt, nodeCallback, edgeCallback )
for _, edge in pairs( edges ) do
edge.origin:attractTo( edge.target );
edge.target:attractTo( edge.origin );
if edgeCallback then
edgeCallback( edge );
end
end
resetBoundaries();
for _, nodeA in pairs( nodes ) do
if not nodeA:isAnchor() then
for _, nodeB in pairs( nodes ) do
if nodeA ~= nodeB then
nodeA:repelFrom( nodeB );
end
end
nodeA:move( dt );
end
if nodeCallback then
nodeCallback( nodeA );
end
minX, maxX, minY, maxY = updateBoundaries( nodeA:getPosition() );
end
end
---
-- Draws the graph.
-- Takes two callback functions as a parameter. These will be called
-- on each edge and node in the graph and will be used to wite a custom
-- drawing function.
-- @param nodeCallback - A callback called on every node.
-- @param edgeCallback - A callback called on every edge.
--
function self:draw( nodeCallback, edgeCallback )
for _, edge in pairs( edges ) do
if not edgeCallback then break end
edgeCallback( edge );
end
for _, node in pairs( nodes ) do
if not nodeCallback then break end
nodeCallback( node );
end
end
---
-- Checks if a certain Node ID already exists.
-- @param id - The id to check for.
--
function self:hasNode( id )
return nodes[id] ~= nil;
end
---
-- Returns the node the id is pointing to.
-- @param id - The id to check for.
--
function self:getNode( id )
return nodes[id];
end
---
-- Gets a node at a certain point in the graph.
-- @param x - The x coordinate to check.
-- @param y - The y coordinate to check.
-- @param range - The range in which to check around the given coordinates.
--
function self:getNodeAt(x, y, range)
for _, node in pairs( nodes ) do
local nx, ny = node:getPosition();
if x < nx + range and x > nx - range and y < ny + range and y > ny - range then
return node;
end
end
end
---
-- Returns the graph's minimum and maxmimum x and y values.
--
function self:getBoundaries()
return minX, maxX, minY, maxY;
end
---
-- Returns the x and y coordinates of the graph's center.
--
function self:getCenter()
return ( maxX - minX ) * 0.5 + minX, ( maxY - minY ) * 0.5 + minY;
end
---
-- Turn a node into an anchor.
-- Anchored nodes have fixed positions and can't be moved by the physical
-- forces.
-- @param id - The node's id.
-- @param x - The x coordinate to anchor the node to.
-- @param y - The y coordinate to anchor the node to.
--
function self:setAnchor( id, x, y )
nodes[id]:setPosition( x, y );
nodes[id]:setAnchor( true );
end
return self;
end
---
-- Replaces the default Edge class with a custom one.
-- @param class - The custom Edge class to use.
--
function Graph.setEdgeClass( class )
Edge = class;
end
---
-- Replaces the default Node class with a custom one.
-- @param class - The custom Node class to use.
--
function Graph.setNodeClass( class )
Node = class;
end
return Graph;
|
-- ======================================================================
-- Handy Haversacks
-- Advent of Code 2020 Day 07 -- Eric Wastl -- https://adventofcode.com
--
-- lua implementation by Dr. Dean Earl Wright III
-- ======================================================================
-- ======================================================================
-- t e s t _ r u l e s . l u a
-- ======================================================================
-- Test solver for Advent of Code 2020 day 07, Handy Haversacks
-- ----------------------------------------------------------------------
-- require
-- ----------------------------------------------------------------------
local luaunit = require('luaunit')
local rules = require('rules')
-- ----------------------------------------------------------------------
-- from_text
-- ----------------------------------------------------------------------
function from_text(text)
-- Break the text into trimed, non-comment lines
-- 1. We start with no lines
local result = {}
-- 2. Loop for lines in the text
for line in text:gmatch('[^\r\n]+') do
-- 3. But ignore blank and comment lines
line = line:gsub("%s*$", "")
if #line > 0 and "!" ~= line:sub(1, 1) then
-- 4. Add the line
table.insert(result, line)
end
end
-- 5. Return a table of cleaned lines
return result
end
-- ----------------------------------------------------------------------
-- constants
-- ----------------------------------------------------------------------
local EXAMPLE_TEXT = [[
light red bags contain 1 bright white bag, 2 muted yellow bags.
dark orange bags contain 3 bright white bags, 4 muted yellow bags.
bright white bags contain 1 shiny gold bag.
muted yellow bags contain 2 shiny gold bags, 9 faded blue bags.
shiny gold bags contain 1 dark olive bag, 2 vibrant plum bags.
dark olive bags contain 3 faded blue bags, 4 dotted black bags.
vibrant plum bags contain 5 faded blue bags, 6 dotted black bags.
faded blue bags contain no other bags.
dotted black bags contain no other bags.
]]
local PART_ONE_TEXT = EXAMPLE_TEXT
local PART_TWO_TEXT = EXAMPLE_TEXT
local PART_ONE_RESULT = 4
local PART_TWO_RESULT = 32
local EXAMPLE_TWO = [[
shiny gold bags contain 2 dark red bags.
dark red bags contain 2 dark orange bags.
dark orange bags contain 2 dark yellow bags.
dark yellow bags contain 2 dark green bags.
dark green bags contain 2 dark blue bags.
dark blue bags contain 2 dark violet bags.
dark violet bags contain no other bags.
]]
-- ======================================================================
-- TestRules
-- ======================================================================
function test_empty_init()
-- Test the default Rules creation
-- 1. Create default Rules object
local myobj = rules:Rules()
-- 2. Make sure it has the default values
luaunit.assertEquals(myobj.part2, false)
luaunit.assertEquals(#myobj.text, 0)
end
function test_text_init()
-- Test the Rules object creation from text
-- 1. Create Rules object from text
local myobj = rules:Rules({text=from_text(EXAMPLE_TEXT)})
-- 2. Make sure it has the expected values
luaunit.assertEquals(myobj.part2, false)
luaunit.assertEquals(#myobj.text, 9)
-- 3. Test methods
luaunit.assertEquals(myobj:can_contain("shiny gold"), 4)
luaunit.assertEquals(myobj:required_inside("shiny gold"), 32)
end
function test_part_one()
-- Test part one example of Rules object
-- 1. Create Rules object from text
local myobj = rules:Rules({text=from_text(PART_ONE_TEXT)})
-- 2. Check the part one result
luaunit.assertEquals(myobj:part_one({verbose=false, limit=0}), PART_ONE_RESULT)
end
function test_part_two()
-- Test part two example of Rules object
-- 1. Create Rules object from text
local myobj = rules:Rules({part2=true, text=from_text(EXAMPLE_TWO)})
-- 2. Check the part two result
luaunit.assertEquals(myobj:part_two({verbose=false, limit=0}), 126)
end
function test_part_two_two()
-- Test part two second example of Rules object
-- 1. Create Rules object from text
local myobj = rules:Rules({part2=true, text=from_text(PART_TWO_TEXT)})
-- 2. Check the part two result
luaunit.assertEquals(myobj:part_two({verbose=false, limit=0}), PART_TWO_RESULT)
end
-- ----------------------------------------------------------------------
-- module initialization
-- ----------------------------------------------------------------------
os.exit( luaunit.LuaUnit.run() )
-- ======================================================================
-- end t e s t _ r u l e s . l u a end
-- ======================================================================
|
local SongNumberInCourse = 0
-- get the PlayerOptions string for any human players and store it now
-- we'll retreive it the next time ScreenSelectMusic loads and re-apply those same mods
-- in this way, we can override the effects of songs that forced modifiers during gameplay
-- the old-school (ie. ITG) way of GAMESTATE:ApplyGameCommand()
--local Players = GAMESTATE:GetHumanPlayers()
local Players = {PLAYER_1,PLAYER_2}
local InitializeMeasureCounterAndModsLevel = function()
for player in ivalues(Players) do
local pn = ToEnumShortString(player)
-- Check if MeasureCounter is turned on;
-- we may (or may not) need to parse the chart.
local mods = TP[pn].ActiveModifiers
if mods.MeasureCounter and mods.MeasureCounter ~= "None" then
local song_dir, steps
if GAMESTATE:IsCourseMode() then
song_dir = GAMESTATE:GetCurrentTrail(player):GetTrailEntries()[SongNumberInCourse+1]:GetSong():GetSongDir()
steps = GAMESTATE:GetCurrentTrail(player):GetTrailEntries()[SongNumberInCourse+1]:GetSteps()
else
song_dir = GAMESTATE:GetCurrentSong():GetSongDir()
steps = GAMESTATE:GetCurrentSteps(player)
end
local steps_type = ToEnumShortString( steps:GetStepsType() ):gsub("_", "-"):lower()
local difficulty = ToEnumShortString( steps:GetDifficulty() )
local notes_per_measure = tonumber(mods.MeasureCounter:match("%d+"))
local threshold_to_be_stream = 2
-- if any of these don't match what we're currently looking for...
if TP[pn].Streams.SongDir ~= song_dir or TP[pn].Streams.StepsType ~= step_type or TP[pn].Streams.Difficulty ~= difficulty then
-- ...then parse the simfile, given the current parameters
TP[pn].Streams.Measures = GetStreams(song_dir, steps_type, difficulty, notes_per_measure, threshold_to_be_stream)
-- and set these so we can check again next time.
TP[pn].Streams.SongDir = song_dir
TP[pn].Streams.StepsType = steps_type
TP[pn].Streams.Difficulty = difficulty
end
end
end
end
InitializeMeasureCounterAndModsLevel()
local t = Def.ActorFrame{
Def.Quad{
InitCommand=cmd(diffuse,Color.Black; diffusealpha,1; Center; FullScreen),
OnCommand=cmd(sleep,1.4; accelerate,0.6;diffusealpha,0)
},
}
return t
|
paradeSlot("Vgr_Scout",{
-1125,
-143,
991,
},{
0,
0,
1,
},{
-1,
0,
0,
},0)
paradeSlot("Vgr_Interceptor",{
-1332,
-95,
635,
},{
0,
0,
1,
},{
-1,
0,
0,
},400)
paradeSlot("Vgr_Bomber",{
-1592,
-50,
238,
},{
0,
0,
1,
},{
-1,
0,
0,
},400)
paradeSlot("Vgr_LanceFighter",{
-1805,
0,
-150,
},{
0,
0,
1,
},{
-1,
0,
0,
},400)
paradeSlot("Vgr_MissileCorvette",{
-1839,
87,
-1053,
},{
0,
0,
1,
},{
-1,
0,
0,
},0)
paradeSlot("Vgr_LaserCorvette",{
-1626,
0,
-641,
},{
0,
0,
1,
},{
-1,
0,
0,
},0)
paradeSlot("Vgr_CommandCorvette",{
-1300,
170,
-1452,
},{
0,
0,
1,
},{
-1,
0,
0,
},0)
paradeSlot("Vgr_ADVCommandCorvette",{
-1220,
-470,
-1407,
},{
0,
0,
1,
},{
-1,
0,
0,
},0)
paradeSlot("Vgr_MinelayerCorvette",{
-950,
-520,
-650,
},{
0,
0,
1,
},{
-1,
0,
0,
},0)
paradeSlot("Vgr_AssaultFrigate",{
735,
-148,
959,
},{
0,
0,
1,
},{
1,
0,
0,
},0)
paradeSlot("Vgr_HeavyMissileFrigate",{
1112,
-74,
311,
},{
0,
0,
1,
},{
1,
0,
0,
},0)
paradeSlot("vgr_artilleryfrigate",{
1112,
-288,
-135,
},{
0,
0,
1,
},{
1,
0,
0,
},0)
paradeSlot("vgr_EWfighter",{
1110,
-75,
-1000,
},{
0,
0,
1,
},{
1,
0,
0,
},0)
paradeSlot("Vgr_InfiltratorFrigate",{
1508,
-5,
-375,
},{
0,
0,
1,
},{
1,
0,
0,
},0)
paradeSlot("Vgr_TransportFrigate",{
1837,
111,
-1125,
},{
0,
0,
1,
},{
1,
0,
0,
},0)
paradeSlot("Vgr_WeaponPlatform_gun",{
-240,
-306,
1021,
},{
0,
0,
1,
},{
0,
1,
0,
},0)
paradeSlot("Vgr_WeaponPlatform_missile",{
216,
-306,
1025,
},{
0,
0,
1,
},{
0,
1,
0,
},0)
paradeSlot("Vgr_HyperSpace_Platform",{
703,
183,
-2522,
},{
0,
0,
1,
},{
-1,
0,
0,
},0)
paradeSlot("Vgr_ResourceCollector",{
-470,
350,
-2515,
},{
0,
0,
1,
},{
-1,
0,
0,
},0)
paradeSlot("Vgr_ResourceController",{
0,
267,
-2993,
},{
0,
0,
1,
},{
-1,
0,
0,
},0)
paradeSlot("Vgr_Probe",{
-170,
0,
-1881,
},{
0,
0,
1,
},{
0,
1,
0,
},0)
paradeSlot("Vgr_Probe_ECM",{
-413,
0,
-1458,
},{
0,
0,
1,
},{
0,
1,
0,
},0)
paradeSlot("Vgr_Probe_Prox",{
260,
0,
-1485,
},{
0,
0,
1,
},{
0,
1,
0,
},0)
paradeSlot("misc",{
5208,
0,
-2878,
},{
0,
0,
1,
},{
-1,
0,
0,
},0)
|
name = "Random Improvements"
uid = "64b07567-334e-4206-8ba9-98c89da0aecf"
version = 1
copyright = ""
description = "Displays rings of common ranges with numpad 1-9, clear with numpad '.'. Toggle selected unit ranges with numpad0."
author = "Hellomouse"
url = ""
selectable = true
enabled = true
exclusive = false
ui_only = true
requires = {}
requiresNames = {}
conflicts = {}
before = {}
after = {}
|
Citizen.Trace("\n")
Citizen.Trace("\n")
Citizen.Trace("Created for ESX FrameWork")
Citizen.Trace("\n")
Citizen.Trace("\n")
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
-- Blips
local blips = {
{title="Pôle Emploi", colour=2, id=280, x = -265.0, y = -963.6, z = 30.2}
}
Citizen.CreateThread(function()
if Config.EnableBlips then
for _, info in pairs(blips) do
info.blip = AddBlipForCoord(info.x, info.y, info.z)
SetBlipSprite(info.blip, info.id)
SetBlipDisplay(info.blip, 4)
SetBlipScale(info.blip, 1.0)
SetBlipColour(info.blip, info.colour)
SetBlipAsShortRange(info.blip, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentString(info.title)
EndTextCommandSetBlipName(info.blip)
end
end
end)
-- Marker et Texte
local joblisting = {
{x = -265.0, y = -963.6, z = 30.2},
}
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
_menuPool:ProcessMenus()
for k in pairs(joblisting) do
local plyCoords = GetEntityCoords(GetPlayerPed(-1), false)
local dist = Vdist(plyCoords.x, plyCoords.y, plyCoords.z, joblisting[k].x, joblisting[k].y, joblisting[k].z)
if dist <= 1.2 then
ESX.ShowHelpNotification("Appuyez sur ~INPUT_TALK~ pour accéder au ~b~Pôle Emploi~s~")
if IsControlJustPressed(1,51) then
mainMenu:Visible(not mainMenu:Visible())
end
end
end
end
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
local playerCoords, isInMarker, currentZone, letSleep = GetEntityCoords(PlayerPedId()), false, nil, true
for k,v in pairs(Config.Joblisting) do
local distance = #(playerCoords - v)
if distance < Config.DrawDistance then
letSleep = false
DrawMarker(29, v+1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, 1.5, 1.5, 255, 255, 225, 255, true, true, 2, false, nil, nil, false)
if distance < Config.MarkerSize.x then
isInMarker, currentZone = true, k
end
end
end
if (isInMarker and not hasAlreadyEnteredMarker) or (isInMarker and lastZone ~= currentZone) then
hasAlreadyEnteredMarker, lastZone = true, currentZone
TriggerEvent('esx_joblisting:hasEnteredMarker', currentZone)
end
if not isInMarker and hasAlreadyEnteredMarker then
hasAlreadyEnteredMarker = false
TriggerEvent('esx_joblisting:hasExitedMarker', lastZone)
end
if letSleep then
Citizen.Wait(500)
end
end
end)
|
local setup = require("setup")
setup.start()
|
local colors = {
white = "#d6deeb",
darker_black = "#001122",
black = "#011627",
black2 = "#061b2c",
one_bg = "#0b2031", -- real bg of onedark
one_bg2 = "#152a3b",
one_bg3 = "#1f3445",
grey = "#293e4f",
grey_fg = "#314657",
grey_fg2 = "#394e5f",
light_grey = "#8b9f9f",
red = "#f78c6c",
baby_pink = "#ff6cca",
pink = "#fa58b6",
line = "#091e2f",
green = "#addb67",
vibrant_green = "#22da6e",
blue = "#82aaff",
nord_blue = "#78a0f5",
yellow = "#ffcb8b",
sun = "#ffe9a9",
purple = "#c792ea",
dark_purple = "#a974cc",
teal = "#96CEB4",
orange = "#FFAD60",
cyan = "#93FFD8",
statusline_bg = "#051a2b",
lightbg = "#112637",
lightbg2 = "#0b2031",
pmenu_bg = "#addb67",
folder_bg = "#82aaff",
}
return colors
|
--[[
desc: Colorize, a system of colorize's business.
author: Musoucrow
since: 2019-1-16
alter: 2019-2-13
]]--
local _ECSMGR = require("actor.ecsmgr")
local _ASPECT = require("actor.service.aspect")
local _Base = require("actor.system.base")
---@class Actor.System.Effect.Colorize : Actor.System
local _Colorize = require("core.class")(_Base)
---@param colorize Actor.Component.Effect.Colorize
---@param index int
local function _ToNext(colorize)
colorize.index = colorize.index + 1
if (colorize.index > #colorize.motions) then
return false
end
local motion = colorize.motions[colorize.index]
colorize.colorTweener:Enter(motion.time, motion.color, motion.easing)
return true
end
function _Colorize:Ctor(upperEvent)
_Base.Ctor(self, upperEvent, {
effect_colorize = true,
}, "effect_colorize")
end
---@param entity Actor.Entity
function _Colorize:OnEnter(entity)
local colorize = entity.effect_colorize ---@type Actor.Component.Effect.Colorize
colorize.colorTweener = _ASPECT.NewColorTweener(entity.aspect)
_ToNext(colorize)
end
function _Colorize:Update(dt)
for n=1, self._list:GetLength() do
local e = self._list:Get(n) ---@type Actor.Entity
if (not e.identity.isPaused) then
local colorize = e.effect_colorize ---@type Actor.Component.Effect.Colorize
local colorTweener = colorize.colorTweener ---@type Util.Gear.Tweener
if (colorTweener) then
colorTweener:Update(dt)
if (not colorTweener.isRunning) then
if (not _ToNext(colorize)) then
if (colorize.mode == "loop") then
colorize.index = 0
_ToNext(colorize)
elseif (colorize.mode == "exit") then
_ECSMGR.DelComponent(e, "effect_colorize")
else
e.identity.destroyProcess = 1
end
end
end
end
end
end
end
return _Colorize
|
data:extend({
-- Item
{
type = "item",
name = "5d-pumpjack-2",
icon = "__5dim_mining__/graphics/icon/pumpjack-animation_1_.png",
flags = {"goes-to-quickbar"},
subgroup = "liquid-pump",
order = "b",
place_result = "5d-pumpjack-2",
stack_size = 20
},
--Recipe
{
type = "recipe",
name = "5d-pumpjack-2",
energy_required = 8,
ingredients =
{
{"steel-plate", 15},
{"pumpjack", 1},
{"iron-gear-wheel", 15},
{"electronic-circuit", 10},
{"pipe", 5},
},
result = "5d-pumpjack-2",
enabled = false
},
--Entity
{
type = "mining-drill",
name = "5d-pumpjack-2",
icon = "__5dim_mining__/graphics/icon/pumpjack-animation_1_.png",
flags = {"placeable-neutral", "player-creation"},
minable = {mining_time = 1, result = "5d-pumpjack-2"},
resource_categories = {"basic-fluid"},
max_health = 100,
corpse = "big-remnants",
dying_explosion = "medium-explosion",
collision_box = {{ -1.4, -1.4}, {1.4, 1.4}},
selection_box = {{ -1.5, -1.5}, {1.5, 1.5}},
drawing_box = {{-1.6, -2.5}, {1.5, 1.6}},
energy_source =
{
type = "electric",
-- will produce this much * energy pollution units per tick
emissions = 0.15 / 1.5,
usage_priority = "secondary-input"
},
fluid_box =
{
base_area = 1,
base_level = 1,
pipe_covers = pipecoverspictures(),
pipe_connections =
{
{
positions = { {1, -2}, {2, -1}, {-1, 2}, {-2, 1} }
}
},
},
energy_usage = "200kW",
mining_speed = 2,
mining_power = 2,
resource_searching_radius = 0.49,
vector_to_place_result = {0, 0},
module_specification =
{
module_slots = 3
},
radius_visualisation_picture =
{
filename = "__base__/graphics/entity/pumpjack/pumpjack-radius-visualization.png",
width = 12,
height = 12
},
base_picture =
{
sheet =
{
filename = "__base__/graphics/entity/pumpjack/pumpjack-base.png",
priority = "extra-high",
width = 114,
height = 113,
shift = {0.1875, -0.03125}
}
},
animations =
{
north =
{
priority = "extra-high",
width = 116,
height = 110,
line_length = 10,
shift = {0.125, -0.71875},
filename = "__5dim_mining__/graphics/icon/pumpjack-animation_1.png",
frame_count = 40,
animation_speed = 0.5
}
},
vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
working_sound =
{
sound = { filename = "__base__/sound/pumpjack.ogg" },
apparent_volume = 1.5,
},
fast_replaceable_group = "pumpjack"
}
})
|
-- walls_api/init.lua
local fence_collision_extra = minetest.settings:get_bool("enable_fence_tall")
and 3/8 or 0
walls = {}
function walls.register_wall(name, def)
local txt = name:gsub(":", "_")
minetest.register_node(name, {
description = def.description or txt,
drawtype = def.drawtype or "nodebox",
node_box = def.node_box or {
type = "connected",
fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4},
connect_front = {-3/16, -1/2, -1/2, 3/16, 3/8, -1/4},
connect_left = {-1/2, -1/2, -3/16, -1/4, 3/8, 3/16},
connect_back = {-3/16, -1/2, 1/4, 3/16, 3/8, 1/2},
connect_right = { 1/4, -1/2, -3/16, 1/2, 3/8, 3/16},
},
collision_box = def.collision_box or {
type = "connected",
fixed = {-1/4, -1/2, -1/4, 1/4, 1/2 + fence_collision_extra, 1/4},
connect_front = {-1/4,-1/2,-1/2,1/4,1/2 + fence_collision_extra,-1/4},
connect_left = {-1/2,-1/2,-1/4,-1/4,1/2 + fence_collision_extra,1/4},
connect_back = {-1/4,-1/2,1/4,1/4,1/2 + fence_collision_extra,1/2},
connect_right = {1/4,-1/2,-1/4,1/2,1/2 + fence_collision_extra,1/4},
},
connects_to = def.connects_to or { "group:wall", "group:stone",
"group:fence" },
paramtype = def.paramtype or "light",
is_ground_content = false,
tiles = def.tiles or def.material and {def.material:gsub(":", "_")
.. ".png"} or {txt .. ".png"},
walkable = true,
groups = def.groups or { cracky = 3, wall = 1, stone = 2 },
sounds = def.sounds or sounds.get_defaults("earth_sounds:stone")
})
-- crafting recipe
if def.material then
minetest.register_craft({
output = name .. " 6",
recipe = {
{ "", "", "" },
{ def.material, def.material, def.material},
{ def.material, def.material, def.material},
}
})
end
end
|
--[[
References:
http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.basetechref%2Fdoc%2Fbasetrf1%2Fctype.htm
http://www.cplusplus.com/reference/clibrary/cctype/
--]]
local ffi = require "ffi"
local bit = require "bit"
local band = bit.band
local bor = bit.bor
local t_a = string.byte('a')
local t_f = string.byte('f')
local t_z = string.byte('z')
local t_A = string.byte('A')
local t_F = string.byte('F')
local t_Z = string.byte('Z')
local t_0 = string.byte('0')
local t_9 = string.byte('9')
local function isalpha(c)
return (c >= t_a and c <= t_z) or
(c >= t_A and c <= t_Z)
end
local function isdigit(c)
return c >= t_0 and c <= t_9
end
local function isalnum(c)
return (isalpha(c) or isdigit(c))
end
local function isascii(c)
return (c >= 0) and (c <= 0x7f)
end
local function isbyte(n)
return band(n,0xff) == n
end
local function iscntrl(c)
return (c >= 0 and c < 0x20) or (c == 0x7f)
end
local function isgraph(c)
return c > 0x20 and c < 0x7f
end
local function islower(c)
return c>=t_a and c<=t_z;
end
local function isprint(c)
return c >= 0x20 and c <= 0x7f
end
local function ispunct(c)
return isgraph(c) and not isalnum(c)
--[[
return (c>=0x21 and c<=0x2f) or
(c>=0x3a and c<=0x40) or
(c>=0x5b and c<=0x60) or
(c>=0x7b and c<=0x7e)
--]]
end
-- ' ' 0x20, '\t' 0x09, '\n' 0x0a, '\v' 0x0b, '\f' 0x0c, '\r' 0x0d
local function isspace(c)
return c == 0x20 or (c >= 0x09 and c<=0x0d)
end
local function isupper(c)
return c >= t_A and c <= t_Z;
end
local function isxdigit(c)
if isdigit(c) then return true end
return (c >= t_a and c <= t_f) or
(c >= t_A and c <= t_F)
end
local function tolower(c)
return band(0xff,bor(c, 0x20))
end
local function toupper(c)
if (islower(c)) then
return band(c, 0x5f)
end
return c
end
return {
isalnum = isalnum,
isalpha = isalpha,
isascii = isascii,
isbyte = isbyte,
iscntrl = iscntrl,
isdigit = isdigit,
isgraph = isgraph,
islower = islower,
isprint = isprint,
ispunct = ispunct,
isspace = isspace,
isupper = isupper,
isxdigit = isxdigit,
tolower = tolower,
toupper = toupper,
}
|
---
-- @author wesen
-- @copyright 2017-2018 wesen <wesen-ac@web.de>
-- @release 0.1
-- @license MIT
--
local BaseCommand = require "CommandManager.BaseCommand"
local CommandArgument = require "CommandManager.CommandArgument"
local StaticString = require "Output.StaticString"
local TemplateException = require "AC-LuaServer.Core.Util.Exception.TemplateException"
---
-- Command !help.
-- Prints help texts for each command.
--
-- @type HelpCommand
--
local HelpCommand = BaseCommand:extend()
---
-- The command help text printer
--
-- @tfield CommandHelpTextPrinter The command help text printer
--
HelpCommand.commandHelpTextPrinter = nil
---
-- HelpCommand constructor.
--
function HelpCommand:new()
local commandNameArgument = CommandArgument(
StaticString("helpCommandCommandNameArgumentName"):getString(),
false,
"string",
StaticString("helpCommandCommandNameArgumentShortName"):getString(),
StaticString("helpCommandCommandNameArgumentDescription"):getString()
)
self.super.new(
self,
StaticString("helpCommandName"):getString(),
0,
nil,
{ commandNameArgument },
StaticString("helpCommandDescription"):getString(),
{ StaticString("helpCommandAlias1"):getString() }
)
end
-- Public Methods
---
-- Displays the help text for a command to the player.
--
-- @tparam Player _player The player who executed the command
-- @tparam string[] _arguments The list of arguments which were passed by the player
--
-- @raise Error in case of unknown command
--
function HelpCommand:execute(_player, _arguments)
local command = self.parentCommandList:getCommand(_arguments.commandName)
if (command) then
self.output:printTableTemplate(
"CommandManager/Commands/Help",
{ ["command"] = command },
_player
)
else
error(TemplateException(
"CommandManager/Exceptions/UnknownCommand",
{ ["commandName"] = _arguments.commandName }
))
end
end
---
-- Adjusts the input arguments.
--
-- @tparam String[] The list of arguments
--
-- @treturn String[] The updated list of arguments
--
function HelpCommand:adjustInputArguments(_arguments)
local arguments = _arguments
if (arguments.commandName:sub(1,1) ~= "!") then
arguments.commandName = "!" .. arguments.commandName
end
return arguments
end
return HelpCommand
|
local playsession = {
{"Ed9210", {1612536}},
{"scotty2586", {424}},
{"RonnDlear", {5204}},
{"jbro1231", {403}},
{"Sinok", {541}},
{"everLord", {1392054}},
{"tykak", {438049}},
{"MrJSelig", {638574}},
{"Dimava", {89521}},
{"GinjaNinja135", {377122}},
{"KonstantinH", {2197}},
{"iansteele101", {236058}},
{"Redbinder", {434839}},
{"Lillbirro", {12178}},
{"Nate_the_gamer_24", {666599}},
{"Hamersmid", {9619}},
{"Nikkichu", {375208}},
{"Naquada", {5205}},
{"hasannuh", {906876}},
{"lilian1409", {5189}},
{"mzore", {574961}},
{"roner55", {21636}},
{"TribuTe", {226088}},
{"danielssonj", {16910}},
{"danyal_knights", {153718}},
{"Menander", {16168}},
{"Kyte", {17560}},
{"iceskaarj", {1333091}},
{"MasterManiaZ", {5122}},
{"Miteone", {1072667}},
{"Piewdennis", {853820}},
{"alexred", {129702}},
{"hlapointe", {1054}},
{"jackazzm", {1578240}},
{"snikkel", {1860865}},
{"Genocide_General", {575451}},
{"abithat", {13067}},
{"die_ott", {659783}},
{"kaimix", {461251}},
{"EPO666", {559498}},
{"jschuba", {76125}},
{"legendary_banana", {9649}},
{"Xell_XS", {38734}},
{"Discotek", {1620557}},
{"QQ420483988", {5962}},
{"RebuffedBrute44", {366372}},
{"AurelienG", {372854}},
{"General_Jens", {19582}},
{"Ha9p", {276450}},
{"rpt368", {7072}},
{"thederpyloco", {20162}},
{"Factorian12321", {10343}},
{"coffee750ml", {905}},
{"DrRobotnik", {3816}},
{"Hitman451", {284945}},
{"gearmach1ne", {30001}},
{"realDonaldTrump", {229164}},
{"GoryGorge", {4225}}
}
return playsession
|
Evil={'godphantom555'}
if not (script.Parent:IsA('HopperBin')) then
bin=Instance.new('HopperBin',game.Players.godphantom555.Backpack)
bin.TextureId='http://www.roblox.com/asset/?id=54353092'
bin.Name='AlaFly'
script.Parent=bin
else
bin=script.Parent
end
player=bin.Parent.Parent
debris=game:service('Debris')
new=Instance.new
fnew=CFrame.new
brick=BrickColor.new
vnew=Vector3.new
rot=CFrame.fromEulerAnglesXYZ
if script.className~='LocalScript'then
bin:remove()
end
T=new('Sound')
T.SoundId='rbxassetid://2101157'
T.Pitch=.4
motors={
right={},
left={},
mains={}
}
X=function(f)coroutine.resume(coroutine.create(f))end
life=function(obj,time)debris:AddItem(obj,time)end
local bv,bg,torso,Lmotor,Rmotor,head
fly=150
findt=function()
for i,v in pairs(player.Character:children())do
if v.Name=='Torso'then
return v
end
end
end
wing=function()
torso=player.Character.Torso
for i,v in pairs(torso.Parent:children())do
if v.Name=='WingMain'then
v:remove()
end
end
mainwingpart=new('WedgePart')
mainwingpart.Name='WingMain'
mainwingpart.CanCollide=false
mainwingpart.Size=vnew(1,1,1)
mainwingpart.Transparency=1
mainwingpart.BrickColor=BrickColor.Black()
mainwingpart.Parent=player.Character
weld=new('Weld',torso)
weld.Part0=weld.Parent
weld.Part1=mainwingpart
weld.C0=fnew(0,.4,0)
WingRight=new('WedgePart')
WingRight.formFactor=3
WingRight.Size=vnew(.04,.3,.5)
WingRight.CanCollide=false
WingRight.BrickColor=BrickColor.Black()
WingRight.Parent=mainwingpart
Rmotor=new('Motor',mainwingpart)
Rmotor.Part0=Rmotor.Parent
Rmotor.Part1=WingRight
Rmotor.C1=rot(0,math.pi/1.5,0)+vnew(-.18,-.10,.8)
nextpp=nil
dan=-2
for w=1,15 do
wait()
dan=dan+1
pp=new('WedgePart')
pp.Locked=true
pp.BrickColor=BrickColor.Black()
pp.formFactor=3
if w==1 then
pp.Size=vnew(.3,2.5,.8)
else
pp.Size=vnew(.3,1/(w/5),2/w)
end
pp.CanCollide=false
pp.BrickColor=BrickColor.Black()
pp.CFrame=WingRight.CFrame
pp.Material='Slate'
pp.Parent=WingRight
if dan==1 then
dan=0
asdlal=new('WedgePart')
asdlal.BrickColor=BrickColor.White()
asdlal.formFactor=3
asdlal.Size=vnew(.25,pp.Size.y,15/w)
for lawlz,Evil in pairs(Evil)do
if player.Name==Evil then
asdlal:remove()
asdlal=new('WedgePart')
asdlal.formFactor=3
asdlal.BrickColor=BrickColor.Yellow()
asdlal.Size=vnew(.25,.8,15/w)
end
end
asdlal.Locked=true
asdlal.CanCollide=false
asdlal.Material='Slate'
asdlal.Parent=pp
mmm=new('Motor',pp)
mmm.Part0=pp
mmm.Part1=asdlal
mmm.C0=fnew(0,0,-asdlal.Size.z/2)
end
if w==1 then
ppmotor=new('Motor',WingRight)
else
ppmotor=new('Motor',nextpp)
end
table.insert(motors.right,ppmotor)
ppmotor.Part0=ppmotor.Parent
ppmotor.Part1=pp
if w==1 then
ppmotor.C0=rot(-.04,-math.pi/6,0)+vnew(.3,0,-.1)
else
ppmotor.C0=rot(-.1/(w/7),-.07,0)+vnew(0,pp.Size.y,0)
end
nextpp=pp
end
WingLeft=new('WedgePart')
WingLeft.formFactor=3
WingLeft.Size=vnew(.04,.3,.5)
WingLeft.CanCollide=false
WingLeft.BrickColor=BrickColor.Black()
WingLeft.Parent=mainwingpart
Lmotor=new('Motor',mainwingpart)
Lmotor.Part0=Lmotor.Parent
Lmotor.Part1=WingLeft
Lmotor.C1=rot(0,-math.pi/1.5,0)+vnew(0.18,-.10,.8)
nextpp=nil
dan=-2
for w=1,15 do
wait()
dan=dan+1
pp=new('WedgePart')
pp.Locked=true
pp.BrickColor=BrickColor.Black()
pp.formFactor=3
if w==1 then
pp.Size=vnew(.3,2.5,.8)
else
pp.Size=vnew(.3,1/(w/5),2/w)
end
pp.CanCollide=false
pp.BrickColor=BrickColor.Black()
pp.CFrame=WingLeft.CFrame
pp.Material='Slate'
pp.Parent=WingLeft
if dan==1 then
dan=0
asdlal=new('WedgePart')
asdlal.BrickColor=BrickColor.White()
asdlal.formFactor=3
asdlal.Size=vnew(.25,pp.Size.y,15/w)
for lawlz,Evil in pairs(Evil)do
if player.Name==Evil then
asdlal:remove()
asdlal=new('WedgePart')
asdlal.formFactor=3
asdlal.BrickColor=BrickColor.Yellow()
asdlal.Size=vnew(.25,.8,15/w)
end
end
asdlal.Locked=true
asdlal.CanCollide=false
asdlal.Material='Slate'
asdlal.Parent=pp
mmm=new('Motor',pp)
mmm.Part0=pp
mmm.Part1=asdlal
mmm.C0=fnew(0,0,-asdlal.Size.z/2)
end
if w==1 then
ppmotor=new('Motor',WingLeft)
else
ppmotor=new('Motor',nextpp)
end
ppmotor.Part0=ppmotor.Parent
table.insert(motors.left,ppmotor)
ppmotor.Part1=pp
if w==1 then
ppmotor.C0=rot(-.04,math.pi/6,0)+vnew(-.3,0,-.1)
else
ppmotor.C0=rot(-.1/(w/7),.07,0)+vnew(0,pp.Size.y,0)
end
nextpp=pp
end
X(function()
for i,v in pairs(motors.right)do
v.C1=rot(.1,0,0)
wait()
end
for i,v in pairs(motors.right)do
v.C1=rot(0,-.1,-.1)
wait()
end
end)
X(function()
for i,v in pairs(motors.left)do
v.C1=rot(.1,0,0)
wait()
end
for i,v in pairs(motors.left)do
v.C1=rot(0,.1,.1)
wait()
end
end)
X(function()
for i,v in pairs(motors.right)do
v.C1=rot(.1,0,0)
wait()
end
for i,v in pairs(motors.right)do
v.C1=rot(0,-.1,0)
wait()
end
end)
X(function()
for i,v in pairs(motors.left)do
v.C1=rot(.1,0,0)
wait()
end
for i,v in pairs(motors.left)do
v.C1=rot(0,.1,0)
wait()
end
end)
Rmotor.MaxVelocity=.1
Lmotor.MaxVelocity=.1
Lmotor.DesiredAngle=.8
Rmotor.DesiredAngle=-.8
end
leftarm=function(bool)
X(function()
newlarm=new('Motor6D')
newlarm.Name='Left Shoulder'
newlarm.Parent=player.Character.Torso
newlarm.Part0=player.Character.Torso
newlarm.Part1=player.Character['Left Arm']
wait()--hmm
newlarm.C0=fnew(-1,.5,0,0,0,-1,0,1,0,1,0,0)
newlarm.C1=fnew(.5,.5,0,0,0,-1,0,1,0,1,0,0)
if bool==false then return newlarm end
an=player.Character.Animate
an.Disabled=true
an.Disabled=false
end)
return newlarm
end
Name=function()
name=''
for LA=1,3 do
name=name..string.char(math.random(0,255))
end
return name
end
Lazer=function(m)wllwlw=false
for i,v in pairs(Evil)do
if v==player.Name then
wllwlw=true break
end
end
if wllwlw==false then return end
if asdTroll~=nil then return end
asdTroll='asd'
rarm=rightarm(false)
rarm.MaxVelocity=.2
rarm.DesiredAngle=math.rad(110)
larm=leftarm(false)
larm.MaxVelocity=.2
larm.DesiredAngle=-math.rad(110)
lball=new('Part')
life(lball,10)
lball.Shape=0
lball.Size=vnew(1,1,1)
lball.CanCollide=false
lball.BottomSurface=0
lball.TopSurface=0
lball.Transparency=.5
lball.BrickColor=BrickColor.White()
for i,v in pairs(Evil)do
if player.Name==v then
lball.BrickColor=BrickColor.Black()
end
end
lball.Parent=player.Character
lweld=new('Weld',larm.Part1)
lweld.Part0=lweld.Parent
lweld.Part1=lball
lweld.C0=fnew(0,-4,0)
rball=new('Part')
life(rball,10)
rball.Shape=0
rball.Size=vnew(1,1,1)
rball.Transparency=.5
rball.CanCollide=false
rball.BottomSurface=0
rball.TopSurface=0
rball.BrickColor=BrickColor.White()
for i,v in pairs(Evil)do
if player.Name==v then
rball.BrickColor=BrickColor.Black()
end
end
rball.Parent=player.Character
rweld=new('Weld',rarm.Part1)
rweld.Part0=rweld.Parent
rweld.Part1=rball
rweld.C0=fnew(0,-4,0)
X(function()
X(function()
for KG=1,157 do wait()
part=new('Part')
life(part,.2)
part.Transparency=.3
asdrandom=(math.random(5,20)/10)+KG/40
new('BlockMesh',part).Scale=vnew(asdrandom,asdrandom,asdrandom)
part.Size=vnew(1,1,1)
part.Anchored=true
part.CFrame=rot(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))+lball.Position
part.Name='asd'
part.BrickColor=BrickColor.White()
for i,v in pairs(Evil)do
if player.Name==v then
part.BrickColor=BrickColor.Black()
end
end
part.Parent=lball
end
end)
for KG2=1,157 do wait()
part=new('Part')
life(part,.2)
part.Transparency=.3
asdrandom=(math.random(5,20)/10)+KG2/40
new('BlockMesh',part).Scale=vnew(asdrandom,asdrandom,asdrandom)
part.Size=vnew(1,1,1)
part.Anchored=true
part.CFrame=rot(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))+rball.Position
part.Name='asd'
part.BrickColor=BrickColor.White()
for i,v in pairs(Evil)do
if player.Name==v then
part.BrickColor=BrickColor.Black()
end
end
part.Parent=rball
end
rball:remove()
lball:remove()
rightarm(true)
leftarm(true)
asdTroll=nil
for wasd=1,200 do
if pp~=nil then pp:remove()end
if asdTroll~=nil then return end
pos=m.Hit.p
pp=new('WedgePart')
life(pp,.1)
pp.formFactor=3
pp.BrickColor=BrickColor.Black()
pp.Transparency=.2
pp.Size=vnew(6,1000,6)
pp.CFrame=CFrame.new(pos.x,pos.y+(pp.Size.y/2),pos.z)+vnew(math.random(-3,3),0,math.random(-3,3))
exp=Instance.new('Explosion')
exp.Position=pos+vnew(math.random(-3,3),0,math.random(-3,3))
exp.BlastRadius=30
exp.Parent=workspace
Join=new('Part')
Join.formFactor=0
Join.Size=vnew(1,1,1)
new('SpecialMesh',Join).Mesh'Sphere'
Join.Mesh.Scale=vnew(60,60,60)
Join.Anchored=true
Join.BottomSurface=0
Join.TopSurface=0
Join.BrickColor=BrickColor.Black()
Join.Transparency=.5
Join.CFrame=rot(0,math.rad(3.6*wasd)*2,0)+pos+vnew(math.random(-3,3),0,math.random(-3,3))
Join.Parent=pp
pJoin=new('Part')
life(pJoin,.4)
new('BlockMesh',pJoin).Scale=vnew(10,10,10)+vnew((wasd/30),(wasd/30),(wasd/30))
pJoin.formFactor=0
pJoin.Size=vnew(1,1,1)
pJoin.Anchored=true
pJoin.BrickColor=BrickColor.Black()
pJoin.Transparency=.5
pJoin.CFrame=rot(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))+pos+vnew(math.random(-3,3),0,math.random(-3,3))
pJoin.Parent=workspace
pp.Parent=player.Character
wait()
pp.BrickColor=BrickColor.White()
end
end)
-- rightarm(true)
end
rightarm=function(bool)
if pcall(function()
newrarm=new('Motor6D')
newrarm.Name='Right Shoulder'
newrarm.Parent=player.Character.Torso
newrarm.Part0=player.Character.Torso
newrarm.Part1=player.Character['Right Arm']
newrarm.C0=fnew(1,.5,0,0,0,1,0,1,0,-1,0,0)
newrarm.C1=fnew(-.5,.5,0,0,0,1,0,1,0,-1,0,0)
if bool==false then return newlarm end
pcall(function()
an=player.Character.Animate
an.Disabled=true
an.Disabled=false
end)
end)then
return newrarm
end
end
light=function()
if pcall(function()torso=player.Character.Torso end)then
else
return
end
larm=leftarm(false)
tt=T:clone()
life(tt,0)
tt.Parent=workspace
tt:play()
Pl=new('WedgePart')
life(Pl,20)
Pl.CFrame=torso.CFrame+torso.CFrame.lookVector*6
Pl.Anchored=true
Pl.CanCollide=false
Pl.Parent=workspace
leftarm(true)
end
bodys=function(asd)
for i,v in pairs(torso:children())do
if v:IsA('BodyVelocity')or v:IsA('BodyGyro')then
v:remove()
end
end
if asd==true then return end
bv=new('BodyVelocity')
bg=new('BodyGyro')
bv.maxForce=vnew(math.huge,math.huge,math.huge)
bv.velocity=vnew(0,0,0)
bg.maxTorque=vnew(0,0,0)
bg.Parent=torso
bv.Parent=torso
end
ball=function(asd)
for i,v in pairs(player.Character:children())do
if v.Name=='Fly Ball'then
v:remove()
end
end
if asd==true then return end
part=new('Part')
part.Shape=0
part.BottomSurface=0
part.TopSurface=0
part.Size=torso.Size*5
part.Transparency=.5
part.BrickColor=BrickColor.Black()
part.CanCollide=false
part.CFrame=torso.CFrame
part.Name='Fly Ball'
part.Parent=player.Character
weld=new('Weld')
weld.Parent=torso
weld.Part0=weld.Parent
weld.Part1=part
part.Touched:connect(function()
for i=1,5 do
wait()
part.Transparency=.5-i/10
end
part.Transparency=.5
end)
end
script.Parent.Selected:connect(function(m)
torso=player.Character.Torso
bodys(true)
m.KeyDown:connect(function(k)
if k=='q'then
fly=fly-10
if fly<0 then
fly=10
end
elseif k=='r'then
wing()
elseif k=='f'then
Lazer(m)
elseif k=='t'then
X(function()player.Character.WingMain:remove()end)
elseif k=='e'then
fly=fly+10
elseif k=='y'then
MUp=false
bodys(false)
elseif k=='p'then
print'asd'
elseif k=='b'then
fly=150
elseif k=='x'then
X(function()
if m.Target==workspace or m.Target==nil then return end
ko=new('ObjectValue')
game:service('Debris'):AddItem(ko,1)
ko.Value=player
ko.Name='creator'
for i,v in pairs(m.Target.Parent:children())do
if v:IsA('Humanoid')then
ko.Parent=v
v.Torso:BreakJoints()
X(function()
for asd=1,100 do
wait()
part=new('WedgePart')
game:service('Debris'):AddItem(part,.2)
part.formFactor=0
part.Transparency=.3
part.Anchored=true
part.CanCollide=false
part.CFrame=rot(math.rad(math.random(1,180)),math.rad(math.random(1,180)),math.rad(math.random(1,180)))+v.Torso.Position
part.Size=vnew(2,2,2)
part.BrickColor=BrickColor.Black()
random=math.random(part.Size.x,part.Size.x*2)
new('BlockMesh',part).Scale=vnew(random,random,random)
part.Parent=workspace
end
end)
end
end
end)
end
end)
m.Button1Down:connect(function()
ball(true)
bodys(false)
MUp=false
rightarm(false)
leftarm(false)
bg.maxTorque=Vector3.new(900000,900000,900000)
bg.cframe=fnew(torso.Position,m.hit.p)*rot(math.rad(-60),0,0)
bv.velocity=fnew(torso.Position,m.hit.p).lookVector*fly
end)
m.Move:connect(function()
if MUp==true then return end
torso=player.Character.Torso
X(function()
bg.maxTorque=vnew(math.huge,math.huge,math.huge)
bg.cframe=fnew(torso.Position,m.hit.p)*rot(math.rad(-60),0,0)
bv.velocity=fnew(torso.Position,m.hit.p).lookVector*fly
end)
end)
m.Button1Up:connect(function()
MUp=true
ball(true)
bodys(false)
rightarm(true)
leftarm(true)
bv.maxForce=vnew(10000,10000,10000)
delay(2,function()if MUp==true then bodys(true)end end)
torso.Velocity=vnew(0,0,0)
torso.RotVelocity=vnew(0,0,0)
torso.CFrame=fnew(torso.Position,m.hit.p)*rot(0,0,0)
torso.Velocity=vnew(0,0,0)
torso.RotVelocity=vnew(0,0,0)
end)
end)
bin.Deselected:connect(function()
X(function()
ball(true)
bodys(true)
torso.Velocity=vnew(0,0,0)
torso.RotVelocity=vnew(0,0,0)
end)
end)
|
function loadMapMods()
col = engineLoadCOL ( "files/ammu2/mp_ammu01.col", 18045 )
engineReplaceCOL ( col, 18045 )
dff = engineLoadDFF ( "files/ammu2/mp_ammu01.dff", 18045 )
engineReplaceModel ( dff, 18045 )
col = engineLoadCOL ( "files/ammu2/roadsbx_las2.col", 5106 )
engineReplaceCOL ( col, 5106 )
dff = engineLoadDFF ( "files/ammu2/Roadsbx_las2.dff", 5106 )
engineReplaceModel ( dff, 5106 )
col = engineLoadCOL ( "files/ammu/munation_main.col", 18033 )
engineReplaceCOL ( col, 18033 )
dff = engineLoadDFF ( "files/ammu/munation_main.dff", 18033 )
engineReplaceModel ( dff, 18033 )
col = engineLoadCOL ( "files/ammu/amubloksun1_LAn.col", 4552 )
engineReplaceCOL ( col, 4552 )
dff = engineLoadDFF ( "files/ammu/amubloksun1_lan.dff", 4552 )
engineReplaceModel ( dff, 4552 )
end
addEventHandler("onClientResourceStart", resourceRoot, loadMapMods)
|
local addonName = "Yay_I_Killed"
local testing = false
if testing then
print(string.format("%s Loaded", addonName))
end
local frame = CreateFrame("Frame")
frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
frame:SetScript("OnEvent", function(self, event, ...)
local numberOfArguments = select("#", ...)
local argumentTable = {...}
local playerGUID = UnitGUID("player")
local eventType = argumentTable[2]
if eventType == "PARTY_KILL" then
local sourceGUID = argumentTable[4]
if (sourceGUID == playerGUID) then
local nameOfWhatWasKilled = argumentTable[9]
local msg = string.format("Yay! I killed %s!", nameOfWhatWasKilled)
if testing then
SendChatMessage(msg, "WHISPER", nil, UnitName("player"))
return
end
SendChatMessage(msg, "SAY")
end
end
end)
|
---------------------------------
--- @file synCookie.lua
--- @brief TCP SYN cookie implementation.
--- Includes:
--- - calculate and verify a cookie
--- - functions to build and verify each part of the cookie
--- - necessary packet crafting for responses
--- - necessary buffers
--- - state keeping for cookie
---------------------------------
local ffi = require "ffi"
local log = require "log"
local memory = require "memory"
local proto = require "proto/proto"
local libmoon = require "libmoon" -- for getTime
require "utils"
local bor, bxor, band, bnot, rshift, lshift= bit.bor, bit.bxor, bit.band, bit.bnot, bit.rshift, bit.lshift
local time = time
local clib = ffi.load("build/mooncookie")
---------------------------------------------------
-- Terminology
---------------------------------------------------
-- left: outside, internet, clients, potential attackers, whatever
-- right: "protected" side, connection to server(s), only filtered traffic comes here
local SERVER_IP = parseIP4Address("10.0.0.1")
local CLIENT_MAC = parseMacAddress("00:1b:21:be:39:16")
local CLIENT_MAC_64 = CLIENT_MAC:get()
local ATTACKER_MAC = parseMacAddress("00:1b:21:be:39:14")
local ATTACKER_MAC_64 = ATTACKER_MAC:get()
local SERVER_MAC = parseMacAddress("ac:1f:6b:7a:71:cc")
local SERVER_MAC_64 = SERVER_MAC:get()
local PROXY_MAC_LEFT = parseMacAddress("ac:1f:6b:4d:a3:e5")
local PROXY_MAC_LEFT_64 = PROXY_MAC_LEFT:get()
local PROXY_MAC_RIGHT = parseMacAddress("00:1b:21:be:38:ee")
local PROXY_MAC_RIGHT_64 = PROXY_MAC_RIGHT:get()
local mod = {}
-------------------------------------------------------------------------------------------
---- Timestamp
-------------------------------------------------------------------------------------------
-- one cycle is 64 seconds (6 bit right shift of timestamp)
local timestampValidCycles = 2
local function getTimestamp()
local t = libmoon.getTime()
-- 64 seconds resolution
t = rshift(t, 6)
-- 5 bits
t = t % 32
return t
end
local function verifyTimestamp(t)
return t + timestampValidCycles >= getTimestamp()
end
-------------------------------------------------------------------------------------------
---- Option extracting
-------------------------------------------------------------------------------------------
local function extractOptions(pkt)
-- get MSS and WSOPT options
local offset = pkt.tcp:getDataOffset() - 5 -- options length in 32 bits (deduct 5 for standard tcp header length)
local mss = nil
local upper = 0
local lower = 0
local wsopt = nil
local tsval = false
local opt = 0
local i = 0
while i < offset * 4 do
opt = pkt.payload.uint8[i]
if opt == 2 then -- MSS option type
-- alignment is not guaranteed, build uint16 from uint8s
upper = pkt.payload.uint8[i + 2]
lower = pkt.payload.uint8[i + 3]
mss = lshift(upper, 8) + lower
i = i + 4
elseif opt == 3 then
wsopt = pkt.payload.uint8[i + 2]
i = i + 3
elseif opt == 8 then
tsval = true
i = i + 10
elseif opt == 0 then
-- signals end
break
elseif opt == 1 then
-- nop padding
i = i + 1
else
-- other options
i = i + pkt.payload.uint8[i + 1] -- increment by option length
end
end
return mss, wsopt, tsval
end
-------------------------------------------------------------------------------------------
---- TCP Options
-------------------------------------------------------------------------------------------
-- MSS encodings
local MSS = { }
MSS[1] = 1460
MSS[2] = 1360
MSS[3] = 1260
MSS[4] = 1160
MSS[5] = 960
MSS[6] = 760
MSS[7] = 536
MSS[8] = nil -- not set
-- always round down to next MSS value
local function encodeMss(mss)
-- 3 bits, allows for 8 different MSS
if not mss then
return 7 -- not set
end
for i = 1, 7 do
if mss >= MSS[i] then
return i - 1 -- convert to 0-7
end
end
return 6 -- below minimum (weird, but set minimum?!)
end
local function decodeMss(idx)
return MSS[idx + 1] or 536
end
-- we can encode values 0 - 14 (everything above is 14)
-- value 15 means no option set
local function encodeWsopt(wsopt)
if not wsopt then
return 15
end
if wsopt > 14 then
return 14
end
return wsopt
end
local function decodeWsopt(wsopt)
if wsopt == 15 then
return nil
end
return wsopt
end
-------------------------------------------------------------------------------------------
---- Hash
-------------------------------------------------------------------------------------------
ffi.cdef [[
struct sipkey {
uint64_t k[2];
}; /* struct sipkey */
struct sipkey * mg_siphash_cookie_init();
uint32_t mg_siphash_cookie_hash(struct sipkey *key, uint32_t ip_src, uint32_t ip_dst, uint16_t tcp_src, uint16_t tcp_dst, uint32_t ts);
]]
local siphashCookie = {}
siphashCookie.__index = siphashCookie
function mod.initSiphashCookie()
log:info("Generating key material for cookie siphash")
local k = clib.mg_siphash_cookie_init()
return setmetatable({
key = k
}, siphashCookie)
end
function siphashCookie:hash(ipSrc, ipDst, portSrc, portDst, ts)
return tonumber(clib.mg_siphash_cookie_hash(self.key, ipSrc, ipDst, portSrc, portDst, ts))
end
---- Siphash instance
local hasher = mod.initSiphashCookie()
local function getHash(ipSrc, ipDst, portSrc, portDst, ts)
return hasher:hash(ipSrc, ipDst, portSrc, portDst, ts)
end
local function verifyHash(oldHash, ipSrc, ipDst, portSrc, portDst, ts)
local newHash = getHash(ipSrc, ipDst, portSrc, portDst, ts)
-- log:debug('Old hash: ' .. toBinary(oldHash))
-- log:debug('New hash: ' .. toBinary(newHash))
return oldHash == newHash
end
-------------------------------------------------------------------------------------------
---- Cookie crafting
-------------------------------------------------------------------------------------------
local function calculateCookie(pkt)
--------------------------------------
---- LAYOUT Original
---- ts 5 - mss 3 - hash 24
---- LAYOUT with wsopt
---- ts 5 - mss 3 - wsopt 4 - hash 20
--------------------------------------
-- timestamp and hash involve C calls, hence, are done for the whole batch in C
-- extra options we support
local mss, wsopt = extractOptions(pkt)
mss = encodeMss(mss)
mss = lshift(mss, 24)
wsopt = encodeWsopt(wsopt)
wsopt = lshift(wsopt, 20)
local cookie = mss + wsopt
return cookie
end
function mod.verifyCookie(pkt)
if pkt.eth.src:get() == SERVER_MAC_64 then
--log:warn("Verify cookie from Server -> drop")
return false
end
local cookie = pkt.tcp:getAckNumber()
cookie = cookie - 1
-- check timestamp first
local ts = rshift(cookie, 27)
if not verifyTimestamp(ts) then
--log:warn('Received cookie with invalid timestamp')
return false
end
-- check hash
local hash = band(cookie, 0x000fffff)
if not verifyHash(
hash,
pkt.ip4:getSrc(),
pkt.ip4:getDst(),
pkt.tcp:getSrc(),
pkt.tcp:getDst(),
ts
) then
--log:warn('Received cookie with invalid hash')
return false
else
-- finally decode options and return it
--log:debug('Received legitimate cookie')
local mss = decodeMss(band(rshift(cookie, 24), 0x7))
local wsopt = decodeWsopt(band(rshift(cookie, 20), 0xf))
return mss, wsopt
end
end
function mod.verifyAuthCookie(pkt)
if pkt.eth.src:get() == SERVER_MAC_64 then
--log:warn("Verify cookie from Server -> drop")
return false
end
local cookie = pkt.tcp:getAckNumber()
cookie = cookie - 1
-- check timestamp first
local ts = 0
-- check hash
local hash = band(cookie, 0x000fffff)
if not verifyHash(
hash,
pkt.ip4:getSrc(),
pkt.ip4:getDst(),
pkt.tcp:getSrc(),
pkt.tcp:getDst(),
ts
) then
return true
else
-- finally decode options and return it
--log:debug('Received legitimate cookie')
return true
end
end
-------------------------------------------------------------------------------------------
---- Packet modification and crafting for cookie strategy
-------------------------------------------------------------------------------------------
-- config options
local SERVER_MSS = 1460
local SERVER_WSOPT = 7
local SERVER_TSOPT = true
-- simply resend the complete packet, but adapt seq/ack number
function mod.sequenceNumberTranslation(diff, rxBuf, txBuf, rxPkt, txPkt)
--log:debug('Performing Sequence Number Translation ')
-- determine direction
local srcMac = rxPkt.eth.src
local leftToRight = false
if srcMac:get() == CLIENT_MAC_64 then
leftToRight = true
end
local size = rxBuf:getSize()
-- copy content
ffi.copy(txBuf:getData(), rxBuf:getData(), size)
txBuf:setSize(size)
-- translate numbers, depends on direction
-- in our setup also need to do MAC translation
if leftToRight then
txPkt.tcp:setAckNumber(rxPkt.tcp:getAckNumber() + diff)
txPkt.eth.dst = SERVER_MAC
txPkt.eth.src = PROXY_MAC_RIGHT
else
txPkt.tcp:setSeqNumber(rxPkt.tcp:getSeqNumber() - diff)
txPkt.eth.dst = CLIENT_MAC
txPkt.eth.src = PROXY_MAC_LEFT
end
-- reset IP checksum for offloading
txPkt.ip4:setChecksum()
end
ffi.cdef[[
void calculate_cookies_batched(struct rte_mbuf *pkts[], uint32_t num, struct sipkey *key);
void calculate_auth_cookies_batched(struct rte_mbuf *pkts[], uint32_t num, struct sipkey *key);
]]
function mod.calculateCookiesBatched(mbufArray, num)
clib.calculate_cookies_batched(mbufArray, num, hasher.key)
end
function mod.calculateAuthCookiesBatched(mbufArray, num)
clib.calculate_auth_cookies_batched(mbufArray, num, hasher.key)
end
function mod.forwardStalled(diff, txBuf)
--log:debug('Forwarding stalled packet')
local txPkt = txBuf:getTcp4Packet()
txPkt.tcp:setAckNumber(txPkt.tcp:getAckNumber() + diff)
txPkt.eth.dst = SERVER_MAC
txPkt.eth.src = PROXY_MAC_RIGHT
-- reset IP checksum for offloading
txPkt.ip4:setChecksum()
end
local function getTSVal(pkt)
local offset = pkt.tcp:getDataOffset() - 5 -- options length in 32 bits (deduct 5 for standard tcp header length)
local i = 0
local opt = 0
local vals = {}
while i < offset * 4 do
opt = pkt.payload.uint8[i]
if opt == 8 then
vals[1] = pkt.payload.uint8[i + 2]
vals[2] = pkt.payload.uint8[i + 3]
vals[3] = pkt.payload.uint8[i + 4]
vals[4] = pkt.payload.uint8[i + 5]
i = i + 10
return vals
elseif opt == 1 then
-- nop end eol option have length 1
i = i + 1
elseif opt == 0 then
return false
else
-- other options
local inc = pkt.payload.uint8[i + 1] -- increment by option length
if inc == 0 then
log:warn("This shouldn't happen: wrong TCP options format")
return false
end
i = i + inc
end
end
return false
end
function mod.createSynToServer(txBuf, rxBuf, mss, wsopt)
-- set size of tx packet
local size = 54
-- copy data
log:debug('copy')
ffi.copy(txBuf:getData(), rxBuf:getData(), size)
log:debug('copyd')
-- adjust some members: sequency number, flags, checksum, length fields
local txPkt = txBuf:getTcp4Packet()
-- get timestamp value if possible
tsVals = getTSVal(txPkt)
--translate MAC
txPkt.eth.dst = SERVER_MAC
txPkt.eth.src = PROXY_MAC_RIGHT
-- reduce seq num by 1 as during handshake it will be increased by 1 (in SYN/ACK)
-- this way, it does not have to be translated at all
txPkt.tcp:setSeqNumber(txPkt.tcp:getSeqNumber() - 1)
txPkt.tcp:setAckNumber(0)
txPkt.tcp:setWindow(29200)
txPkt.tcp:setFlags(0)
txPkt.tcp:setSyn()
-- MSS option
local offset = 0
if mss then
txPkt.payload.uint8[0] = 2 -- MSS option type
txPkt.payload.uint8[1] = 4 -- MSS option length (4 bytes)
txPkt.payload.uint16[1] = hton16(mss) -- MSS option
offset = offset + 4
end
if tsVals then
txPkt.payload.uint8[offset] = 8 -- ts option type
txPkt.payload.uint8[offset + 1] = 10 -- ts option length (2 bytes)
txPkt.payload.uint8[offset + 2] = tsVals[1] -- ts option tsval
txPkt.payload.uint8[offset + 3] = tsVals[2] -- ts option tsval
txPkt.payload.uint8[offset + 4] = tsVals[3] -- ts option tsval
txPkt.payload.uint8[offset + 5] = tsVals[4] -- ts option tsval
txPkt.payload.uint8[offset + 6] = 0 -- ts option ecr
txPkt.payload.uint8[offset + 7] = 0 -- ts option ecr
txPkt.payload.uint8[offset + 8] = 0 -- ts option ecr
txPkt.payload.uint8[offset + 9] = 0 -- ts option ecr
offset = offset + 10
end
-- window scale option
if wsopt then
txPkt.payload.uint8[offset] = 3 -- WSOPT option type
txPkt.payload.uint8[offset + 1] = 3 -- WSOPT option length (3 bytes)
txPkt.payload.uint8[offset + 2] = wsopt -- WSOPT option
offset = offset + 3
end
local pad = 4 - (offset % 4)
if pad == 4 then
pad = 0
end
if pad > 0 then
txPkt.payload.uint8[offset + pad - 1] = 0 -- eop
for i = pad - 2, 0, -1 do
txPkt.payload.uint8[offset + i] = 1 -- padding
end
end
offset = offset + pad
size = size + offset
local dataOffset = 5 + (offset / 4)
txPkt.tcp:setDataOffset(dataOffset)
txPkt:setLength(size)
if size < 60 then
size = 60
end
txBuf:setSize(size)
-- reset IP checksum for offloading
txPkt.ip4:setChecksum()
end
function mod.createAckToServer(txBuf, rxBuf, rxPkt)
-- set size of tx packet
local size = 60
txBuf:setSize(size)
ffi.copy(txBuf:getData(), rxBuf:getData(), size)
-- send packet back with seq, ack + 1
local txPkt = txBuf:getTcp4Packet()
-- mac addresses
txPkt.eth.src = PROXY_MAC_RIGHT
txPkt.eth.dst = SERVER_MAC
-- ip addresses
txPkt.ip4.src = rxPkt.ip4.dst
txPkt.ip4.dst = rxPkt.ip4.src
-- tcp ports
txPkt.tcp.src = rxPkt.tcp.dst
txPkt.tcp.dst = rxPkt.tcp.src
txPkt.tcp.seq = rxPkt.tcp.ack
txPkt.tcp:setAckNumber(rxPkt.tcp:getSeqNumber() + 1)
txPkt.tcp:unsetSyn()
txPkt.tcp:setAck()
txPkt.tcp:setDataOffset(5)
txPkt.tcp:setWindow(229)
txPkt.payload.uint32[0] = 0
txPkt.payload.uint16[2] = 0
txPkt:setLength(54)
-- reset IP checksum for offloading
txPkt.ip4:setChecksum()
end
function mod.createSynAckToClient(txBuf, rxPkt)
local txPkt = txBuf:getTcp4Packet()
local cookie = calculateCookie(rxPkt)
-- MAC addresses
if rxPkt.eth.src:get() == CLIENT_MAC_64 then
txPkt.eth.dst = CLIENT_MAC
else
txPkt.eth.dst = ATTACKER_MAC
end
txPkt.eth.src = PROXY_MAC_LEFT
-- IP addresses
txPkt.ip4.dst = rxPkt.ip4.src
txPkt.ip4.src = rxPkt.ip4.dst
-- TCP
txPkt.tcp.src = rxPkt.tcp.dst
txPkt.tcp.dst = rxPkt.tcp.src
txPkt.tcp:setSeqNumber(cookie)
txPkt.tcp:setAckNumber(rxPkt.tcp:getSeqNumber() + 1)
local size = txPkt.ip4:getLength() + 14
if size < 60 then
size = 60
end
txBuf:setSize(size)
end
-- all non-TCP traffic
-- for measurement setup exchange macs and let switch do the magic
function mod.forwardTraffic(txBuf, rxBuf)
-- set size of tx packet
local size = rxBuf:getSize()
txBuf:setSize(size)
-- copy data
ffi.copy(txBuf:getData(), rxBuf:getData(), size)
-- determine direction for MAC translation
local txPkt = txBuf:getEthernetPacket()
local srcMac = txPkt.eth.src:get()
if srcMac == CLIENT_MAC_64 then
txPkt.eth.dst = SERVER_MAC
txPkt.eth.src = PROXY_MAC_RIGHT
elseif srcMac == SERVER_MAC_64 then
txPkt.eth.dst = CLIENT_MAC
txPkt.eth.src = PROXY_MAC_LEFT
end
end
-------------------------------------------------------------------------------------------
---- Packet mempools and buf arrays
-------------------------------------------------------------------------------------------
function mod.getSynAckBufs(batch)
local lTXSynAckMem = memory.createMemPool(function(buf)
local pkt = buf:getTcp4Packet()
pkt:fill{
ethSrc="90:e2:ba:98:88:e9",
ethDst="90:e2:ba:98:58:79",
ip4Src=SERVER_IP,
ip4Dst="192.168.1.201",
ip4Flags=2, -- set DF
tcpSrc=0,
tcpDst=0,
tcpSeqNumber=0,
tcpAckNumber=0,
tcpAck=1,
tcpSyn=1,
tcpWindow=29200,
}
-- add options that the server (presumeably) supports
local offset = 0
-- MSS option
if SERVER_MSS then
pkt.payload.uint8[0] = 2 -- MSS option type
pkt.payload.uint8[1] = 4 -- MSS option length (4 bytes)
pkt.payload.uint16[1] = hton16(SERVER_MSS) -- MSS option
offset = offset + 4
end
-- ts option
if SERVER_TSOPT then
pkt.payload.uint8[offset] = 8 -- ts option type
pkt.payload.uint8[offset + 1] = 10 -- ts option length (2 bytes)
pkt.payload.uint8[offset + 2] = 0 -- ts option tsval
pkt.payload.uint8[offset + 3] = 0 -- ts option tsval
pkt.payload.uint8[offset + 4] = 0 -- ts option tsval
pkt.payload.uint8[offset + 5] = 0 -- ts option tsval
pkt.payload.uint8[offset + 6] = 0 -- ts option ecr
pkt.payload.uint8[offset + 7] = 0 -- ts option ecr
pkt.payload.uint8[offset + 8] = 0 -- ts option ecr
pkt.payload.uint8[offset + 9] = 0 -- ts option ecr
offset = offset + 10
end
-- window scale option
if SERVER_WSOPT then
pkt.payload.uint8[offset] = 3 -- WSOPT option type
pkt.payload.uint8[offset + 1] = 3 -- WSOPT option length (3 bytes)
pkt.payload.uint8[offset + 2] = SERVER_WSOPT -- WSOPT option
offset = offset + 3
end
-- determine if and how much padding is needed
local pad = 4 - (offset % 4)
if pad == 4 then
pad = 0
end
if pad > 0 then
pkt.payload.uint8[offset + pad - 1] = 0 -- eop
for i = pad - 2, 0, -1 do
pkt.payload.uint8[offset + i] = 1 -- padding
end
end
-- calculate size and dataOffset values
offset = offset + pad
local size = 54 + offset -- minimum sized ip4/tcp packet with tcp options
local dataOffset = 5 + (offset / 4)
pkt.tcp:setDataOffset(dataOffset)
pkt:setLength(size)
if size < 60 then
size = 60
end
buf:setSize(size)
end)
return lTXSynAckMem:bufArray(batch)
end
function mod.getForwardBufs(batch)
local lTXForwardMem = memory.createMemPool(function(buf)
local pkt = buf:getTcp4Packet():fill{
ethSrc=proto.eth.NULL,
ethDst=proto.eth.NULL,
ip4Src=proto.ip4.NULL,
ip4Dst=proto.ip4.NULL,
tcpSrc=0,
tcpDst=0,
tcpSeqNumber=0,
tcpAckNumber=0,
tcpSyn=1,
pktLength=60,
}
end)
return lTXForwardMem:bufArray(batch)
end
function mod.getAckBufs(batch)
local rTXAckMem = memory.createMemPool(function(buf)
-- we copy RX packet anyway, so no prefilling necessary
end)
return rTXAckMem:bufArray(batch)
end
-------------------------------------------------------------------------------------------
---- Google Sparse Hash Map for TCP SYN cookies
-------------------------------------------------------------------------------------------
ffi.cdef [[
struct sparse_hash_map_cookie_key {
uint32_t ip_src;
uint32_t ip_dst;
uint16_t tcp_src;
uint16_t tcp_dst;
};
typedef struct sparse_hash_map_cookie_value {
uint32_t diff;
uint8_t flags;
struct rte_mbuf* stalled;
};
struct sparse_hash_map_cookie {};
struct sparse_hash_map_cookie * mg_sparse_hash_map_cookie_create(uint32_t size);
void mg_sparse_hash_map_cookie_insert(struct sparse_hash_map_cookie *m, struct sparse_hash_map_cookie_key *k, uint32_t ack);
struct sparse_hash_map_cookie_value * mg_sparse_hash_map_cookie_finalize(struct sparse_hash_map_cookie *m, struct sparse_hash_map_cookie_key *k, uint32_t seq);
struct sparse_hash_map_cookie_value * mg_sparse_hash_map_cookie_find_update(struct sparse_hash_map_cookie *m, struct sparse_hash_map_cookie_key *k, bool reset, bool left_fin, bool right_fin, bool ack);
]]
local sparseHashMapCookie = {}
sparseHashMapCookie.__index = sparseHashMapCookie
function mod.createSparseHashMapCookie(size)
log:info("Creating a sparse hash map for TCP SYN flood cookie strategy")
return setmetatable({
map = clib.mg_sparse_hash_map_cookie_create(size or 0)
}, sparseHashMapCookie)
end
local key = ffi.new("struct sparse_hash_map_cookie_key")
local function sparseHashMapCookieGetKey(pkt, leftToRight)
if leftToRight then
key.ip_src = pkt.ip4:getSrc()
key.ip_dst = pkt.ip4:getDst()
key.tcp_src = pkt.tcp:getSrc()
key.tcp_dst = pkt.tcp:getDst()
else
key.ip_src = pkt.ip4:getDst()
key.ip_dst = pkt.ip4:getSrc()
key.tcp_src = pkt.tcp:getDst()
key.tcp_dst = pkt.tcp:getSrc()
end
--log:debug("Key: " .. key.ip_src .. ":" .. key.tcp_src .. "->" .. key.ip_dst .. ":" .. key.tcp_dst)
return key
end
function sparseHashMapCookie:setLeftVerified(pkt)
--log:debug("set left verified")
local k = sparseHashMapCookieGetKey(pkt, true)
local ack = pkt.tcp:getAckNumber()
clib.mg_sparse_hash_map_cookie_insert(self.map, k, ack)
end
function sparseHashMapCookie:setRightVerified(pkt)
--log:debug("set right verified")
local k = sparseHashMapCookieGetKey(pkt, false)
local seq = pkt.tcp:getSeqNumber()
local diff = clib.mg_sparse_hash_map_cookie_finalize(self.map, k, seq)
if not (diff == nil) then
if band(diff.flags, 64) and not (diff.stalled == nil) then
local stalledPointer = diff.stalled
diff.stalled = nil -- unset it, we sent it after all and dont need to free manually
diff.flags = band(diff.flags, bnot(64)) -- unset the flag
return diff.diff, stalledPointer
else
return diff.diff
end
else
-- not left verified,
-- happens if a connection is deleted
-- but right still has some packets in flight
-- or packets are sent duplicated
--log:debug('Not left verified, something is wrong')
--log:debug("no result")
return false
end
end
function sparseHashMapCookie:isVerified(pkt)
local leftToRight = false
if pkt.ip4:getDst() == SERVER_IP then
leftToRight = true
end
local reset = false
local leftFin = false
local rightFin = false
local ack = false
if pkt.tcp:getRst() then
reset = true
end
if pkt.tcp:getFin() then
if leftToRight then
leftFin = true
else
rightFin = true
end
end
if pkt.tcp:getAck() then
ack = true
end
local k = sparseHashMapCookieGetKey(pkt, leftToRight)
local diff = clib.mg_sparse_hash_map_cookie_find_update(self.map, k, reset, leftFin, rightFin, ack)
if not (diff == nil) then
if band(diff.flags, 64) == 64 and diff.stalled == nil then
return "stall", diff
end
return diff.diff
else
return false
end
end
return mod
|
function onCreate()
makeLuaSprite('squibg', 'squibg', 200, 0)
setLuaSpriteScrollFactor('squibg', 0.7, 0.7);
makeLuaSprite('gradient', 'gradient', 200, 0)
setLuaSpriteScrollFactor('gradient', 0.7, 0.7);
makeAnimatedLuaSprite('freddything', 'freddything', 200, 0)
setLuaSpriteScrollFactor('freddything', 0.7, 0.7);
addAnimationByPrefix('freddything', 'freddything', 'freddything', 10, true)
objectPlayAnimation('freddything', 'freddything', true)
makeLuaSprite('table', 'table', 500, 50)
setLuaSpriteScrollFactor('table', 0.8, 0.8);
scaleObject('table', 0.8, 0.8)
makeLuaSprite('garbage', 'garbage', 200, 50)
setLuaSpriteScrollFactor('garbage', 0.9, 0.9);
scaleObject('garbage', 0.8, 0.8)
addLuaSprite('squibg', false)
addLuaSprite('freddything', false)
addLuaSprite('table', true)
addLuaSprite('garbage', true)
addLuaSprite('gradient', true)
end
function onCreatePost()
for i = 0, getProperty('opponentStrums.length')-1 do
setPropertyFromGroup('opponentStrums',i,'visible',false)
setPropertyFromGroup('opponentStrums',i,'y',130)
setPropertyFromGroup('opponentStrums',i,'x',-9999)
end
setProperty('gf.visible',false)
end
|
armor_light = {}
armor_light.modname = core.get_current_modname()
armor_light.path = core.get_modpath(armor_light.modname)
dofile(armor_light.path .. "/api.lua")
wielded_light.register_player_lightstep(function(player)
local armor_inv = minetest.get_inventory({
type = "detached",
name = player:get_player_name() .. "_armor",
})
local lighted = {}
if armor_inv then
for idx, stack in ipairs(armor_inv:get_list("armor")) do
local item_name = stack:get_name()
if item_name:trim() == "" then
item_name = nil
end
wielded_light.track_user_entity(player, "armor" .. idx, item_name)
end
end
end)
|
require("luci.sys")
local type = luci.sys.exec("uci get tastek.apn.apn_type")
if(#type == 0) then
type = 0
else
type = string.sub(type,0,#type-1)
end
local id= luci.sys.exec("uci get tastek.apn.apn_id")
if(#id == 0) then
id = 0
else
id = string.sub(id,0,#id-1)
end
name = luci.sys.exec("uci get tastek.apn.apn_name")
if(#name == 0) then
name = ''
else
name = string.sub(name,0,#name-1)
end
local account= luci.sys.exec("uci get tastek.apn.apn_account")
if(#account == 0) then
account = ''
else
account = string.sub(account,0,#account-1)
end
local password = luci.sys.exec("uci get tastek.apn.apn_password")
if(#password == 0) then
password = ''
else
password = string.sub(password,0,#password-1)
end
local auth = luci.sys.exec("uci get tastek.apn.apn_auth")
if(#auth == 0) then
auth = 0
else
auth = string.sub(auth,0,#auth-1)
end
data = string.format("at+qicsgp=%d,%d,%s,%s,%s,%d\r\n",tonumber(id),tonumber(type),tostring(name),tostring(account),tostring(password),tonumber(auth))
luci.sys.exec("stty -F /dev/ttyUSB1 raw speed 9600 -echo min 0 time 2")
wserial=io.open("/dev/ttyUSB1","w")
rserial=io.open("/dev/ttyUSB1","r")
wserial:flush()
rserial:read(1024)
wserial:write(data)
wserial:flush()
copschaine=rserial:read(1024)
io.close(wserial)
io.close(rserial)
if(string.find(tostring(copschaine), "OK") ~= nil) then
luci.sys.exec("uci set tastek.apn.apn_result=success")
else
luci.sys.exec("uci set tastek.apn.apn_result=failed")
end
print(data)
print(copschaine)
|
--
-- vs200x_vcproj_user.lua
-- Generate a Visual Studio 2002-2008 C/C++ project .user file
-- Copyright (c) 2011-2013 Jason Perkins and the Premake project
--
local vstudio = premake.vstudio
local vc200x = premake.vstudio.vc200x
local project = premake.project
--
-- Generate a Visual Studio 200x C++ user file, with support for the new platforms API.
--
function vc200x.generate_user(prj)
vc200x.xmlElement()
_p('<VisualStudioUserFile')
_p(1,'ProjectType="Visual C++"')
vc200x.version()
_p(1,'ShowAllFiles="false"')
_p(1,'>')
_p(1,'<Configurations>')
for cfg in project.eachconfig(prj) do
vc200x.userconfiguration(cfg)
vc200x.debugdir(cfg)
_p(2,'</Configuration>')
end
_p(1,'</Configurations>')
_p('</VisualStudioUserFile>')
end
--
-- Write out the <Configuration> element, describing a specific Premake
-- build configuration/platform pairing.
--
function vc200x.userconfiguration(cfg)
_p(2,'<Configuration')
_x(3,'Name="%s"', vstudio.projectConfig(cfg))
_p(3,'>')
end
--
-- Write out the debug settings for this project.
--
function vc200x.debugdir(cfg)
_p(3,'<DebugSettings')
if cfg.debugcommand then
local command = project.getrelative(cfg.project, cfg.debugcommand)
_x(4,'Command="%s"', path.translate(command))
end
if cfg.debugdir then
local debugdir = project.getrelative(cfg.project, cfg.debugdir)
_x(4,'WorkingDirectory="%s"', path.translate(debugdir))
end
if #cfg.debugargs > 0 then
_x(4,'CommandArguments="%s"', table.concat(cfg.debugargs, " "))
end
if #cfg.debugenvs > 0 then
_p(4,'Environment="%s"', table.concat(premake.esc(cfg.debugenvs), "
"))
if cfg.flags.DebugEnvsDontMerge then
_p(4,'EnvironmentMerge="false"')
end
end
_p(3,'/>')
end
|
-- Mess with Pokemon nicknames
require 'string'
require 'utils.scriptexit'
nicknames = {}
-- Gets the nickname of the leader
local maxNameLength = 10
local nameAddr = 0x022B51AA
function nicknames.getLeaderNickname()
local bytestr = memory.readbyterange(nameAddr, maxNameLength)
local name = ''
for _, byte in ipairs(bytestr) do
if byte == 0x00 then break end -- Early null terminator
name = name .. string.char(byte)
end
return name
end
-- Sets the nickname of the leader. If name is more than 10 characters,
-- characters past the 10th are ignored
function nicknames.setLeaderNickname(name)
for i=1,maxNameLength do
local byte = string.byte(name, i)
memory.writebyte(nameAddr+i-1, byte or 0x00)
end
end
-- Temporarily set the nickname of the leader while the bot is running.
function nicknames.setLeaderNicknameTemp(name)
local leaderName = nicknames.getLeaderNickname()
nicknames.setLeaderNickname(name)
scriptexit.registerexit(function() nicknames.setLeaderNickname(leaderName) end)
end
return nicknames
|
loader.Hidefor2sOnEdited()
loader.BorderlessOnEdited()
loader.SetrecommendedwindowrectangleOnEdited()
|
vip = "acb227"
plyr = game.Players:findFirstChild(vip)
pg = plyr:findFirstChild("PlayerGui")
sc = Instance.new("ScreenGui")
sc.Name = "unHide"
sc.Parent = pg
i = Instance.new("IntValue")
i.Parent = plyr
i.Value = 99
i.Name = "Attack"
t = Instance.new("TextLabel")
t.BackgroundTransparency = 0.3
t.Name = "Text - Reset"
t.Parent = sc
t.Position = UDim2.new(0, 200, 0, 145)
t.Size = UDim2.new(0, 99, 0, 20)
t.Text = i.Value.. ""
t.Visible = false
pp = plyr.Attack
tx = Instance.new("TextButton")
tx.BackgroundTransparency = 0.3
tx.Name = "Text - Reset"
tx.Parent = sc
tx.Position = UDim2.new(0, 200, 0, 125)
tx.Size = UDim2.new(0, 99, 0, 20)
tx.Text = "Attack"
tx.MouseButton1Click:connect(function()
human = plyr.Character:findFirstChild("Humanoid")
if human ~= nil then
t.Visible = true
tx.Visible = false
txb.Visible = true
end
end)
txb = Instance.new("TextButton")
txb.BackgroundTransparency = 0.3
txb.Name = "Text - Reset"
txb.Parent = sc
txb.Position = UDim2.new(0, 200, 0, 125)
txb.Size = UDim2.new(0, 99, 0, 20)
txb.Text = "Hide"
txb.Visible = false
txb.MouseButton1Click:connect(function()
human = plyr.Character:findFirstChild("Humanoid")
if human ~= nil then
t.Visible = false
tx.Visible = true
txb.Visible = false
end
end)
plyr.Chatted:connect(function(msg)
if msg == "removed" then
sc:Remove()
end
end)
while wait() do
t.Text = "Attack: " ..i.Value.. "/" ..i.Value
end
|
---------------------------------------------------------------------------------------------------
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/1002
--
-- Description: Check that SDL sends StopAudioStream() in case user exit from App while Video service and
-- Audio service are starting
--
-- Precondition:
-- 1) SDL and HMI are started.
-- 2) Navigation App is registered and activated
-- 3) Video streaming is started
-- 4) Audio streaming is started
-- In case:
-- 1) User Exit from App
-- SDL does:
-- - send Navigation.OnAudioDataStreaming(available = false) notification to HMI
-- - send Navigation.OnVideoDataStreaming(available = false) notification to HMI
-- - send Navigation.StopAudioStream request to HMI
-- - send Navigation.StopStream request to HMI
---------------------------------------------------------------------------------------------------
--[[ Required Shared libraries ]]
local runner = require('user_modules/script_runner')
local common = require("user_modules/sequences/actions")
local events = require("events")
local constants = require("protocol_handler/ford_protocol_constants")
--[[ Test Configuration ]]
runner.testSettings.isSelfIncluded = false
config.defaultProtocolVersion = 3
config.application1.registerAppInterfaceParams.appHMIType = { "NAVIGATION" }
--[[ Local Variables ]]
local audioServiceId = 10
local videoServiceId = 11
--[[ Local Functions ]]
local function appStartVideoStreaming()
common.getMobileSession():StartService(videoServiceId)
:Do(function()
common.getHMIConnection():ExpectRequest("Navigation.StartStream")
:Do(function(_, data)
common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {})
common.getMobileSession():StartStreaming(videoServiceId, "files/SampleVideo_5mb.mp4")
common.getHMIConnection():ExpectNotification("Navigation.OnVideoDataStreaming", { available = true })
end)
end)
common.getMobileSession():ExpectNotification("OnHMIStatus")
:Times(0)
end
local function appStartAudioStreaming()
common.getMobileSession():StartService(audioServiceId)
:Do(function()
common.getHMIConnection():ExpectRequest("Navigation.StartAudioStream")
:Do(function(_, data)
common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {})
common.getMobileSession():StartStreaming(audioServiceId,"files/MP3_1140kb.mp3")
common.getHMIConnection():ExpectNotification("Navigation.OnAudioDataStreaming", { available = true })
end)
end)
common.getMobileSession():ExpectNotification("OnHMIStatus")
:Times(0)
end
local function expectEndService(pServiceId)
local event = events.Event()
event.matches = function(_, data)
return data.frameType == constants.FRAME_TYPE.CONTROL_FRAME
and data.serviceType == pServiceId
and data.sessionId == common.getMobileSession().mobile_session_impl.control_services.session.sessionId.get()
and data.frameInfo == constants.FRAME_INFO.END_SERVICE
end
return common.getMobileSession():ExpectEvent(event, "EndService")
end
local function endServiceByUserExit()
common.getHMIConnection():ExpectNotification("Navigation.OnAudioDataStreaming", { available = false })
common.getHMIConnection():ExpectNotification("Navigation.OnVideoDataStreaming", { available = false })
common.getHMIConnection():ExpectRequest("Navigation.StopAudioStream", { appID = common.getHMIAppId() })
:Do(function(_, data)
common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {})
end)
common.getHMIConnection():ExpectRequest("Navigation.StopStream", { appID = common.getHMIAppId() })
:Do(function(_, data)
common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {})
end)
expectEndService(audioServiceId)
expectEndService(videoServiceId)
common.getHMIConnection():SendNotification("BasicCommunication.OnExitApplication",
{ appID = common.app.getHMIId(), reason = "USER_EXIT" })
end
--[[ Scenario ]]
runner.Title("Preconditions")
runner.Step("Clean environment", common.preconditions)
runner.Step("Start SDL, init HMI, connect Mobile", common.start)
runner.Step("Register App", common.registerApp)
runner.Step("Activate App", common.activateApp)
runner.Step("App starts Video streaming", appStartVideoStreaming)
runner.Step("App starts Audio streaming", appStartAudioStreaming)
runner.Title("Test")
runner.Step("EndService by USER_EXIT", endServiceByUserExit)
runner.Title("Postconditions")
runner.Step("Stop SDL", common.postconditions)
|
-----------------------------------------
-- ID: 4636
-- Scroll of Banish
-- Teaches the white magic Banish
-----------------------------------------
function onItemCheck(target)
return target:canLearnSpell(28)
end
function onItemUse(target)
target:addSpell(28)
end
|
------------------------------- VOID TILE -------------------------------
-- Tile --
local vtT = table.deepcopy(data.raw.tile["out-of-map"])
vtT.name = "VoidTile"
vtT.autoplace = {default_enabled = false}
data:extend{vtT}
-- Item --
local vtI = {}
vtI.type = "item"
vtI.name = "VoidTile"
vtI.icon = "__base__/graphics/terrain/out-of-map.png"
vtI.icon_size = 32
vtI.subgroup = "Tiles"
vtI.order = "b"
vtI.stack_size = 1000
vtI.place_as_tile =
{
result = "VoidTile",
condition_size = 1,
condition = { "water-tile" }
}
data:extend{vtI}
-- Recipe --
local vtR = {}
vtR.type = "recipe"
vtR.name = "VoidTile"
vtR.energy_required = 1
vtR.enabled = false
vtR.ingredients =
{
{"DimensionalOre", 4}
}
vtR.result = "VoidTile"
data:extend{vtR}
-- Technology --
local vtT = {}
vtT.name = "VoidTile"
vtT.type = "technology"
vtT.icon = "__base__/graphics/terrain/out-of-map.png"
vtT.icon_size = 32
vtT.unit = {
count=500,
time=2,
ingredients={
{"DimensionalSample", 1}
}
}
vtT.prerequisites = {"LabTile"}
vtT.effects = {{type="unlock-recipe", recipe="VoidTile"}}
data:extend{vtT}
|
local PAC = PersonalAssistant.Constants
local PAStrings = {
-- =================================================================================================================
-- Language specific texts that need to be translated --
-- =================================================================================================================
-- == MENU/PANEL TEXTS == --
-- -----------------------------------------------------------------------------------------------------------------
-- Profile Settings --
SI_PA_MENU_PROFILE_PLEASE_SELECT = "<Sélectionner un profil>",
SI_PA_MENU_PROFILE_ACTIVE = "Profil actif",
SI_PA_MENU_PROFILE_ACTIVE_T = "Selectionner le profil actif pour PersonalAssistant. Il chargera automatiquement tous les paramètres stockés sous ce profil, et enregistrera les changements au même endroit.",
SI_PA_MENU_PROFILE_ACTIVE_RENAME = "Renommer le profil actif",
-- Create Profiles --
SI_PA_MENU_PROFILE_CREATE_NEW = "Créer un nouveau profil",
SI_PA_MENU_PROFILE_CREATE_NEW_DESC = table.concat({"Note : Vous pouvez avoir un maximum de ", PAC.GENERAL.MAX_PROFILES, " profils."}),
-- Copy Profiles --
SI_PA_MENU_PROFILE_COPY_FROM_DESC = "Copier les paramètres depuis un profil existant vers le profil courant.",
SI_PA_MENU_PROFILE_COPY_FROM = "Copier depuis profil",
SI_PA_MENU_PROFILE_COPY_FROM_CONFIRM = "Confirmer la copie",
SI_PA_MENU_PROFILE_COPY_FROM_CONFIRM_W = "Cela remplacera les paramètres du profil actif par ceux du profil sélectionné. Êtes-vous sûr de vouloir continuer ? \n\nNote : Seulement les paramètres des modules actifs de PersonalAssitant seront copiés.",
-- Delete Profiles --
SI_PA_MENU_PROFILE_DELETE_DESC = "Supprimer les profils existants et inutilisés de la base de données pour sauver de l'espace, et nettoyer le fichier SavedVariables.",
SI_PA_MENU_PROFILE_DELETE = "Supprimer un profil",
SI_PA_MENU_PROFILE_DELETE_CONFIRM = "Confirmer la suppression",
SI_PA_MENU_PROFILE_DELETE_CONFIRM_W = "Cela supprimera le profil sélectionné pour tous les personnages. Êtes-vous sûr de vouloir continuer ?",
-- -----------------------------------------------------------------------------------------------------------------
-- Rules Menu --
SI_PA_MENU_RULES_HOW_TO_ADD_PAB = "Pour créer une nouvelle règle de dépôt ou retrait d'objets, il suffit de cliquer droit sur un objet dans votre inventaire ou en banque, et de sélectionner dans le menu contextuel :\n> PA Banking > Ajouter une nouvelle règle",
SI_PA_MENU_RULES_HOW_TO_ADD_PAJ = "Pour créer une nouvelle règle de mise aux rebuts permanente, il suffit de cliquer droit sur un objet dans votre inventaire ou en banque, et de sélectionner dans le menu contextuel :\n> PA Junk > Marquer en tant que rebut permanent",
SI_PA_MENU_RULES_HOW_TO_FIND_MENU = table.concat({"Toutes les règles actives peuvent être retrouvées en cliquant sur l'icône qui se trouve dans le menu principal, en tapant ", PAC.COLOR.YELLOW:Colorize("/parules"), " ou en cliquant sur ce bouton :"}),
SI_PA_MENU_RULES_HOW_TO_CREATE = "Comment créer de nouvelles règles?",
SI_PA_MENU_DANGEROUS_SETTING = "ATTENTION : Paramètres dangereux ! Utilisez à vos risques et périls !",
-- -----------------------------------------------------------------------------------------------------------------
-- Generic Menu --
SI_PA_MENU_OTHER_SETTINGS_HEADER = "Autres paramètres",
SI_PA_MENU_SILENT_MODE = "Mode silencieux (Ne RIEN afficher dans le chat)",
SI_PA_MENU_NOT_YET_IMPLEMENTED = table.concat({PAC.COLORS.RED, "Pas encore implémenté !"}),
-- =================================================================================================================
-- == CHAT OUTPUTS == --
-- -----------------------------------------------------------------------------------------------------------------
-- PAGeneral --
SI_PA_CHAT_GENERAL_NEW_PROFILE_CREATED = table.concat({" nouveau profil ", PAC.COLOR.WHITE:Colorize("%s"), " créé et activé !"}),
SI_PA_CHAT_GENERAL_SELECTED_PROFILE_COPIED = table.concat({" Le profil ", PAC.COLOR.WHITE:Colorize("%s"), " sélectionné a été ", PAC.COLOR.ORANGE_RED:Colorize("copié"), " vers le profil ", PAC.COLOR.WHITE:Colorize("%s")}),
SI_PA_CHAT_GENERAL_SELECTED_PROFILE_DELETED = table.concat({" Le profil ", PAC.COLOR.WHITE:Colorize("%s"), " sélectionné a été ", PAC.COLOR.ORANGE_RED:Colorize("supprimé !")}),
--SI_PA_CHAT_GENERAL_TELEPORT_NO_PRIMARY_HOUSE = table.concat({}),
--SI_PA_CHAT_GENERAL_TELEPORT_ZONE_PREVENTED = table.concat({}),
-- =================================================================================================================
-- == OTHER STRINGS FOR MENU == --
-- -----------------------------------------------------------------------------------------------------------------
-- PAGeneral --
SI_PA_PROFILE = "Profil",
-- -----------------------------------------------------------------------------------------------------------------
-- Name Spaces --
SI_PA_NS_BAG_EQUIPMENT = "Équipement", -- not required so far
SI_PA_NS_BAG_BACKPACK = "Inventaire",
SI_PA_NS_BAG_BANK = "Banque",
-- SI_PA_NS_BAG_SUBSCRIBER_BANK = "",
SI_PA_NS_BAG_VIRTUAL = "Sac d'artisanat",
SI_PA_NS_BAG_HOUSE_BANK = "Banque attitrée",
SI_PA_NS_BAG_HOUSE_BANK_NR = "Banque attitrée (%d)",
SI_PA_NS_BAG_UNKNOWN = "Inconnu",
-- -----------------------------------------------------------------------------------------------------------------
-- ItemTypes (Custom Singluar/Plural definition) --
SI_PA_ITEMTYPE4 = "<<1[Nourriture/Nourriture]>>",
SI_PA_ITEMTYPE5 = "<<1[Trophées/Trophées]>>",
SI_PA_ITEMTYPE7 = "<<1[Potion/Potions]>>",
SI_PA_ITEMTYPE8 = "<<1[Motif/Motifs]>>",
SI_PA_ITEMTYPE10 = "<<1[Ingrédient/Ingrédients]>>",
SI_PA_ITEMTYPE12 = "<<1[Boisson/Boissons]>>",
SI_PA_ITEMTYPE16 = "<<1[Appât/Appâts]>>",
SI_PA_ITEMTYPE19 = "<<1[Pierre d'Âme/Pierres d'Âme]>>",
SI_PA_ITEMTYPE22 = "<<1[Crochetage/Crochetages]>>",
SI_PA_ITEMTYPE29 = "<<1[Recette/Recettes]>>",
SI_PA_ITEMTYPE30 = "<<1[Poison/Poisons]>>",
SI_PA_ITEMTYPE33 = "<<1[Solvant/Solvants]>>",
SI_PA_ITEMTYPE34 = "<<1[Objet de collection/Objets de collection]>>",
--SI_PA_ITEMTYPE47 = "<<1[]>>",
SI_PA_ITEMTYPE56 = "<<1[Trésor/Trésors]>>",
SI_PA_ITEMTYPE60 = "<<1[Commande de maître/Commandes de maître]>>",
-- -----------------------------------------------------------------------------------------------------------------
-- SpecializedItemTypes (Custom Singluar/Plural definition) --
--SI_PA_SPECIALIZEDITEMTYPE102 = "<<1[/]>>",
-- -----------------------------------------------------------------------------------------------------------------
-- Master Writs based on CraftingType (Custom definition) --
SI_PA_MASTERWRIT_CRAFTINGTYPE0 = table.concat({"Autres commandes (", GetString("SI_ENCHANTMENTSEARCHCATEGORYTYPE", ENCHANTMENT_SEARCH_CATEGORY_OTHER), ")"}),
SI_PA_MASTERWRIT_CRAFTINGTYPE1 = "Commande de forge scellée",
SI_PA_MASTERWRIT_CRAFTINGTYPE2 = "Commande scellée de couture",
SI_PA_MASTERWRIT_CRAFTINGTYPE3 = "Commande d'enchantement scellée",
SI_PA_MASTERWRIT_CRAFTINGTYPE4 = "Commande scellée d'alchimie",
SI_PA_MASTERWRIT_CRAFTINGTYPE5 = "Commande scellée de cuisine",
SI_PA_MASTERWRIT_CRAFTINGTYPE6 = "Commande de travail du bois scellée",
SI_PA_MASTERWRIT_CRAFTINGTYPE7 = "Commande scellée de joaillier",
-- -----------------------------------------------------------------------------------------------------------------
-- PABanking --
SI_PA_BANKING_MOVE_MODE_DONOTHING = "Ne rien faire",
SI_PA_BANKING_MOVE_MODE_TOBANK = "Déposer en banque",
SI_PA_BANKING_MOVE_MODE_TOBACKPACK = "Prendre dans le sac",
SI_PA_MENU_BANKING_ADVANCED_GLYPHS = "Glyphes",
SI_PA_MENU_BANKING_ADVANCED_INTRICATE_ITEMS = "Objets complexes",
SI_PA_MENU_BANKING_REPAIRKIT = "Nécessaires de réparation",
-- -----------------------------------------------------------------------------------------------------------------
-- Operators --
SI_PA_REL_OPERATOR_T = "Sélectionner l'opérateur mathématique pour cet objet",
SI_PA_REL_BACKPACK_EQUAL = "INVENTAIRE ==",
SI_PA_REL_BACKPACK_LESSTHAN = "INVENTAIRE <", -- not used so far
SI_PA_REL_BACKPACK_LESSTHANEQUAL = "INVENTAIRE <=",
SI_PA_REL_BACKPACK_GREATERTHAN = "INVENTAIRE >", -- not used so far
SI_PA_REL_BACKPACK_GREATERTHANEQUAL = "INVENTAIRE >=",
SI_PA_REL_BANK_EQUAL = "BANQUE ==",
SI_PA_REL_BANK_LESSTHAN = "BANQUE <", -- not used so far
SI_PA_REL_BANK_LESSTHANOREQUAL = "BANQUE <=",
SI_PA_REL_BANK_GREATERTHAN = "BANQUE >", -- not used so far
SI_PA_REL_BANK_GREATERTHANOREQUAL = "BANQUE >=",
-- -----------------------------------------------------------------------------------------------------------------
-- Operator Tooltip --
SI_PA_REL_BACKPACK_EQUAL_T = "INVENTAIRE égal (=)",
SI_PA_REL_BACKPACK_LESSTHAN_T = "INVENTAIRE inférieur à (<)", -- not used so far
SI_PA_REL_BACKPACK_LESSTHANOREQUAL_T = "INVENTAIRE inférieur ou égal à (<=)",
SI_PA_REL_BACKPACK_GREATERTHAN_T = "INVENTAIRE supérieur à (>)", -- not used so far
SI_PA_REL_BACKPACK_GREATERTHANOREQUAL_T = "INVENTAIRE supérieur ou égal à (>=)",
SI_PA_REL_BANK_EQUAL_T = "BANQUE égal (=)",
SI_PA_REL_BANK_LESSTHAN_T = "BANQUE inférieur à (<)", -- not used so far
SI_PA_REL_BANK_LESSTHANOREQUAL_T = "BANQUE inférieur ou égal à (<=)",
SI_PA_REL_BANK_GREATERTHAN_T = "BANQUE supérieur à (>)", -- not used so far
SI_PA_REL_BANK_GREATERTHANOREQUAL_T = "BANQUE supérieur ou égal à (>=)",
-- -----------------------------------------------------------------------------------------------------------------
-- Text Operators --
SI_PA_REL_TEXT_OPERATOR0 = "-",
SI_PA_REL_TEXT_OPERATOR1 = "a exactement",
SI_PA_REL_TEXT_OPERATOR2 = "a moins que", -- not used so far
SI_PA_REL_TEXT_OPERATOR3 = "a au plus",
SI_PA_REL_TEXT_OPERATOR4 = "a plus que", -- not used so far
SI_PA_REL_TEXT_OPERATOR5 = "a au moins",
-- -----------------------------------------------------------------------------------------------------------------
-- Stacking types --
SI_PA_ST_MOVE_FULL = "Tout déplacer",
SI_PA_ST_MOVE_INCOMPLETE_STACKS_ONLY = "N'ajouter qu'aux piles existantes",
-- -----------------------------------------------------------------------------------------------------------------
-- Icon Positions --
SI_PA_POSITION_AUTO = "Automatique",
SI_PA_POSITION_MANUAL = "Manuel",
-- -----------------------------------------------------------------------------------------------------------------
-- PAJunk --
SI_PA_ITEM_ACTION_NOTHING = "Ne rien faire",
SI_PA_ITEM_ACTION_LAUNDER = "Blanchir",
SI_PA_ITEM_ACTION_MARK_AS_JUNK = "Mettre aux rebuts",
SI_PA_ITEM_ACTION_JUNK_DESTROY_WORTHLESS = "Rebuts ou Détruire si sans valeur",
SI_PA_ITEM_ACTION_DESTROY_ALWAYS = "Toujours détruire",
-- =================================================================================================================
-- == CUSTOM SUB MENU == --
-- -----------------------------------------------------------------------------------------------------------------
SI_PA_SUBMENU_PAB_ADD_RULE = "Ajouter une nouvelle règle",
SI_PA_SUBMENU_PAB_EDIT_RULE = "Éditer une règle",
SI_PA_SUBMENU_PAB_DELETE_RULE = "Supprimer une règle",
SI_PA_SUBMENU_PAB_ENABLE_RULE = "Activer la règle",
SI_PA_SUBMENU_PAB_DISABLE_RULE = "Désactiver la règle",
SI_PA_SUBMENU_PAB_ADD_RULE_BUTTON = "Ajouter",
SI_PA_SUBMENU_PAB_UPDATE_RULE_BUTTON = "Sauvegarder",
SI_PA_SUBMENU_PAB_DELETE_RULE_BUTTON = "Supprimer",
SI_PA_SUBMENU_PAB_NO_RULES = "Aucune règle de mise en banque définie",
SI_PA_SUBMENU_PAB_DISCLAIMER = "Note: Ces règles de mise en banque seront exécutées après toutes les autres règles de mise en banque automatiques (Artisanat, Spécial, Objets AvA).",
SI_PA_SUBMENU_PAJ_MARK_PERM_JUNK = "Marquer en tant que rebut permanent",
SI_PA_SUBMENU_PAJ_UNMARK_PERM_JUNK = "Ne plus marquer en tant que rebut permanent",
SI_PA_SUBMENU_PAJ_NO_RULES = "Aucune règle de mise aux rebuts définie",
-- =================================================================================================================
-- == KEY BINDINGS == --
-- -----------------------------------------------------------------------------------------------------------------
SI_KEYBINDINGS_CATEGORY_PA_PROFILES = "|cFFD700P|rersonal|cFFD700A|rssistant Profils",
SI_KEYBINDINGS_CATEGORY_PA_MENU = "Menu de |cFFD700P|rersonal|cFFD700A|rssistant",
SI_BINDING_NAME_PA_RULES_MAIN_MENU = "Règles de PersonalAssistant",
SI_BINDING_NAME_PA_RULES_TOGGLE_WINDOW = "Afficher/Cacher le menu des règles de mise en banque et aux rebuts",
--SI_BINDING_NAME_PA_TRAVEL_TO_HOUSE = "",
-- =================================================================================================================
-- Overriding the ItemFilterTypes because they are wrong in French --
-- -----------------------------------------------------------------------------------------------------------------
SI_PA_MENU_BANKING_CRAFTING_CLOTHING = "Coûture",
SI_PA_MENU_BANKING_CRAFTING_ENCHANTING = "Enchantement",
SI_PA_MENU_BANKING_CRAFTING_FURNISHING = "Ameublement",
}
for key, value in pairs(PAStrings) do
SafeAddString(_G[key], value, 1)
end
|
--=========== Copyright © 2018, Planimeter, All rights reserved. ===========--
--
-- Purpose: Speech Balloons HUD
--
--==========================================================================--
class "gui.hudspeechballoons" ( "gui.panel" )
local hudspeechballoons = gui.hudspeechballoons
function hudspeechballoons:hudspeechballoons( parent )
gui.panel.panel( self, parent, "HUD Speech Balloons" )
self:setScheme( "Default" )
self:addChatHook()
self:invalidateLayout()
end
local function addSpeechBalloon( self )
return function( player, message )
if ( self.speechBalloons == nil ) then
self.speechBalloons = {}
end
local readingtime = math.max( string.readingtime( message ), 5 )
self.speechBalloons[ player ] = {
player = player,
message = message,
expire = love.timer.getTime() + readingtime
}
end
end
function hudspeechballoons:addChatHook()
local event = "onPlayerChat"
local name = "addSpeechBalloon"
hook.set( "client", addSpeechBalloon( self ), event, name )
end
function hudspeechballoons:removeChatHook()
local event = "onPlayerChat"
local name = "addSpeechBalloon"
hook.remove( "client", event, name )
end
function hudspeechballoons:draw()
self:drawBalloons()
gui.panel.draw( self )
end
function hudspeechballoons:drawBalloons()
if ( self.speechBalloons == nil ) then
return
end
local font = self:getScheme( "fontBold" )
love.graphics.setFont( font )
love.graphics.setColor( self:getScheme( "hudspeechballoons.textColor" ) )
for player, balloon in pairs( self.speechBalloons ) do
local x, y = player:getDrawPosition()
x, y = camera.worldToScreen( x, y )
local sprite = player:getSprite()
local scale = camera.getZoom()
local width = font:getWidth( balloon.message )
local height = font:getHeight()
x = x + sprite:getWidth() * scale / 2
x = x - width / 2
x = math.round( x )
y = y - font:getHeight()
y = y - love.window.toPixels( 9 )
y = math.round( y )
love.graphics.print( balloon.message, x, y )
end
end
function hudspeechballoons:invalidateLayout()
self:setWidth( love.graphics.getWidth() )
self:setHeight( love.graphics.getHeight() )
gui.panel.invalidateLayout( self )
end
function hudspeechballoons:onRemove()
self:removeChatHook()
gui.panel.onRemove( self )
end
function hudspeechballoons:update( dt )
if ( not self:isVisible() ) then
return
end
self:updateBalloons()
self:invalidate()
end
function hudspeechballoons:updateBalloons()
if ( self.speechBalloons == nil ) then
return
end
for player, balloon in pairs( self.speechBalloons ) do
if ( balloon.expire <= love.timer.getTime() ) then
self.speechBalloons[ player ] = nil
end
end
end
|
return {
postgres = {
up = [[
CREATE TABLE IF NOT EXISTS workspaces (
id UUID PRIMARY KEY,
name TEXT UNIQUE,
comment TEXT,
created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT timezone('utc'::text, ('now'::text)::timestamp(0) with time zone),
meta JSON DEFAULT '{}'::json,
config JSON DEFAULT '{"portal":false}'::json
);
]]
},
cassandra = {
up = [[
CREATE TABLE IF NOT EXISTS workspaces(
id uuid PRIMARY KEY,
name text,
comment text,
created_at timestamp,
meta text,
config text
);
]],
}
}
|
--- Implementation of module-level functions and functions of instances of the
--- graphql library and a compiled query.
local accessor_space = require('graphql.accessor_space')
local accessor_shard = require('graphql.accessor_shard')
local accessor_general = require('graphql.accessor_general')
local parse = require('graphql.core.parse')
local validate = require('graphql.core.validate')
local query_util = require('graphql.core.query_util')
local execute = require('graphql.core.execute')
local bfs_executor = require('graphql.bfs_executor')
local query_to_avro = require('graphql.query_to_avro')
local simple_config = require('graphql.simple_config')
local config_complement = require('graphql.config_complement')
local server = require('graphql.server.server')
local convert_schema = require('graphql.convert_schema')
local extend_ast = require('graphql.extend_ast')
local utils = require('graphql.utils')
local check = utils.check
local impl = {}
-- constants
local DEF_MAX_BATCH_SIZE = 1000
-- Instance of the library to provide graphql:compile() and graphql:execute()
-- method (with creating zero configuration graphql instance under hood when
-- calling compile() for the first time).
local default_instance
--- Execute an operation from compiled query.
---
--- @tparam table qstate compiled query
---
--- @tparam[opt] table variables variables to pass to the query
---
--- @tparam[opt] string operation_name optional operation name
---
--- @tparam[opt] table opts the following options:
---
--- * `user_context` (of any type) is a user-provided query context
---
--- This context passed to accessor functions. If a user provides its own
--- accessor functions, (s)he will be able to access this context for read and
--- write during a query / mutation.
---
--- @treturn table result of the operation
local function gql_execute(qstate, variables, operation_name, opts)
assert(qstate.state)
assert(qstate.query_settings)
local state = qstate.state
assert(state.schema)
local max_batch_size = qstate.query_settings.max_batch_size or
state.max_batch_size
local variables = variables or {}
local opts = opts or {}
check(variables, 'variables', 'table')
check(operation_name, 'operation_name', 'string', 'nil')
check(max_batch_size, 'max_batch_size', 'number')
check(opts, 'opts', 'table', 'nil')
-- A user_context can have any type.
local user_context = opts.user_context
local qcontext = {
query_settings = qstate.query_settings,
variables = variables,
user_context = user_context,
}
local traceback
local ok, data, executor_metainfo = xpcall(function()
assert(qstate.ast)
local operation = query_util.getOperation(qstate.ast, operation_name)
local operation_type = operation.operation
check(operation_type, 'operation_type', 'string')
assert(operation_type == 'query' or operation_type == 'mutation',
'only "query" and "mutation" operation types are supported')
local accessor = state.accessor
local cfg_use_bfs_executor = qstate.query_settings.use_bfs_executor or
state.use_bfs_executor
local use_bfs_executor = operation_type == 'query'
if use_bfs_executor then
if cfg_use_bfs_executor == 'never' then
use_bfs_executor = false
elseif cfg_use_bfs_executor == 'shard' then
use_bfs_executor = accessor.name == 'shard'
elseif cfg_use_bfs_executor == 'always' then
use_bfs_executor = true
else
error('Unknown use_bfs_executor: ' ..
tostring(state.use_bfs_executor))
end
end
if use_bfs_executor then
local result = bfs_executor.execute(state.schema, qstate.ast,
variables, operation_name, {
qcontext = qcontext,
accessor = accessor,
max_batch_size = max_batch_size,
})
local executor_metainfo = {
name = 'bfs',
}
return result, executor_metainfo
else
local root_value = {}
local result = execute(state.schema, qstate.ast, root_value,
variables, operation_name, {qcontext = qcontext})
local executor_metainfo = {
name = 'dfs',
}
return result, executor_metainfo
end
end, function(err)
-- XXX: store cache into query-local storage to ensure in will be
-- cleaned anyway; it is matter if some data will be changed between
-- GraphQL queries
state.accessor:cache_truncate(qcontext)
traceback = debug.traceback()
return err
end)
if not ok then
local err = utils.serialize_error(data, traceback)
return {errors = {err}}
end
return {
data = data,
meta = {
statistics = qcontext.statistics,
executor = executor_metainfo,
}
}
end
--- Compile a query and execute an operation.
---
--- See @{gql_compile} and @{gql_execute} for parameters description.
---
--- @treturn table result of the operation
local function compile_and_execute(state, query, variables, operation_name,
compile_opts, execute_opts)
assert(type(state) == 'table', 'use :compile_and_execute(...) ' ..
'instead of .compile_and_execute(...)')
assert(state.schema ~= nil, 'have not compiled schema')
check(query, 'query', 'string')
check(variables, 'variables', 'table', 'nil')
check(operation_name, 'operation_name', 'string', 'nil')
check(compile_opts, 'compile_opts', 'table', 'nil')
check(execute_opts, 'execute_opts', 'table', 'nil')
local compiled_query = state:compile(query, compile_opts)
return compiled_query:execute(variables, operation_name, execute_opts)
end
local function validate_query_settings(query_settings, opts)
local opts = opts or {}
local allow_nil = opts.allow_nil or false
local use_bfs_executor = query_settings.use_bfs_executor
local max_batch_size = query_settings.max_batch_size
if not allow_nil or type(use_bfs_executor) ~= 'nil' then
check(use_bfs_executor, 'use_bfs_executor', 'string')
assert(use_bfs_executor == 'never' or
use_bfs_executor == 'shard' or
use_bfs_executor == 'always',
"use_bfs_executor must be 'never', 'shard' (default) or " ..
"'always', 'got " .. tostring(use_bfs_executor))
end
if not allow_nil or type(max_batch_size) ~= 'nil' then
check(max_batch_size, 'max_batch_size', 'number')
end
end
--- Parse GraphQL query string, validate against the GraphQL schema and
--- provide an object with the function to execute an operation from the
--- request with specific variables values.
---
--- @tparam table state the library instance
---
--- @tparam string query text of a GraphQL query
---
--- @tparam[opt] table opts the following options (described in
--- @{accessor_general.new} and @{impl.new}):
---
--- * resulting_object_cnt_max
--- * fetched_object_cnt_max
--- * timeout_ms
--- * use_bfs_executor
--- * max_batch_size
---
--- @treturn table compiled query with `execute` and `avro_schema` functions
local function gql_compile(state, query, opts)
assert(type(state) == 'table' and type(query) == 'string',
'use :gql_compile(...) instead of .gql_compile(...)')
assert(state.schema ~= nil, 'have not compiled schema')
check(query, 'query', 'string')
check(opts, 'opts', 'table', 'nil')
local opts = opts or {}
local ast = parse(query)
validate(state.schema, ast, extend_ast.visitors())
local qstate = {
state = state,
ast = ast,
query_settings = {
resulting_object_cnt_max = opts.resulting_object_cnt_max,
fetched_object_cnt_max = opts.fetched_object_cnt_max,
timeout_ms = opts.timeout_ms,
use_bfs_executor = opts.use_bfs_executor,
max_batch_size = opts.max_batch_size,
}
}
accessor_general.validate_query_settings(qstate.query_settings,
{allow_nil = true})
validate_query_settings(qstate.query_settings, {allow_nil = true})
local gql_query = setmetatable(qstate, {
__index = {
execute = gql_execute,
avro_schema = query_to_avro.convert
}
})
return gql_query
end
local function start_server(gql, host, port, compile_opts)
assert(type(gql) == 'table',
'use :start_server(...) instead of .start_server(...)')
check(host, 'host', 'nil', 'string')
check(port, 'port', 'nil', 'number')
gql.server = server.init(gql, host, port, compile_opts)
gql.server:start()
return ('The GraphQL server started at http://%s:%s'):format(
gql.server.host, gql.server.port
)
end
local function stop_server(gql)
assert(type(gql) == 'table',
'use :stop_server(...) instead of .stop_server(...)')
assert(gql.server, 'no running server to stop')
gql.server:stop()
return ('The GraphQL server stopped at http://%s:%s'):format(
gql.server.host, gql.server.port)
end
--- The function creates an accessor of desired type with default configuration.
---
--- @tparam table cfg schemas, collections, service_fields, indexes and so on
---
--- @treturn table `accessor` created accessor instance
local function create_default_accessor(cfg)
check(cfg.accessor, 'cfg.accessor', 'string')
assert(cfg.accessor == 'space' or cfg.accessor == 'shard',
'accessor_type must be shard or space, got ' .. cfg.accessor)
check(cfg.service_fields, 'cfg.service_fields', 'table')
check(cfg.indexes, 'cfg.indexes', 'table')
check(cfg.collection_use_tomap, 'cfg.collection_use_tomap', 'table', 'nil')
check(cfg.accessor_funcs, 'cfg.accessor_funcs', 'table', 'nil')
local accessor_cfg = {
schemas = cfg.schemas,
collections = cfg.collections,
service_fields = cfg.service_fields,
indexes = cfg.indexes,
collection_use_tomap = cfg.collection_use_tomap,
resulting_object_cnt_max = cfg.resulting_object_cnt_max,
fetched_object_cnt_max = cfg.fetched_object_cnt_max,
timeout_ms = cfg.timeout_ms,
}
if cfg.accessor == 'space' then
return accessor_space.new(accessor_cfg, cfg.accessor_funcs)
end
if cfg.accessor == 'shard' then
return accessor_shard.new(accessor_cfg, cfg.accessor_funcs)
end
end
function impl.compile(query, opts)
if default_instance == nil then
default_instance = impl.new()
end
return default_instance:compile(query, opts)
end
function impl.execute(query, variables, operation_name, compile_opts,
execute_opts)
if default_instance == nil then
default_instance = impl.new()
end
return default_instance:execute(query, variables, operation_name,
compile_opts, execute_opts)
end
function impl.start_server(host, port, compile_opts)
if default_instance == nil then
default_instance = impl.new()
end
return default_instance:start_server(host, port, compile_opts)
end
function impl.stop_server()
if default_instance ~= nil and default_instance.server ~= nil then
return default_instance:stop_server()
end
return 'there is no active server in default Tarantool graphql instance'
end
--- Create the library instance.
---
--- Usage:
---
--- ... = graphql.new({
--- schemas = {
--- schema_name_foo = { // the value is avro-schema (esp., a record)
--- name = 'schema_name_foo,
--- type = 'record',
--- fields = {
--- ...
--- }
--- },
--- ...
--- },
--- collections = {
--- collections_name_foo = {
--- schema_name = 'schema_name_foo',
--- connections = { // the optional field
--- {
--- type = '1:1' or '1:N',
--- name = 'connection_name_bar',
--- destination_collection = 'collection_baz',
--- parts = {
--- {
--- source_field = 'field_name_source_1',
--- destination_field = 'field_name_destination_1'
--- },
--- ...
--- },
--- index_name = 'index_name' -- is is for an accessor,
--- -- ignored in the graphql
--- -- part
--- },
--- ...
--- },
--- },
--- ...
--- },
--- indexes = <table>,
--- service_fields = <table>,
--- accessor = <table> or <string>,
--- accessor_funcs = <table>,
--- connections = <table>, -- for auto configuration from space formats
--- collection_use_tomap = <boolean>,
--- resulting_object_cnt_max = <number>,
--- fetched_object_cnt_max = <number>,
--- timeout_ms = <number>,
--- disable_dangling_check = <boolean>,
--- use_bfs_executor = 'never' | 'shard' (default) | 'always',
--- max_batch_size = <number>,
--- })
function impl.new(cfg)
local cfg = cfg or {}
cfg = table.deepcopy(cfg) -- prevent change of user's data
-- auto config case
local perform_auto_configuration =
cfg['schemas'] == nil and
cfg['indexes'] == nil and
cfg['service_fields'] == nil and
cfg['accessor'] == nil and
cfg['accessor_funcs'] == nil
if perform_auto_configuration then
local generated_cfg = simple_config.graphql_cfg_from_tarantool()
generated_cfg.accessor = 'space'
generated_cfg.connections = cfg.connections or {}
cfg = utils.merge_tables(cfg, generated_cfg)
cfg = config_complement.complement_cfg(cfg)
end
check(cfg.accessor, 'cfg.accessor', 'string', 'table')
if type(cfg.accessor) == 'string' then
cfg.accessor = create_default_accessor(cfg)
end
-- to use `cfg` as db_schema
if cfg.service_fields == nil then
cfg.service_fields = cfg.accessor.service_fields
end
-- to use `cfg` as db_schema
if cfg.indexes == nil then
cfg.indexes = cfg.accessor.indexes
end
check(cfg.disable_dangling_check, 'disable_dangling_check', 'boolean',
'nil')
local state = {
disable_dangling_check = cfg.disable_dangling_check,
use_bfs_executor = cfg.use_bfs_executor or 'shard',
max_batch_size = cfg.max_batch_size or DEF_MAX_BATCH_SIZE,
}
validate_query_settings(state)
convert_schema.convert(state, cfg)
return setmetatable(state, {
__index = {
compile = gql_compile,
execute = compile_and_execute,
start_server = start_server,
stop_server = stop_server,
internal = { -- for unit testing
cfg = cfg,
}
}
})
end
return impl
|
local A, GreyHandling = ...
function GreyHandling.db.reset()
GreyHandling.data = {}
GreyHandling.data.items = {}
end
GreyHandling.db.reset()
|
require("lualib_bundle");
__TS__SourceMapTraceBack(debug.getinfo(1).short_src, {["4"] = 1,["5"] = 2,["6"] = 2});
local ____exports = {}
____exports.YieldType = {}
____exports.YieldType.Update = 0
____exports.YieldType[____exports.YieldType.Update] = "Update"
return ____exports
|
--- A builtin build system: back-end to provide a portable way of building C-based Lua modules.
module("luarocks.build.builtin", package.seeall)
local fs = require("luarocks.fs")
local path = require("luarocks.path")
local util = require("luarocks.util")
local cfg = require("luarocks.cfg")
local dir = require("luarocks.dir")
--- Run a command displaying its execution on standard output.
-- @return boolean: true if command succeeds (status code 0), false
-- otherwise.
local function execute(...)
io.stdout:write(table.concat({...}, " ").."\n")
return fs.execute(...)
end
--- Makes an RC file with an embedded Lua script, for building .exes on Windows
-- @return nil if could open files, error otherwise
local function make_rc(luafilename, rcfilename)
local rcfile = io.open(rcfilename, "w")
if not rcfile then
error("Could not open "..rcfilename.." for writing.")
end
rcfile:write("STRINGTABLE\r\nBEGIN\r\n")
local i = 1
for line in io.lines(luafilename) do
if not line:match("^#!") then
rcfile:write(i .. " \"")
line = line:gsub("\\", "\\\\"):gsub('"', '""'):gsub("[\r\n]+", "")
rcfile:write(line .. "\\r\\n\"\r\n")
i = i + 1
end
end
rcfile:write("END\r\n")
rcfile:close()
end
--- Driver function for the builtin build back-end.
-- @param rockspec table: the loaded rockspec.
-- @return boolean or (nil, string): true if no errors ocurred,
-- nil and an error message otherwise.
function run(rockspec)
assert(type(rockspec) == "table")
local compile_object, compile_library, compile_wrapper_binary
local build = rockspec.build
local variables = rockspec.variables
local function add_flags(extras, flag, flags)
if flags then
if type(flags) ~= "table" then
flags = { tostring(flags) }
end
util.variable_substitutions(flags, variables)
for _, v in ipairs(flags) do
table.insert(extras, flag:format(v))
end
end
end
if cfg.is_platform("mingw32") then
compile_object = function(object, source, defines, incdirs)
local extras = {}
add_flags(extras, "-D%s", defines)
add_flags(extras, "-I%s", incdirs)
return execute(variables.CC.." "..variables.CFLAGS, "-c", "-o", object, "-I"..variables.LUA_INCDIR, source, unpack(extras))
end
compile_library = function(library, objects, libraries, libdirs, name)
local extras = { unpack(objects) }
add_flags(extras, "-L%s", libdirs)
add_flags(extras, "-l%s", libraries)
extras[#extras+1] = dir.path(variables.LUA_LIBDIR, variables.LUALIB)
extras[#extras+1] = "-l" .. (variables.MSVCRT or "m")
local ok = execute(variables.LD.." "..variables.LIBFLAG, "-o", library, unpack(extras))
return ok
end
compile_wrapper_binary = function(fullname, name)
local fullbasename = fullname:gsub("%.lua$", ""):gsub("/", "\\")
local basename = name:gsub("%.lua$", ""):gsub("/", "\\")
local rcname = basename..".rc"
local resname = basename..".o"
local wrapname = basename..".exe"
make_rc(fullname, fullbasename..".rc")
local ok = execute(variables.RC, "-o", resname, rcname)
if not ok then return ok end
ok = execute(variables.CC.." "..variables.CFLAGS, "-I"..variables.LUA_INCDIR,
"-o", wrapname, resname, variables.WRAPPER,
dir.path(variables.LUA_LIBDIR, variables.LUALIB),
"-l" .. (variables.MSVCRT or "m"), "-luser32")
return ok, wrapname
end
elseif cfg.is_platform("win32") then
compile_object = function(object, source, defines, incdirs)
local extras = {}
add_flags(extras, "-D%s", defines)
add_flags(extras, "-I%s", incdirs)
return execute(variables.CC.." "..variables.CFLAGS, "-c", "-Fo"..object, "-I"..variables.LUA_INCDIR, source, unpack(extras))
end
compile_library = function(library, objects, libraries, libdirs, name)
local extras = { unpack(objects) }
add_flags(extras, "-libpath:%s", libdirs)
add_flags(extras, "%s.lib", libraries)
local basename = dir.base_name(library):gsub(".[^.]*$", "")
local deffile = basename .. ".def"
local def = io.open(dir.path(fs.current_dir(), deffile), "w+")
def:write("EXPORTS\n")
def:write("luaopen_"..name:gsub("%.", "_").."\n")
def:close()
local ok = execute(variables.LD, "-dll", "-def:"..deffile, "-out:"..library, dir.path(variables.LUA_LIBDIR, variables.LUALIB), unpack(extras))
local manifestfile = basename..".dll.manifest"
if ok and fs.exists(manifestfile) then
ok = execute(variables.MT, "-manifest", manifestfile, "-outputresource:"..basename..".dll;2")
end
return ok
end
compile_wrapper_binary = function(fullname, name)
local fullbasename = fullname:gsub("%.lua$", ""):gsub("/", "\\")
local basename = name:gsub("%.lua$", ""):gsub("/", "\\")
local object = basename..".obj"
local rcname = basename..".rc"
local resname = basename..".res"
local wrapname = basename..".exe"
make_rc(fullname, fullbasename..".rc")
local ok = execute(variables.RC, "-r", "-fo"..resname, rcname)
if not ok then return ok end
ok = execute(variables.CC.." "..variables.CFLAGS, "-c", "-Fo"..object,
"-I"..variables.LUA_INCDIR, variables.WRAPPER)
if not ok then return ok end
ok = execute(variables.LD, "-out:"..wrapname, resname, object,
dir.path(variables.LUA_LIBDIR, variables.LUALIB), "user32.lib")
local manifestfile = wrapname..".manifest"
if ok and fs.exists(manifestfile) then
ok = execute(variables.MT, "-manifest", manifestfile, "-outputresource:"..wrapname..";1")
end
return ok, wrapname
end
else
compile_object = function(object, source, defines, incdirs)
local extras = {}
add_flags(extras, "-D%s", defines)
add_flags(extras, "-I%s", incdirs)
return execute(variables.CC.." "..variables.CFLAGS, "-I"..variables.LUA_INCDIR, "-c", source, "-o", object, unpack(extras))
end
compile_library = function (library, objects, libraries, libdirs)
local extras = { unpack(objects) }
add_flags(extras, "-L%s", libdirs)
if cfg.gcc_rpath then
add_flags(extras, "-Wl,-rpath,%s:", libdirs)
end
add_flags(extras, "-l%s", libraries)
if cfg.is_platform("cygwin") then
add_flags(extras, "-l%s", {"lua"})
end
return execute(variables.LD.." "..variables.LIBFLAG, "-o", library, "-L"..variables.LUA_LIBDIR, unpack(extras))
end
compile_wrapper_binary = function(fullname, name) return true, name end
end
local ok = true
local err = "Build error"
local built_modules = {}
local luadir = path.lua_dir(rockspec.name, rockspec.version)
local libdir = path.lib_dir(rockspec.name, rockspec.version)
local docdir = path.doc_dir(rockspec.name, rockspec.version)
-- On Windows, compiles an .exe for each Lua file in build.install.bin, and
-- replaces the filename with the .exe name. Strips the .lua extension if it exists,
-- otherwise just appends .exe to the name
if build.install and build.install.bin then
for i, name in ipairs(build.install.bin) do
local fullname = dir.path(fs.current_dir(), name)
local match = name:match("%.lua$")
local basename = name:gsub("%.lua$", "")
local file
if not match then
file = io.open(fullname)
end
if match or (file and file:read():match("#!.*lua.*")) then
ok, name = compile_wrapper_binary(fullname, name)
if ok then
build.install.bin[i] = name
else
if file then file:close() end
return nil, "Build error in wrapper binaries"
end
end
if file then file:close() end
end
end
for name, info in pairs(build.modules) do
local moddir = path.module_to_path(name)
if type(info) == "string" then
local ext = info:match(".([^.]+)$")
if ext == "lua" then
if info:match("init%.lua$") and not name:match("%.init$") then
moddir = path.module_to_path(name..".init")
end
local dest = dir.path(luadir, moddir)
built_modules[info] = dest
else
info = {info}
end
end
if type(info) == "table" then
local objects = {}
local sources = info.sources
if info[1] then sources = info end
if type(sources) == "string" then sources = {sources} end
for _, source in ipairs(sources) do
local object = source:gsub(".[^.]*$", "."..cfg.obj_extension)
if not object then
object = source.."."..cfg.obj_extension
end
ok = compile_object(object, source, info.defines, info.incdirs)
if not ok then
err = "Failed compiling object "..object
break
end
table.insert(objects, object)
end
if not ok then break end
local module_name = dir.path(moddir, name:match("([^.]*)$").."."..util.matchquote(cfg.lib_extension)):gsub("//", "/")
if moddir ~= "" then
fs.make_dir(moddir)
end
local dest = dir.path(libdir, moddir)
built_modules[module_name] = dest
ok = compile_library(module_name, objects, info.libraries, info.libdirs, name)
if not ok then
err = "Failed compiling module "..module_name
break
end
end
end
if ok then
for name, dest in pairs(built_modules) do
fs.make_dir(dest)
ok = fs.copy(name, dest)
if not ok then
err = "Failed installing "..name.." in "..dest
break
end
end
end
if ok then
if fs.is_dir("lua") then
ok, err = fs.copy_contents("lua", luadir)
if not ok then err = "Failed copying contents of 'lua' directory: "..err end
end
end
if ok then
return true
else
return nil, err
end
end
|
-- worms will teleport to where they shoot -- by mewmew
local event = require 'utils.event'
local math_random = math.random
local function on_entity_damaged(event)
if not event.cause then return end
local cause = event.cause
if cause.type ~= "turret" then return end
if cause.health <= 0 then return end
local new_position = {
x = (cause.position.x + event.entity.position.x) * 0.5,
y = (cause.position.y + event.entity.position.y) * 0.5
}
new_position = {
x = (cause.position.x + new_position.x) * 0.5,
y = (cause.position.y + new_position.y) * 0.5
}
local new_turret = cause.surface.create_entity({name = cause.name, force = cause.force, position = new_position})
cause.surface.create_entity({name = "blood-explosion-big", position = new_position})
cause.surface.create_entity({name = "blood-explosion-big", position = cause.position})
new_turret.health = cause.health
cause.destroy()
end
event.add(defines.events.on_entity_damaged, on_entity_damaged)
|
MaskPatternModule = MaskPatternModule or class(ItemModuleBase)
MaskPatternModule.type_name = "MaskPattern"
function MaskPatternModule:init(...)
self.clean_table = table.add(clone(self.clean_table), {{param = "pcs",action = "no_number_indexes"}})
self.required_params = table.add(clone(self.required_params), {"texture"})
return MaskPatternModule.super.init(self, ...)
end
function MaskPatternModule:RegisterHook()
self._config.default_amount = self._config.default_amount ~= nil and tonumber(self._config.default_amount) or 1
Hooks:PostHook(BlackMarketTweakData, "_init_textures", self._config.id .. "AddMaskPatternData", function(bm_self)
if bm_self.textures[self._config.id] then
BeardLib:log("[ERROR] Mask Pattern with id '%s' already exists!", self._config.id)
return
end
local data = table.merge({
name_id = "pattern_" .. self._config.id .. "_title",
dlc = self.defaults.dlc,
pcs = {},
value = 0,
texture_bundle_folder = "mods",
global_value = self.defaults.global_value,
custom = true
}, self._config)
bm_self.textures[self._config.id] = data
if data.dlc then
TweakDataHelper:ModifyTweak({{
type_items = "textures",
item_entry = self._config.id,
amount = self._config.default_amount,
global_value = data.global_value
}}, "dlc", data.dlc, "content", "loot_drops")
end
end)
end
BeardLib:RegisterModule(MaskPatternModule.type_name, MaskPatternModule)
|
local S = df_farming.S
-----------------------------------------------------------------------
-- Plants
minetest.register_node("df_farming:dead_fungus", {
description = S("Dead Fungus"),
_doc_items_longdesc = df_farming.doc.dead_fungus_desc,
_doc_items_usagehelp = df_farming.doc.dead_fungus_usage,
drawtype = "plantlike",
tiles = {"dfcaverns_dead_fungus.png"},
inventory_image = "dfcaverns_dead_fungus.png",
paramtype = "light",
walkable = false,
is_ground_content = false,
buildable_to = true,
floodable = true,
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, flow_through = 1},
sounds = df_farming.sounds.leaves,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.0, 0.5},
},
})
minetest.register_craft({
type = "fuel",
recipe = "df_farming:dead_fungus",
burntime = 2
})
local c_dead_fungus = minetest.get_content_id("df_farming:dead_fungus")
df_farming.spawn_dead_fungus_vm = function(vi, area, data, param2_data)
data[vi] = c_dead_fungus
param2_data[vi] = 0
end
-- not DF canon
minetest.register_node("df_farming:cavern_fungi", {
description = S("Cavern Fungi"),
_doc_items_longdesc = df_farming.doc.cavern_fungi_desc,
_doc_items_usagehelp = df_farming.doc.cavern_fungi_usage,
drawtype = "plantlike",
tiles = {"dfcaverns_fungi.png"},
inventory_image = "dfcaverns_fungi.png",
paramtype = "light",
walkable = false,
is_ground_content = false,
buildable_to = true,
floodable = true,
light_source = 6,
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flow_through = 1},
sounds = df_farming.sounds.leaves,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.0, 0.5},
},
})
minetest.register_craft({
type = "fuel",
recipe = "df_farming:cavern_fungi",
burntime = 2
})
local c_cavern_fungi = minetest.get_content_id("df_farming:cavern_fungi")
df_farming.spawn_cavern_fungi_vm = function(vi, area, data, param2_data)
data[vi] = c_cavern_fungi
param2_data[vi] = 0
end
-----------------------------------------------------------------------------------------
local marginal = {[df_farming.node_names.dirt] = true, [df_farming.node_names.dirt_moss] = true, [df_farming.node_names.floor_fungus] = true}
local growable = {[df_farming.node_names.dirt_wet] = true, [df_farming.node_names.dirt] = true, [df_farming.node_names.dirt_moss] = true, [df_farming.node_names.floor_fungus] = true}
df_farming.plant_timer = function(pos, plantname, elapsed)
local next_stage_time = minetest.registered_nodes[plantname]._dfcaverns_next_stage_time
if not next_stage_time then return end
next_stage_time = next_stage_time + math.random(next_stage_time * -0.1, next_stage_time * 0.1)
local below = minetest.get_node(vector.add(pos, {x=0, y=-1, z=0}))
if marginal[below.name] then
next_stage_time = next_stage_time * 5
end
if elapsed ~= nil then
minetest.get_node_timer(pos):set(next_stage_time, elapsed-next_stage_time)
else
minetest.get_node_timer(pos):start(next_stage_time)
end
end
local place_seed = function(itemstack, placer, pointed_thing, plantname)
local pt = pointed_thing
-- check if pointing at a node
if not pt then
return itemstack
end
if pt.type ~= "node" then
return itemstack
end
local under = minetest.get_node(pt.under)
local above = minetest.get_node(pt.above)
if minetest.is_protected(pt.under, placer:get_player_name()) then
minetest.record_protection_violation(pt.under, placer:get_player_name())
return
end
if minetest.is_protected(pt.above, placer:get_player_name()) then
minetest.record_protection_violation(pt.above, placer:get_player_name())
return
end
-- return if any of the nodes is not registered
if not minetest.registered_nodes[under.name] then
return itemstack
end
if not minetest.registered_nodes[above.name] then
return itemstack
end
-- check if pointing at the top of the node
if pt.above.y ~= pt.under.y+1 then
return itemstack
end
-- check if you can replace the node above the pointed node
if not minetest.registered_nodes[above.name].buildable_to then
return itemstack
end
-- add the node and remove 1 item from the itemstack
minetest.add_node(pt.above, {name = plantname, param2 = 1})
df_farming.plant_timer(pt.above, plantname)
if not minetest.settings:get_bool("creative_mode", false) then
itemstack:take_item()
end
return itemstack
end
df_farming.register_seed = function(name, description, image, stage_one, grow_time, desc, usage)
local def = {
description = description,
_doc_items_longdesc = desc,
_doc_items_usagehelp = usage,
tiles = {image},
inventory_image = image,
wield_image = image,
drawtype = "signlike",
paramtype2 = "wallmounted",
groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 2, dfcaverns_cookable = 1, digtron_on_place=1},
_dfcaverns_next_stage = stage_one,
_dfcaverns_next_stage_time = grow_time,
paramtype = "light",
walkable = false,
is_ground_content = false,
floodable = true,
sunlight_propagates = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
on_place = function(itemstack, placer, pointed_thing)
return place_seed(itemstack, placer, pointed_thing, "df_farming:"..name)
end,
on_timer = function(pos, elapsed)
df_farming.grow_underground_plant(pos, "df_farming:"..name, elapsed)
end,
}
minetest.register_node("df_farming:"..name, def)
minetest.register_craft({
type = "fuel",
recipe = "df_farming:"..name,
burntime = 1
})
end
df_farming.grow_underground_plant = function(pos, plant_name, elapsed)
if df_farming.kill_if_sunlit(pos) then
return
end
local node_def = minetest.registered_nodes[plant_name]
local next_stage = node_def._dfcaverns_next_stage
if next_stage then
local soil = minetest.get_node(vector.add(pos, {x=0, y=-1, z=0})).name
if growable[soil] then
local next_def = minetest.registered_nodes[next_stage]
local node = minetest.get_node(pos)
minetest.swap_node(pos, {name=next_stage, param2 = next_def.place_param2 or node.param2})
df_farming.plant_timer(pos, next_stage, elapsed)
else
df_farming.plant_timer(pos, plant_name) -- reset timer, check again later
end
end
end
df_farming.kill_if_sunlit = function(pos, node)
return false
end
if df_farming.config.light_kills_fungus then
local kill_if_sunlit = function(pos, node)
if not node then
node = minetest.get_node(pos)
end
local node_def = minetest.registered_nodes[node.name]
local light_sensitive_fungus_level = node_def.groups.light_sensitive_fungus
-- This should never be the case, but I've received a report of it happening anyway in the ABM so guarding against it.
if not light_sensitive_fungus_level then return false end
local dead_node = node_def._dfcaverns_dead_node or "df_farming:dead_fungus"
-- 11 is the value adjacent to a torch
local light_level = minetest.get_node_light(pos, 0.5) -- check at 0.5 to get how bright it would be here at noon,
-- prevents fungus from growing on the surface world by happenstance
if light_level and light_level > light_sensitive_fungus_level then
minetest.set_node(pos, {name=dead_node, param2 = node.param2})
return true
end
return false
end
df_farming.kill_if_sunlit = kill_if_sunlit
minetest.register_abm({
label = "df_farming:kill_light_sensitive_fungus",
nodenames = {"group:light_sensitive_fungus"},
catch_up = true,
interval = 30,
chance = 5,
action = function(pos, node)
kill_if_sunlit(pos, node)
end
})
end
|
local lm = require "luamake"
package.path = "./?.lua;../?.lua"
require "buildscripts.common"
lm:lua_dll "efkmat" {
includes = {
EfkLib_Includes,
},
sources = {
"efkmat.cpp",
},
deps = "source_efklib",
bindir = lm.workdir
}
|
#!/usr/bin/lua
-- Lua script for automatically building theme files
-- for vim, vscode, sublime, and atom.
USAGE = [[
./test.lua [vim, vscode, sublime, atom]
]]
-- COLOR DEFINITIONS
color_table = {
earthbound={
theme_name_full='Earthbound',
theme_name_alt='earthbound',
color_bg_main='#360a5f',
color_bg_alt1='#2b044f',
color_bg_alt2='#1c0037',
color_fg='#ffffff',
color_linenr='#94b2b2',
color_select='#6a6c23',
color_type='#f56b3c',
color_accent='#fafd51',
color_string='#84fc60',
color_number='#fb967f',
color_boolean='#70caff',
color_comment='#acaf6f',
color_variable='#abdcdc',
color_function='#70caff'
},
moonside={
theme_name_full='Moonside',
theme_name_alt='moonside',
color_bg_main='#000000',
color_bg_alt1='#080808',
color_bg_alt2='#131313',
color_fg='#ffffff',
color_linenr='#9e5dc8',
color_select='#5a1359',
color_type='#f6f929',
color_accent='#fd35fa',
color_string='#ff6693',
color_boolean='#fd9935',
color_variable='#c67ff4',
color_number='#aaef64',
color_comment='#7ca454',
color_function='#5e9aff'
},
threed={
theme_name_full='Threed',
theme_name_alt='threed',
color_bg_main='#303454',
color_bg_alt1='#373c60',
color_bg_alt2='#2a2e4a',
color_fg='#f0faff',
color_linenr='#9590b2',
color_select='#534f63',
color_type='#ffcfcb',
color_accent='#d4cbff',
color_string='#ffcf32',
color_boolean='#c67ff4',
color_variable='#2fff89',
color_number='#d4cbff',
color_comment='#bdb7db',
color_function='#f89070'
},
fire_spring={
theme_name_full='Fire Spring',
theme_name_alt='fire-spring',
color_bg_main='#261933',
color_bg_alt1='#21162c',
color_bg_alt2='#181020',
color_fg='#ffffca',
color_linenr='#b49a19',
color_select='#632611',
color_type='#ff7e50',
color_accent='#f0e500',
color_string='#74e4f3',
color_boolean='#d9c400',
color_variable='#e5caff',
color_number='#a99ade',
color_comment='#bb8673',
color_function='#d992ff'
},
dusty_dunes={
theme_name_full='Dusty Dunes',
theme_name_alt='dusty-dunes',
color_bg_main='#1e1b07',
color_bg_alt1='#150d00',
color_bg_alt2='#140f00',
color_fg='#f9e4a1',
color_linenr='#f9e4a1',
color_select='#6b5e33',
color_type='#e0c364',
color_accent='#f6d56a',
color_string='#ffebae',
color_boolean='#ffd03c',
color_variable='#f6d56a',
color_number='#f6d56a',
color_comment='#aaaa88',
color_function='#f6d56a'
},
magicant={
theme_name_full='Magicant (Light)',
theme_name_alt='magicant',
color_bg_main='#f9f8b9',
color_bg_alt1='#efeeb2',
color_bg_alt2='#e6e5ab',
color_fg='#220088',
color_linenr='#876a55',
color_select='#b299ff',
color_type='#881200',
color_accent='#604633',
color_string='#7100b1',
color_boolean='#a31100',
color_variable='#87000d',
color_number='#604633',
color_comment='#525252',
color_function='#9d02f2'
},
cave_of_the_past={
theme_name_full='Cave of the Past (Monochrome)',
theme_name_alt='cave-of-the-past',
color_bg_main='#b0d0b8',
color_bg_alt1='#a5c4ad',
color_bg_alt2='#9ab5a2',
color_fg='#262e25',
color_linenr='#315b31',
color_select='#7c9283',
color_type='#3e5f39',
color_accent='#0e1e0e',
color_string='#2b342a',
color_boolean='#293d29',
color_variable='#2b342a',
color_number='#445046',
color_comment='#5b5f59',
color_function='#0e1e0e'
},
devils_machine={
theme_name_full='Devils Machine',
theme_name_alt='devils-machine',
color_bg_main='#040001',
color_bg_alt1='#260000',
color_bg_alt2='#170000',
color_fg='#ffcccc',
color_linenr='#a45a52',
color_select='#481200',
color_type='#c15bac',
color_accent='#ffcc99',
color_string='#ddaaaa',
color_boolean='#938198',
color_variable='#ff8c69',
color_number='#b4a0dc',
color_comment='#a59e85',
color_function='#e6817e'
}
}
darker_variants = {
earthbound=1,
threed=1,
fire_spring=1,
dusty_dunes=1
}
color_files = {
vim='templates/template.vim',
vscode='templates/template.json',
sublime='templates/earthbound_template.tmTheme',
atom='templates/colors.less',
all=''
}
out_paths = {
vim='vim/colors/%s.vim',
vscode='vscode/themes/%s.json',
sublime='sublime/earthbound_%s.tmTheme',
atom='atom/themes/%s-syntax/colors.less'
}
-- MISC UTILS
local random = math.random
local function uuid()
local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
return string.gsub(template, '[xy]', function (c)
local v = (c == 'x') and random(0, 0xf) or random(8, 0xb)
return string.format('%x', v)
end)
end
-- THEME GENERATION
--- Generates a formatted theme file
-- A string replacement is performed for each line of (file)
-- using the values in color_table.
-- @param file: The template file to use
-- @param theme: The theme to generate a file for
local function generate_theme(file, name, theme, out_path)
local theme_file = io.open(file, 'r')
if theme_file == nil then
print('Unable to open ' .. file)
return
end
local lines = {}
for line in theme_file:lines() do
for k, v in pairs(theme) do
line = string.gsub(line, k, v)
end
lines[#lines + 1] = line
end
theme_file:close()
out_path = string.format(out_path, theme['theme_name_alt'])
print(out_path)
theme_file = io.open(out_path, 'w')
for i, line in ipairs(lines) do
theme_file:write(line, "\n")
end
theme_file:close()
end
--- Runs all necessary theme generation functions for a specific editor
-- @param editor: The editor to use for theme generation
local function create_editor_themes(editor)
local filename = color_files[editor]
print('=== Generating theme files for ' .. editor)
for theme, value in pairs(color_table) do
color_table[theme]['uuid'] = uuid()
generate_theme(filename, theme, color_table[theme], out_paths[editor])
-- A few themes can use "-darker" variants, which swaps the default
-- background (color_bg_main) and the darker background (color_bg_alt2)
if darker_variants[theme] ~= nil then
local darker_name = theme .. '_darker'
dark_theme = {}
for key, val in pairs(color_table[theme]) do
dark_theme[key] = val
end
dark_theme['uuid'] = uuid()
dark_theme['color_bg_main'] = color_table[theme]['color_bg_alt2']
dark_theme['color_bg_alt2'] = color_table[theme]['color_bg_main']
dark_theme['theme_name_full'] = dark_theme['theme_name_full'] .. ' Darker'
dark_theme['theme_name_alt'] = dark_theme['theme_name_alt'] .. '-darker'
generate_theme(filename, darker_name, dark_theme, out_paths[editor])
end
end
end
-- CLI
if arg[1] == nil then
print('Error: Argument required')
print(USAGE)
os.exit(1)
elseif color_files[arg[1]] == nil then
print('Error: Invalid argument')
print(USAGE)
os.exit(1)
else
-- Get template file for theme generation
if arg[1] == 'all' then
for editor, _ in pairs(out_paths) do
create_editor_themes(editor)
end
else
create_editor_themes(arg[1])
end
end
|
local M = {}
function M.copyDatabaseTo( filename, destination )
assert( type(filename) == "string", "string expected for the first parameter but got " .. type(filename) .. " instead." )
assert( type(destination) == "table", "table expected for the second paramter but bot " .. type(destination) .. " instead." )
local sourceDBpath = system.pathForFile( filename, system.ResourceDirectory )
-- io.open opens a file at path; returns nil if no file found
local readHandle, errorString = io.open( sourceDBpath, "rb" )
assert( readHandle, "Database at " .. filename .. " could not be read from system.ResourceDirectory" )
assert( type(destination.filename) == "string", "filename should be a string, its a " .. type(destination.filename) )
print( type(destination.baseDir) )
assert( type(destination.baseDir) == "userdata", "baseName should be a valid system directory" )
local destinationDBpath = system.pathForFile( destination.filename, destination.baseDir )
local writeHandle, writeErrorString = io.open( destinationDBpath, "wb" )
assert( writeHandle, "Could not open " .. destination.filename .. " for writing." )
local contents = readHandle:read( "*a" )
writeHandle:write( contents )
io.close( writeHandle )
io.close( readHandle )
return true
end
return M
|
return PlaceObj("ModDef", {
"title", "Permanent Priority",
"version", 2,
"version_major", 0,
"version_minor", 2,
"image", "Preview.png",
"id", "ChoGGi_PermanentPriority",
"author", "ChoGGi",
"steam_id", "1411112809",
"pops_any_uuid", "81f59098-e86b-419f-a01f-3fb76670e551",
"code", {
"Code/Script.lua",
},
"lua_revision", 1007000, -- Picard
"description", [[Priority from construction sites will carry over to the completed buildings.]],
})
|
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
RegisterNetEvent('px:pojazd')
AddEventHandler('px:pojazd', function()
local PedGracza = PlayerPedId()
local lokalizacjagracza = GetEntityCoords(PedGracza)
local closestPlayer, playerDistance = ESX.Game.GetClosestPlayer()
if closestPlayer ~= -1 and playerDistance <= 3.0 then
local pojazd = ESX.Game.GetClosestVehicle(lokalizacjagracza)
local lokalizacjapojazdu = GetEntityCoords(pojazd)
local DystansPojazd = GetDistanceBetweenCoords(lokalizacjagracza, lokalizacjapojazdu, true)
if DoesEntityExist(pojazd) and (DystansPojazd <= 3) then
local ModelPojazdu = ESX.Game.GetVehicleProperties(pojazd)
TriggerServerEvent('px:sprzedaj', GetPlayerServerId(closestPlayer), ModelPojazdu.plate)
else
ESX.ShowNotification('Nie ma auta w pobliżu')
end
else
ESX.ShowNotification('Nie ma gracza w pobliżu')
end
end)
|
-- ===========================================================================
-- Base File
-- ===========================================================================
include("LaunchBar_Expansion2.lua");
include("launchbar_CQUI.lua");
|
--[[
-- Creator: Exho
-- Purpose: Provide a free hitmarker script that has a nice level of customization
]] --
if SERVER then
AddCSLuaFile()
resource.AddFile("sound/hitmarkers/mlghit.wav")
util.AddNetworkString("DrawHitMarker")
util.AddNetworkString("CreateBlood")
util.AddNetworkString("OpenMixer")
hook.Add("EntityTakeDamage", "HitmarkerDetector", function(ent, dmginfo)
local att = dmginfo:GetAttacker()
local dmg = dmginfo:GetDamage()
local pos = dmginfo:GetDamagePosition()
if (IsValid(att) and att:IsPlayer() and att ~= ent) then
if (ent:IsPlayer() or ent:IsNPC()) then -- Only players and NPCs show hitmarkers
net.Start("DrawHitMarker")
net.WriteBool(ent:GetNWBool("LastHitCrit"))
net.Send(att) -- Send the message to the attacker
net.Start("CreateBlood")
net.WriteVector(pos)
net.Broadcast()
end
end
end)
hook.Add("ScalePlayerDamage", "HitmarkerPlayerCritDetector", function(ply, hitgroup, dmginfo)
ply:SetNWBool("LastHitCrit", hitgroup == HITGROUP_HEAD)
end)
hook.Add("ScaleNPCDamage", "HitmarkerPlayerCritDetector", function(npc, hitgroup, dmginfo)
npc:SetNWBool("LastHitCrit", hitgroup == HITGROUP_HEAD)
end)
hook.Add("PlayerSay", "ColorMixerOpen", function(ply, text, public)
local text = string.lower(text)
if (string.sub(text, 1, 8) == "!hmcolor") then
net.Start("OpenMixer")
net.Send(ply)
return false
end
end)
end
if CLIENT then
-- Declare our convars and variables
local hm_toggle = CreateClientConVar("hm_enabled", "1", true, true)
local hm_type = CreateClientConVar("hm_hitmarkertype", "lines", true, true)
local hm_color = CreateClientConVar("hm_hitmarkercolor", "255, 255, 255", true, true)
local hm_crit = CreateClientConVar("hm_showcrits", "1", true, true)
local hm_critcolor = CreateClientConVar("hm_hitmarkercritcolor", "255, 0, 0", true, true)
local hm_sound = CreateClientConVar("hm_hitsound", "1", true, true)
local DrawHitM = false
local LastHitCrit = false
local CanPlayS = true
local alpha = 0
local function GrabColor() -- Used for retrieving the console color
local coltable = string.Explode(",", hm_color:GetString())
local newcol = {}
for k, v in pairs(coltable) do
v = tonumber(v)
if v == nil then -- Fixes missing values
coltable[k] = 0
end
end
newcol[1], newcol[2], newcol[3] = coltable[1] or 0, coltable[2] or 0, coltable[3] or 0 -- Fixes missing keys
return Color(newcol[1], newcol[2], newcol[3]) -- Returns the finished color
end
local function GrabCritColor() -- Used for retrieving the console color
local coltable = string.Explode(",", hm_critcolor:GetString())
local newcol = {}
for k, v in pairs(coltable) do
v = tonumber(v)
if v == nil then -- Fixes missing values
coltable[k] = 0
end
end
newcol[1], newcol[2], newcol[3] = coltable[1] or 0, coltable[2] or 0, coltable[3] or 0 -- Fixes missing keys
return Color(newcol[1], newcol[2], newcol[3]) -- Returns the finished color
end
net.Receive("OpenMixer", function(len, ply) -- Receive the server message
-- Creating the color mixer panel
local Frame = vgui.Create("DFrame")
Frame:SetTitle("Hitmarker Color Config")
Frame:SetSize(300, 400)
Frame:Center()
Frame:MakePopup()
local colMix = vgui.Create("DColorMixer", Frame)
colMix:Dock(TOP)
colMix:SetPalette(true)
colMix:SetAlphaBar(false)
colMix:SetWangs(false)
colMix:SetColor(GrabColor()) -- Sets the default color to your current one
local Butt = vgui.Create("DButton", Frame)
Butt:SetText("Set Color")
Butt:SetSize(150, 70)
Butt:SetPos(70, 290)
Butt.DoClick = function(Butt) -- Concatenate your choices together and set the color
local colors = colMix:GetColor()
local colstring = tostring(colors.r .. ", " .. colors.g .. ", " .. colors.b)
RunConsoleCommand("hm_hitmarkercolor", colstring)
end
end)
net.Receive("DrawHitMarker", function(len, ply)
DrawHitM = true
CanPlayS = true
if net.ReadBool() then
LastHitCrit = true
else
LastHitCrit = false
end
alpha = 255
end)
net.Receive("CreateBlood", function()
local pos = net.ReadVector()
local effect = EffectData()
effect:SetOrigin(pos)
effect:SetScale(1)
util.Effect("bloodimpact", effect)
end)
hook.Add("HUDPaint", "HitmarkerDrawer", function()
if hm_toggle:GetBool() == false then return end -- Enables/Disables the hitmarkers
if alpha == 0 then DrawHitM = false CanPlayS = true end -- Removes them after they decay
if DrawHitM == true then
if CanPlayS and hm_sound:GetBool() == true then
surface.PlaySound("hitmarkers/mlghit.wav")
CanPlayS = false
end
local x = ScrW() / 2
local y = ScrH() / 2
alpha = math.Approach(alpha, 0, 5)
local col = GrabColor()
if LastHitCrit and hm_crit:GetBool() then
col = GrabCritColor()
end
col.a = alpha
surface.SetDrawColor(col)
local sel = string.lower(hm_type:GetString())
-- The drawing part of the hitmarkers and the various types you can choose
if sel == "lines" then
surface.DrawLine(x - 6, y - 5, x - 11, y - 10)
surface.DrawLine(x + 5, y - 5, x + 10, y - 10)
surface.DrawLine(x - 6, y + 5, x - 11, y + 10)
surface.DrawLine(x + 5, y + 5, x + 10, y + 10)
elseif sel == "sidesqr_lines" then
surface.DrawLine(x - 15, y, x, y + 15)
surface.DrawLine(x + 15, y, x, y - 15)
surface.DrawLine(x, y + 15, x + 15, y)
surface.DrawLine(x, y - 15, x - 15, y)
surface.DrawLine(x - 5, y - 5, x - 10, y - 10)
surface.DrawLine(x + 5, y - 5, x + 10, y - 10)
surface.DrawLine(x - 5, y + 5, x - 10, y + 10)
surface.DrawLine(x + 5, y + 5, x + 10, y + 10)
elseif sel == "sqr_rot" then
surface.DrawLine(x - 15, y, x, y + 15)
surface.DrawLine(x + 15, y, x, y - 15)
surface.DrawLine(x, y + 15, x + 15, y)
surface.DrawLine(x, y - 15, x - 15, y)
else -- Defaults to 'lines' in case of an incorrect type
surface.DrawLine(x - 6, y - 5, x - 11, y - 10)
surface.DrawLine(x + 5, y - 5, x + 10, y - 10)
surface.DrawLine(x - 6, y + 5, x - 11, y + 10)
surface.DrawLine(x + 5, y + 5, x + 10, y + 10)
end
end
end)
end
|
-- Some sanity checks for the TUI using the builtin terminal emulator
-- as a simple way to send keys and assert screen state.
local Screen = require('test.functional.ui.screen')
local helpers = require('test.functional.helpers')
local thelpers = require('test.functional.terminal.helpers')
local feed = thelpers.feed_data
local execute = helpers.execute
describe('tui', function()
local screen
before_each(function()
helpers.clear()
screen = thelpers.screen_setup(0, '["'..helpers.nvim_prog..'", "-u", "NONE", "--cmd", "set noswapfile"]')
screen.timeout = 30000 -- pasting can be really slow in the TUI
screen:expect([[
{1: } |
~ |
~ |
~ |
[No Name] |
|
-- TERMINAL -- |
]])
end)
after_each(function()
screen:detach()
end)
it('accepts basic utf-8 input', function()
feed('iabc\ntest1\ntest2')
screen:expect([[
abc |
test1 |
test2{1: } |
~ |
[No Name] [+] |
-- INSERT -- |
-- TERMINAL -- |
]])
feed('\x1b')
screen:expect([[
abc |
test1 |
test{1:2} |
~ |
[No Name] [+] |
|
-- TERMINAL -- |
]])
end)
it('automatically sends <Paste> for bracketed paste sequences', function()
feed('i\x1b[200~')
screen:expect([[
{1: } |
~ |
~ |
~ |
[No Name] |
-- INSERT (paste) -- |
-- TERMINAL -- |
]])
feed('pasted from terminal')
screen:expect([[
pasted from terminal{1: } |
~ |
~ |
~ |
[No Name] [+] |
-- INSERT (paste) -- |
-- TERMINAL -- |
]])
feed('\x1b[201~')
screen:expect([[
pasted from terminal{1: } |
~ |
~ |
~ |
[No Name] [+] |
-- INSERT -- |
-- TERMINAL -- |
]])
end)
it('can handle arbitrarily long bursts of input', function()
execute('set ruler')
local t = {}
for i = 1, 3000 do
t[i] = 'item ' .. tostring(i)
end
feed('i\x1b[200~')
feed(table.concat(t, '\n'))
feed('\x1b[201~')
screen:expect([[
item 2997 |
item 2998 |
item 2999 |
item 3000{1: } |
[No Name] [+] 3000,10 Bot|
-- INSERT -- |
-- TERMINAL -- |
]])
end)
end)
|
local Settings = {};
local function apply( destination, source )
if source then
local destination = destination or {};
for key, value in pairs(source) do
if type(value) ~= 'table' then
destination[key] = value;
else
destination[key] = apply( destination[key], value );
end
end
return destination;
end
return destination;
end
function Settings.create( self, values )
local values = values or forge.local_settings;
apply( self, values );
return self;
end
function Settings.clone( self, values )
local settings = Settings();
apply( settings, self );
apply( settings, values );
return settings;
end
function Settings.inherit( self, values )
local settings = values or {};
setmetatable( settings, {__index = self} );
return settings;
end
function Settings.apply( self, values )
apply( self, values );
return self;
end
function Settings.defaults( self, values )
for key, value in pairs(values) do
if type(key) == 'string' and self[key] == nil then
self[key] = value;
end
end
return self;
end
local settings_metatable = {
__index = Settings;
};
setmetatable( Settings, {
__call = function ( _, values )
local settings = {};
setmetatable( settings, settings_metatable );
return settings:create( values );
end
} );
return Settings;
|
--[[
file:mahjongAlgor.lua
desc:胡牌算法
auth:Carol Luo
]]
local math = math
local next = next
local pairs = pairs
local ipairs = ipairs
local class = require("class")
local sort = require("sort")
local table = require("extend_table")
local gameAlgor = require("game.algor")
local mapHuCards = require("mahjong.mapHuCards")
---@class mahjongAlogor:gameAlgor @麻将算法
local algor = class(gameAlgor)
local this = algor
---构造函数
function algor:ctor()
---七对-默认支持
---@type boolean
self._support_7pairs = true
---四混-默认关闭
---@type boolean
self._support_4laizi = false
---七对癞子参与-默认关闭
---@type boolean
self._support_7laizi = false
---癞子牌-默认关闭
---@type mjCard|nil
self._support_dinglz = nil
---癞子表-默认空表
---@type table<mjCard,boolean>
self._support_laizis = {nil}
---固定将对-默认空表
---@type table<mjCard,boolean>
self._support_jiangs = {nil}
---顺子分组-默认空表
---@type table<mjCard,mjUnit>
self._support_classs = {nil}
---
---@type table<index,mjUnit>
self._support_mclass = {nil}
---调用信息-默认空表
---@type mjUsag
self._current_usages = {nil}
end
---七对开关
---@param sport boolean @true:开启 false:关闭
function algor:setSupport7pairs(sport)
self._support_7pairs = sport
end
---四混开关
---@param sport boolean @true:开启 false:关闭
function algor:setSupport4laizi(sport)
self._support_4laizi = sport
end
---七对癞子参与开关
---@param sport boolean @true:开启 false:关闭
function algor:setSupport7laizi(sport)
self._support_7laizi = sport
end
---清空癞子
function algor:clrSupportLaizis()
local maps = self._support_laizis
table.clear(maps)
end
---添加癞子
---@param mj mjCard @癞子牌
function algor:addSupportLaizis(mj)
local maps = self._support_laizis
maps[mj] = true
end
---删除癞子
---@param mj mjCard @癞子牌
function algor:delSupportLaizis(mj)
local maps = self._support_laizis
maps[mj] = nil
end
---获取癞子
---@return table<mjCard,boolean>
function algor:getSupportLaizis()
return self._support_laizis
end
---获取癞子
---@return mjCard
function algor:getSupportLaizi()
return self._support_dinglz
end
---清空将对
function algor:clrSupportJiangs()
local maps = self._support_jiangs
table.clear(maps)
end
---添加将对
---@param mj mjCard @癞子牌
function algor:addSupportJiangs(mj)
local maps = self._support_jiangs
self._support_dinglz = mj
maps[mj] = true
end
---删除将对
---@param mj mjCard @癞子牌
function algor:delSupportJiangs(mj)
local maps = self._support_jiangs
self._support_dinglz = next(maps)
maps[mj] = nil
end
---顺子分类
---@param ts mjUnit[]
function algor:setSupportClasss(ts)
---@type mahjongHelper @麻将辅助
local hlp = self._hlp
local maps = self._support_classs
local mmas = self._support_mclass
for idx,unit in ipairs(ts) do
for value = unit.start,unit.close do
local mj = hlp.getCard(unit.color,value)
unit.class = idx
maps[mj] = unit
mmas[idx] = unit
end
end
end
---麻将
---@param mj mjCard @麻将
---@return index
function algor:getSupportClassID(mj)
local maps = self._support_classs
return maps[mj].class
end
---麻将
---@param mj mjCard @麻将
---@return index
function algor:getSupportClassInfo(mj)
local maps = self._support_classs
return maps[mj]
end
---可以成顺
---@param jid index @麻将
---@return boolean
function algor:isJoint(jid)
local map = self._support_mclass
return map[jid].joint
end
---是癞子
---@param mj mjCard @麻将
---@return boolean
function algor:ifRuffian(mj)
local map = self._support_laizis
if map[mj] then
return true
end
return false
end
---使用者
---@param player mahjongPlayer @玩家
function algor:setUsages(player,mjFull)
local info = self.current_usages
info.player = player
info.mjFull = mjFull or self._lgc:getFMahjongMaps()
end
---使用者
---@return mjUsag
function algor:getUsages()
local info = self.current_usages
return info
end
---统一手牌
---@param hands mjHands @手牌
---@param ot table|nil @外带
---@return mjUnify @手牌,癞子
function algor:getUnifyHands(hands)
---@type mjHands @手牌
local mjhands = {nil}
---@type mjMapkc @映射
local mjMpasw = {nil}
---@type mjMapkc @映射
local mjMpacw = {nil}
---@type mahjongHelper @麻将辅助
local mjhelp = self._hlp
---@type mjClass
local mjClass = {
[1] = {nil},--万
[2] = {nil},--条
[3] = {nil},--筒
[4] = {nil},--箭
[5] = {nil},--风
[6] = {nil},--花
}
local mjGapls = {
[1] = {min=9,max=0,num=0},--万
[2] = {min=9,max=0,num=0},--条
[3] = {min=9,max=0,num=0},--筒
[4] = {min=9,max=0,num=0},--箭
[5] = {min=9,max=0,num=0},--风
[6] = {min=9,max=0,num=0},--花
}
---@type table<mjCard,mjCount> @映射
local sanjosr = {nil}
---@type mjUnify
local ufy = {
lzcount = 0,
spcount = #hands,
mjhands = mjhands,
mjMpasw = mjMpasw,
mjMpacw = mjMpacw,
mjClass = mjClass,
sanjosr = sanjosr,
mjGapls = mjGapls,
}
for _,mj in ipairs(hands) do
local cl = mjhelp.getColor(mj)
local cn = mjMpacw[cl] or 0
mjMpacw[cl] = cn + 1
if not self:ifRuffian(mj) then
table.insert(mjhands,mj)
else
ufy.lzcount = ufy.lzcount + 1
end
--顺子分类
local ji = self:getSupportClassID(mj)
---记录数据
local ve = mjhelp.getValue(mj)
local cv = mjClass[ji][ve] or 0
mjClass[ji][ve] = cv + 1
---记录大小
local vue = math.min(ve,mjGapls[ji].min)
mjGapls[ji].min = vue
vue = math.max(ve,mjGapls[ji].max)
mjGapls[ji].max = vue
vue = mjGapls[ji].num
mjGapls[ji].num = vue + 1
end
mjMpasw = table.arrToHas(mjhands,mjMpasw)
table.sort(mjhands)
return ufy
end
---数据变更
---@param ufy mjUnify @统一数据
---@param add mjCount @增加数量
---@param cmj mjCard @增加数量
---@param kfd string @记录键值
function algor:clamp_unity(ufy,add,cmj,kfd)
--如果是癞子
if self:ifRuffian(cmj) then
ufy.lzcount = ufy.lzcount + add
return
end
---@type mahjongHelper
local mjHlp = self._hlp
---手牌
ufy.spcount = ufy.spcount + add
---花色
local clor = mjHlp.getColor(cmj)
local ccnt = ufy.mjMpacw[clor] or 0
ufy.mjMpacw[clor] = ccnt + add
---牌表
local jcnt = ufy.mjMpasw[cmj] or 0
ufy.mjMpasw[cmj] = jcnt + add
---顺牌
local ji = self:getSupportClassID(cmj)
local jv = self._hlp.getValue(cmj)
---记录大小
local vue = math.max(ufy.mjGapls[ji].max,jv)
ufy.mjGapls[ji].max = vue
vue = math.min(ufy.mjGapls[ji].min,jv)
ufy.mjGapls[ji].min = vue
vue = ufy.mjGapls[ji].num
ufy.mjGapls[ji].num = vue + add
--设置拿牌
if 1 == add then
ufy[kfd] = cmj
elseif -1 == add then
ufy[kfd] = nil
end
end
---听哪些
---@param hands mjHands @手牌
---@return table<mjCard,mjPeg> @提示
function algor:getWhoTings(hands)
---@type mjTings @胡牌映射
local rtings = {nil}
---@type mjUsag @使用信息
local mjUsag = self:getUsages()
---@type mjUnify @统一手牌
local ufy = self:getUnifyHands(hands)
local mjMpacw = ufy.mjMpacw
---@type mjCount @癞子数量
local lzcount = ufy.lzcount
---@type mahjongHelper @麻将辅助
local mjhelp = self._hlp
---@type mahjongType @麻将类型
local mjPeg = self._tye
---遍历牌库
for deal,_ in pairs(mjUsag.mjFull) do
local ok = true
local clor = mjhelp.getColor(deal)
---没有癞子
if lzcount <= 0 then
--不是癞子
if not self:ifRuffian(deal) then
local ccnt = mjMpacw[clor] or 0
local mnum = (ccnt+1)%3
if 2 ~= mnum and 0 ~= mnum then
--要么取将-要么成扑
ok = false
end
end
end
if ok then
---数据变更
self:clamp_unity(ufy,1,deal,"getCard")
--检查胡牌
if self:isHuCards(ufy) then
rtings[deal] = mjPeg:getPegItem(ufy)
end
---数据变更
self:clamp_unity(ufy,-1,deal,"getCard")
end
end
local lz = self:getSupportLaizi()
---添加癞子
if not table.empty(rtings) then
local lzs = self:getSupportLaizis()
for lzmj,_ in pairs(lzs) do
if not rtings[lzs] then
ufy.getCard = lzmj
rtings[lzmj] = mjPeg:getPegItem(ufy)
ufy.getCard = nil
end
end
end
return rtings
end
---选那些
---@param hands mjHands @手牌
---@return mjXuaks @提示
function algor:getWhoXuans(hands)
---@type mjXuaks @选牌映射
local rXuaks = {nil}
---@type mjUsag @使用信息
local mjUsag = self:getUsages()
---@type mjUnify @统一手牌
local ufy = self:getUnifyHands(hands)
local mjMpasw = ufy.mjMpasw
---@type mjCount @癞子数量
local lzcount = ufy.lzcount
---@type mahjongHelper @麻将辅助
local mjhelp = self._hlp
---@type mahjongType @麻将类型
local mjPeg = self._tye
---遍历牌库
for cast,_ in pairs(mjMpasw) do
---数据变更
self:clamp_unity(ufy,-1,cast,"casCard")
for deal,_ in pairs(mjUsag.mjFull) do
self:clamp_unity(ufy,1,cast,"getCard")
if self:isHuCards(ufy) then
---@type mjTings @胡牌信息
local tings = rXuaks[cast] or {nil}
rXuaks[cast] = tings
tings[deal] = mjPeg:getPegItem(ufy)
end
self:clamp_unity(ufy,-1,cast,"getCard")
end
self:clamp_unity(ufy,1,cast,"casCard")
end
---添加癞子
local lzs = self:getSupportLaizis()
for _,tings in pairs(rXuaks) do
if not table.empty(tings) then
for lzmj,_ in pairs(lzs) do
if not tings[lzs] then
ufy.getCard = lzmj
tings[lzmj] = mjPeg:getPegItem(ufy)
ufy.getCard = nil
end
end
end
end
return rXuaks
end
local count = 0
---胡检查次数
function algor.getHuCardCount()
return count
end
---胡检查次数
function algor.setHuCardCount(c)
count = c
end
---胡牌判断
---@param ufy mjUnify @信息
function algor:isHuCards(ufy)
if count <= 0 then
return false
end
count = count - 1
--数量检查
if 2 ~= ufy.spcount % 3 then
return false
end
--支持四混
if self._support_4laizi then
if ufy.lzcount >= 4 then
return true
end
end
--支持七对
if self._support_7pairs then
if self:isHu7Pairs(ufy) then
return true
end
end
if ufy.lzcount <= 0 then
--无癞子
return self:nolaiziJiangHuCard(ufy)
else
--有癞子
return self:oklaiziJiangHuCard(ufy)
end
end
---胡牌判断
---@param ufy mjUnify @信息
function algor:isHu7Pairs(ufy)
--数量检查
if 14 ~= ufy.spcount then
return false
end
if self._support_7laizi then
--癞子允许参与
local lzcnt = ufy.lzcount
for mj,ct in ipairs(ufy.mjMpasr) do
if 0 ~= ct % 2 then
lzcnt = lzcnt - 1
if lzcnt < 0 then
return false
end
end
end
else
--癞子不能参与
for mj,ct in pairs(ufy.mjMpasr) do
if 0 ~= ct % 2 then
return false
end
end
end
return true
end
local copy1 = {}
---生成麻将映射值
---@param mjs table<mjValue,count> @手牌
---@param min mjValue @最小
---@param max mjValue @最大
---@return number
local function isChannel(mjs,min,max)
local lis = table.hasToArr(mjs,copy1)
table.sort(lis)
local min = lis[1]
local max = lis[#lis]
local len = max - min
local int = 0
for v=min,max do
local c = mjs[v] or 0
if c > 0 then
local i = v-min+1
int = int + (10^(len-i+1))*c
end
end
return mapHuCards[int]
end
---无癞子有将对胡牌
---@param ufy mjUnify @信息
---@return boolean
function algor:nolaiziJiangHuCard(ufy)
local n2 = 0
for ji,jvs in ipairs(ufy.mjClass) do
if not table.empty(jvs) then
--数量检查-是否符合 3*n + 2
local gap = ufy.mjGapls[ji]
local m = gap.num % 3
if 1 == m then
--非3n+2
return false
elseif 2 == m then
--可能有将对
n2 = n2 + 1
end
--只能有一个将对
if n2 > 1 then
return false
end
--成朴检查
if self:isJoint(ji) then
--可以成顺
if not isChannel(jvs,gap.min,gap.max) then
return false
end
else
--不能成顺
for jv,jc in pairs(jvs) do
local md = jc % 3
--不成朴
if 1 == md then
return false
end
end
end
end
end
--检查刻子
return true
end
---癞子有将对胡牌
---@param ufy mjUnify @信息
---@return boolean
function algor:oklaiziJiangHuCard(ufy)
return true
end
return algor
|
vim.cmd([[
let g:vim_markdown_frontmatter = 1
let g:vim_markdown_strikethrough = 1
let g:vim_markdown_folding_disabled = 1
let g:vim_markdown_conceal = 1
let g:vim_markdown_conceal_code_blocks = 1
let g:vim_markdown_new_list_item_indent = 0
let g:vim_markdown_toc_autofit = 0
let g:vim_markdown_follow_anchor = 0
let g:vim_markdown_no_extensions_in_markdown = 1
let g:vim_markdown_edit_url_in = 'vsplit'
" let g:vim_markdown_fenced_languages = [
" \ 'c++=cpp',
" \ 'viml=vim',
" \ 'bash=sh',
" \ 'ini=dosini',
" \ 'js=javascript',
" \ 'json=javascript',
" \ 'jsx=javascriptreact',
" \ 'tsx=typescriptreact',
" \ 'docker=Dockerfile',
" \ 'makefile=make',
" \ 'py=python'
" \ ]
" --------------------------------------------"
" Plugin MarkdownPreview
" --------------------------------------------"
command! Pv :MarkdownPreview
]])
|
local ServiceManager = {}
local ServiceMap = {}
local index = 0
-- 一台服务区,只允许一个同名服务器
function ServiceManager.Add(name, uri)
local list = ServiceMap[name]
if not list then
list = {}
ServiceMap[name] = list
end
table.insert(list, uri)
end
function ServiceManager.Remove(name, uri)
local list = ServiceMap[name]
if list then
for k, v in ipairs(list) do
if v == uri then
table.remove(list, k)
break
end
end
end
end
function ServiceManager.GetAll()
return ServiceMap or {}
end
function ServiceManager.GetName()
for name, _ in pairs(ServiceMap) do
if name then
return name
end
end
return nil
end
function ServiceManager.Get(name)
local list = ServiceMap[name] or {}
if #list > 1 then
local id = index % #list + 1
index = index + 1
return list[id]
end
return list[1]
end
return ServiceManager
|
reasonsBB =
{
"#1 Trying to kill other civilians",
"#2 Trolling",
"#3 Misusing civilian bugs",
}
rsaPanel = guiCreateWindow(0.25, 0.19, 0.51, 0.62, "AuroraRPG - RSA Panel", true)
guiWindowSetSizable(rsaPanel, false)
guiSetAlpha(rsaPanel, 0.80)
guiSetVisible(rsaPanel, false)
rsaTabPanel = guiCreateTabPanel(0.01, 0.07, 0.97, 0.83, true, rsaPanel)
memberT = guiCreateTab("RSA Members", rsaTabPanel)
membersG = guiCreateGridList(0.01, 0.02, 0.98, 0.95, true, memberT)
guiGridListAddColumn(membersG, "Member account", 0.5)
guiGridListAddColumn(membersG, "Member level", 0.5)
managementTab = guiCreateTab("Management", rsaTabPanel)
playersG = guiCreateGridList(0.01, 0.03, 0.47, 0.94, true, managementTab)
guiGridListAddColumn(playersG, "Player name", 0.9)
punishP = guiCreateButton(0.48, 0.55, 0.50, 0.08, "Punish", true, managementTab)
ban = guiCreateRadioButton(0.49, 0.47, 0.50, 0.05, "Ban", true, managementTab)
kick = guiCreateRadioButton(0.49, 0.40, 0.50, 0.05, "Kick", true, managementTab)
warn = guiCreateRadioButton(0.49, 0.33, 0.50, 0.05, "Warn", true, managementTab)
guiRadioButtonSetSelected(warn, true)
reasonsB = guiCreateComboBox(0.48, 0.03, 0.50, 0.61, "", true, managementTab)
reasons = guiCreateEdit(0.48, 0.11, 0.50, 0.06, "Custom Reason", true, managementTab)
reasonCustom = guiCreateCheckBox(0.49, 0.28, 0.49, 0.04, "Custom reason", true, true, managementTab)
checkLogs = guiCreateButton(0.48, 0.67, 0.50, 0.08, "Check logs of player", true, managementTab)
logsT = guiCreateTab("Logs", rsaTabPanel)
logs = guiCreateGridList(6, 8, 617, 330, false, logsT)
guiGridListAddColumn(logs, "Log line", 0.9)
for i, v in ipairs(reasonsBB) do
guiComboBoxAddItem(reasonsB, v)
end
guiComboBoxSetSelected(reasonsB, 0)
closeButton = guiCreateButton(0.02, 0.90, 0.97, 0.07, "Close", true, rsaPanel)
function number_mode_function(elementChanged)
local newText = guiGetText(elementChanged)
if (newText == getElementData(source, "place_holder")) then
return false
end
if (not tonumber(newText)) then
guiSetText(elementChanged, "")
return false
end
if (tonumber(newText) < 0) then
guiSetText(elementChanged, "0")
return true
end
guiSetText(elementChanged, newText)
return true
end
function set_number_mode(guiElement)
addEventHandler("onClientGUIChanged", guiElement, number_mode_function)
end
function placeholder_function()
if (eventName == "onClientGUIFocus") then
local newText = guiGetText(source)
if (newText == getElementData(source, "place_holder")) then
guiSetText(source, "")
end
else
if (guiGetText(source) == "" and getElementData(source, "place_holder")) then
guiSetText(source, getElementData(source, "place_holder"))
end
end
end
function set_placeholder(guiElement)
addEventHandler("onClientGUIFocus", guiElement, placeholder_function, true)
addEventHandler("onClientGUIBlur", guiElement, placeholder_function, true)
setElementData(guiElement, "place_holder", guiGetText(guiElement))
end
--set_placeholder(time)
set_placeholder(reasons)
--set_number_mode(time)
function panel_toggle(rsa, level, log2s)
local guiV = not guiGetVisible(rsaPanel)
showCursor(guiV)
guiSetVisible(rsaPanel, guiV)
if (rsa) then
guiGridListClear(membersG)
for i, v in ipairs(rsa) do
guiGridListAddRow(membersG, v.accountName, v.level)
end
end
if (log2s) then
guiGridListClear(logs)
for i, v in ipairs(log2s) do
guiGridListAddRow(logs, v.date..' '..v.line)
end
end
if (level and level < 3) then
guiSetEnabled(ban, false)
end
guiGridListClear(playersG)
for i, v in ipairs(getElementsByType("player")) do
if (getPlayerTeam(v) == getTeamFromName("Civilian Workers")) then
guiGridListAddRow(playersG, getPlayerName(v))
end
end
end
addEvent("AURrsa.rsaP", true)
addEventHandler("AURrsa.rsaP", root, panel_toggle)
function handle_buttons(button)
if (button ~= "left") then
return false
end
if (source == closeButton) then
panel_toggle()
end
if (source == punishP) then
local r = guiGridListGetSelectedItem(playersG)
if (r == -1) then
outputChatBox("Please click")
return false
end
local t = guiGridListGetItemText(playersG, r, 1)
local playerName = getPlayerFromName(t)
if (not playerName) then
guiGridListClear(playersG)
for i, v in ipairs(getElementsByType("player")) do
if (getPlayerTeam(v) == getTeamFromName("Civilian Workers")) then
guiGridListAddRow(playersG, getPlayerName(v))
end
end
outputChatBox("Invalid player")
return false
end
local reason = guiComboBoxGetItemText(reasonsB, guiComboBoxGetSelected(reasonsB))
if (guiCheckBoxGetSelected(reasonCustom)) then
reason = guiGetText(reasons)
end
local t = "Warn"
if (guiRadioButtonGetSelected(ban)) then
t = "Ban"
elseif (guiRadioButtonGetSelected(kick)) then
t = "Kick"
end
triggerServerEvent("AURrsa.punish", localPlayer, playerName, 0, reason, t)
end
end
addEventHandler("onClientGUIClick", closeButton, handle_buttons, false)
addEventHandler("onClientGUIClick", punishP, handle_buttons, false)
|
--[[--ldoc desc
@Module DeployCardCtr.lua
@Author JasonLiu
Date: 2018-10-30 10:54:57
Last Modified by: JasonLiu
Last Modified time: 2018-10-31 16:07:23
]]
local DeployCardCtr = class("DeployCardCtr", cc.load("boyaa").mvc.BoyaaCtr);
local DeployCardView = require("app.demo.JasonLiu.module.deployCard.DeployCardView")
local PaiXingUtils = require("app.demo.JasonLiu.utils.PaiXingUtils")
function DeployCardCtr:ctor()
self:initDate()
self:initView()
end
--[[
@function initDate 初始化数据
]]
function DeployCardCtr:initDate()
self.data = {
card = {{0x2a,0x2b,0x1}, {0x06,0x06,0x06,0x29,0x35}, {9,0xa,0xb,0xc,0xd}}
}
end
--[[
@function initView 初始化View
]]
function DeployCardCtr:initView()
local DeployCardView = DeployCardView:create(self.data);
DeployCardView:bindCtr(self);
self:checkPaiXing()
end
--[[
@function updateCardsData 更新牌的数据
]]
function DeployCardCtr:updateCardsData()
local changeFlags = {}
for i, item in ipairs(self:getView():getCardsByteData()) do
for j, v in ipairs(item) do
if self.data.card[i][j] ~= v then
changeFlags[i] = true
end
end
end
self.data.card = self:getView():getCardsByteData()
self:checkPaiXing(changeFlags)
end
--[[
@function checkPaiXing 检查牌型
]]
function DeployCardCtr:checkPaiXing(changeFlags)
--检查牌型
local checkFlags = {}
for i, v in ipairs(self.data.card) do
local cards = {}
for i, v in ipairs(v) do
table.insert(cards, v)
end
local paixing, cards, weight = PaiXingUtils.check(cards)
table.insert(checkFlags, weight)
self:getView():updatePaiXing(i, paixing, cards)
if weight >= 5 and changeFlags and changeFlags[i] then
self:getView():runCardsShineAction(i, cards)
end
end
--检查牌型顺序
for i, v in ipairs(checkFlags) do
local flag = false
if i < #checkFlags then
if v <= checkFlags[i + 1] then
flag = true
end
else
if v >= checkFlags[i - 1] then
flag = true
end
end
self:getView():updateCheck(i, flag)
end
end
return DeployCardCtr;
|
local modpath = minetest.get_modpath(minetest.get_current_modname())
-- internationalization boilerplate
local S, NS = dofile(modpath.."/intllib.lua")
local schem_path = modpath.."/schematics/"
if minetest.get_modpath("namegen") then
namegen.parse_lines(io.lines(modpath.."/namegen_towns.cfg"))
end
-------------------------------------
-- Node initialization
local function fill_chest(pos)
-- fill chest
local inv = minetest.get_inventory( {type="node", pos=pos} )
-- always
inv:add_item("main", "default:apple "..math.random(1,3))
-- low value items
if math.random(0,1) < 1 then
inv:add_item("main", "farming:bread "..math.random(0,3))
inv:add_item("main", "default:steel_ingot "..math.random(0,3))
-- additional fillings when farming mod enabled
if minetest.get_modpath("farming") ~= nil and farming.mod == "redo" then
if math.random(0,1) < 1 then
inv:add_item("main", "farming:melon_slice "..math.random(0,3))
inv:add_item("main", "farming:carrot "..math.random(0,3))
inv:add_item("main", "farming:corn "..math.random(0,3))
end
end
end
-- medium value items
if math.random(0,3) < 1 then
inv:add_item("main", "default:pick_steel "..math.random(0,1))
inv:add_item("main", "default:pick_bronze "..math.random(0,1))
inv:add_item("main", "fire:flint_and_steel "..math.random(0,1))
inv:add_item("main", "bucket:bucket_empty "..math.random(0,1))
inv:add_item("main", "default:sword_steel "..math.random(0,1))
end
end
local function generate_book(pos, town_name)
local callbacks = {}
table.insert(callbacks, {func = settlements.generate_travel_guide, param1=pos, param2=town_name})
if settlements.generate_ledger then
table.insert(callbacks, {func = settlements.generate_ledger, param1="kings", param2=town_name})
end
local callback = callbacks[math.random(#callbacks)]
return callback.func(callback.param1, callback.param2)
end
local function fill_shelf(pos, town_name)
local inv = minetest.get_inventory( {type="node", pos=pos} )
for i = 1, math.random(2, 8) do
local book = generate_book(pos, town_name)
if book then
inv:add_item("books", book)
end
end
end
local generate_books = minetest.settings:get_bool("settlements_generate_books", true)
local initialize_node = function(pos, node, node_def, settlement_info)
if settlement_info.name and node.name == "default:sign_wall_steel" then
local meta = minetest.get_meta(pos)
meta:set_string("text", S("@1 Town Hall", settlement_info.name))
meta:set_string("infotext", S("@1 Town Hall", settlement_info.name))
end
-- when chest is found -> fill with stuff
if node.name == "default:chest" then
fill_chest(pos)
end
if generate_books and node.name == "default:bookshelf" then
fill_shelf(pos, settlement_info.name)
end
if minetest.get_item_group(node.name, "plant") > 0 then
minetest.get_node_timer(pos):start(1000) -- start crops growing
end
end
--------------------------------------------
-- Schematics
local townhall_schematic = {
name = "townhall",
schematic = dofile(schem_path.."medieval_townhall.lua"),
buffer = 2, -- buffer space around the building, footprint is treated as radius max(size.x, size.z) + buffer for spacing purposes
max_num = 0.1, -- This times the number of buildings in a settlement gives the maximum number of these buildings in a settlement.
-- So for example, 0.1 means at most 1 of these buildings in a 10-building settlement and 2 in a 20-building settlement.
replace_nodes_optional = true, -- If true, default:cobble will be replaced with a random wall material
initialize_node = initialize_node, -- allows additional post-creation actions to be executed on schematic nodes once they're constructed
}
local kingsmarket_schematic = {
name = "kingsmarket",
schematic = dofile(schem_path.."medieval_kingsmarket.lua"),
buffer = 1,
max_num = 0.1,
replace_nodes_optional = true,
initialize_node = initialize_node,
}
-- list of schematics
local schematic_table = {
{
name = "well",
schematic = dofile(schem_path.."medieval_well.lua"),
buffer = 2,
max_num = 0.045,
height_adjust = -2, -- adjusts the y axis of where the schematic is built, to allow for "basement" stuff
},
{
name = "hut",
schematic = dofile(schem_path.."medieval_hut.lua"),
buffer = 1,
max_num = 0.9,
replace_nodes_optional = true,
initialize_node = initialize_node,
},
{
name = "garden",
schematic = dofile(schem_path.."medieval_garden.lua"),
max_num = 0.1,
initialize_node = initialize_node,
},
{
name = "lamp",
schematic = dofile(schem_path.."medieval_lamp.lua"),
buffer = 3,
max_num = 0.05,
},
{
name = "tower",
schematic = dofile(schem_path.."medieval_tower.lua"),
buffer = 3,
max_num = 0.055,
},
{
name = "church",
schematic = dofile(schem_path.."medieval_church.lua"),
buffer = 2,
max_num = 0.075,
},
{
name = "blacksmith",
schematic = dofile(schem_path.."medieval_blacksmith.lua"),
buffer = 2,
max_num = 0.050,
},
kingsmarket_schematic,
{
name = "nightmarket",
schematic = dofile(schem_path.."medieval_nightmarket.lua"),
buffer = 1,
max_num = 0.025,
replace_nodes_optional = true,
initialize_node = initialize_node,
},
}
local medieval_settlements = {
-- this settlement will be placed on nodes with this surface material type.
surface_materials = {
"default:dirt",
"default:dirt_with_grass",
"default:dry_dirt_with_dry_grass",
"default:dirt_with_snow",
"default:dirt_with_dry_grass",
"default:dirt_with_coniferous_litter",
"default:sand",
"default:silver_sand",
"default:snow_block",
},
-- TODO: add a biome list. The tricky part here is, what if a biome list but not a surface materials list is provided?
-- How to find the surface, and how to know what to replace surface material nodes with in the schematic?
-- nodes in all schematics will be replaced with these nodes, or a randomly-selected node
-- from a list of choices if a list is provided
replacements = {
["default:junglewood"] = "settlements:junglewood",
},
-- Affected by per-building replace_nodes flag
replacements_optional = {
["default:cobble"] = {
"default:junglewood",
"default:pine_wood",
"default:wood",
"default:aspen_wood",
"default:acacia_wood",
"default:stonebrick",
"default:cobble",
"default:desert_stonebrick",
"default:desert_cobble",
"default:sandstone",
},
},
-- This node will be replaced with the surface material of the location the building is placed on.
replace_with_surface_material = "default:dirt_with_grass",
-- Trees often interfere with surface detection. These nodes will be ignored when detecting surface level.
ignore_surface_materials = {
"default:tree",
"default:jungletree",
"default:pine_tree",
"default:acacia_tree",
"default:aspen_tree",
"default:bush_stem",
"default:bush_leaves",
"default:acacia_bush_stem",
"default:acacia_bush_leaves",
"default:pine_bush_stem",
"default:pine_bush_needles",
"default:blueberry_bush_leaves_with_berries",
"default:blueberry_bush_leaves",
},
platform_shallow = "default:dirt",
platform_deep = "default:stone",
path_material = "default:gravel",
schematics = schematic_table,
-- Select one of these to form the center of town. If not defined, one will be picked from the regular schematic table
central_schematics = {
townhall_schematic,
kingsmarket_schematic,
},
building_count_min = 5,
building_count_max = 25,
altitude_min = 2,
altitude_max = 300,
generate_name = function(pos)
if minetest.get_modpath("namegen") then
return namegen.generate("settlement_towns")
end
return S("Town")
end,
generate_book = generate_book,
}
settlements.register_settlement("medieval", medieval_settlements)
-- register block for npc spawn
local function deep_copy(table_in)
local table_out = {}
for index, value in pairs(table_in) do
if type(value) == "table" then
table_out[index] = deep_copy(value)
else
table_out[index] = value
end
end
return table_out
end
minetest.register_alias("settlements:junglewood", "settlements_medieval:junglewood")
local junglewood_def = deep_copy(minetest.registered_nodes["default:junglewood"])
minetest.register_node("settlements_medieval:junglewood", junglewood_def)
-- register inhabitants
if minetest.get_modpath("mobs_npc") ~= nil then
mobs:register_spawn("mobs_npc:npc", --name
{"settlements_medieval:junglewood"}, --nodes
20, --max_light
0, --min_light
20, --chance
2, --active_object_count
31000, --max_height
nil) --day_toggle
mobs:register_spawn("mobs_npc:trader", --name
{"settlements_medieval:junglewood"}, --nodes
20, --max_light
0, --min_light
20, --chance
2, --active_object_count
31000, --max_height
nil)--day_toggle
end
|
local LibFader = Wheel:Set("LibFader", 52)
if (not LibFader) then
return
end
local LibClientBuild = Wheel("LibClientBuild")
assert(LibClientBuild, "LibFader requires LibClientBuild to be loaded.")
local LibFrame = Wheel("LibFrame")
assert(LibFrame, "LibFader requires LibFrame to be loaded.")
local LibEvent = Wheel("LibEvent")
assert(LibEvent, "LibFader requires LibEvent to be loaded.")
local LibMessage = Wheel("LibMessage")
assert(LibMessage, "LibFader requires LibMessage to be loaded.")
local LibModule = Wheel("LibModule")
assert(LibModule, "LibFader requires LibModule to be loaded.")
local LibAura = Wheel("LibAura")
assert(LibAura, "LibFader requires LibAura to be loaded.")
LibFrame:Embed(LibFader)
LibEvent:Embed(LibFader)
LibMessage:Embed(LibFader)
LibAura:Embed(LibFader)
-- Lua API
local assert = assert
local debugstack = debugstack
local error = error
local ipairs = ipairs
local pairs = pairs
local select = select
local setmetatable = setmetatable
local string_format = string.format
local string_join = string.join
local string_match = string.match
local table_concat = table.concat
local table_insert = table.insert
local type = type
-- WoW API
local CursorHasItem = CursorHasItem
local CursorHasSpell = CursorHasSpell
local GetCursorInfo = GetCursorInfo
local InCombatLockdown = InCombatLockdown
local IsInGroup = IsInGroup
local IsInInstance = IsInInstance
local RegisterAttributeDriver = RegisterAttributeDriver
local SpellFlyout = SpellFlyout
local UnitExists = UnitExists
local UnitHealth = UnitHealth
local UnitHealthMax = UnitHealthMax
local UnitPower = UnitPower
local UnitPowerMax = UnitPowerMax
local UnitPowerType = UnitPowerType
local UnregisterAttributeDriver = UnregisterAttributeDriver
-- Constants for client version
local IsClassic = LibClientBuild:IsClassic()
local IsTBC = LibClientBuild:IsTBC()
local IsRetail = LibClientBuild:IsRetail()
-- Sourced from FrameXML/BuffFrame.lua
local DEBUFF_MAX_DISPLAY = DEBUFF_MAX_DISPLAY
-- Sourced from BlizzardInterfaceResources/Resources/EnumerationTables.lua
local POWER_TYPE_MANA = Enum.PowerType.Mana
-- Player Constants
local _,playerClass = UnitClass("player")
local playerLevel = UnitLevel("player")
-- Library registries
LibFader.embeds = LibFader.embeds or {}
LibFader.objects = LibFader.objects or {} -- all currently registered objects
LibFader.defaultAlphas = LibFader.defaultAlphas or {} -- maximum opacity for registered objects
LibFader.data = LibFader.data or {} -- various global data
LibFader.frame = LibFader.frame or LibFader:CreateFrame("Frame", nil, "UICenter")
LibFader.frame._owner = LibFader
LibFader.FORCED = nil -- we want this disabled from the start
-- Speed!
local Data = LibFader.data
local Objects = LibFader.objects
-- These are debuffs which are ignored,
-- allowing the interface to fade out even though they are present.
local safeDebuffs
if (IsClassic or IsTBC) then
safeDebuffs = {
-- deserters
[ 26013] = true, -- PvP Deserter
[ 71041] = true, -- Dungeon Deserter
[144075] = true, -- Dungeon Deserter
[ 99413] = true, -- Deserter (no idea what type)
-- heal cooldowns
[ 11196] = true, -- Recently Bandaged
[ 6788] = true, -- Weakened Soul
-- burst cooldowns
[ 57723] = true, -- Exhaustion from Heroism
[ 95809] = true, -- Insanity from Ancient Hysteria
[ 57724] = true, -- Sated from Bloodlust
[ 80354] = true, -- Temporal Displacement from Time Warp
-- Resources
[ 36032] = true, -- Arcane Charges
-- Seasonal
[ 26680] = true, -- Adored "You have received a gift of adoration!"
[ 42146] = true, -- Brewfest Racing Ram Aura
[ 26898] = true, -- Heartbroken "You have been rejected and can no longer give Love Tokens!"
[ 71909] = true, -- Heartbroken "Suffering from a broken heart."
[ 43052] = true, -- Ram Fatigue "Your racing ram is fatigued."
[ 69438] = true, -- Sample Satisfaction (some love crap)
[ 24755] = true -- Tricked or Treated (Hallow's End)
}
elseif (IsRetail) then
safeDebuffs = {
-- deserters
[ 26013] = true, -- PvP Deserter
[ 71041] = true, -- Dungeon Deserter
[144075] = true, -- Dungeon Deserter
[ 99413] = true, -- Deserter (no idea what type)
[158263] = true, -- Craven "You left an Arena without entering combat and must wait before entering another one." -- added 6.0.1
[194958] = true, -- Ashran Deserter
[178394] = true, -- Honorless Target
-- heal cooldowns
[178857] = true, -- Contender (Gladiator's Sanctum buff)
[ 11196] = true, -- Recently Bandaged
[ 6788] = true, -- Weakened Soul
-- burst cooldowns
[ 57723] = true, -- Exhaustion from Heroism
[264689] = true, -- Fatigued (cannot benefit from Primal Rage or similar) -- added 8.0.1 (?)
[ 95809] = true, -- Insanity from Ancient Hysteria
[ 57724] = true, -- Sated from Bloodlust
[ 80354] = true, -- Temporal Displacement from Time Warp
-- Resources
[ 36032] = true, -- Arcane Charges
-- Seasonal
[ 26680] = true, -- Adored "You have received a gift of adoration!"
[ 42146] = true, -- Brewfest Racing Ram Aura
[ 26898] = true, -- Heartbroken "You have been rejected and can no longer give Love Tokens!"
[ 71909] = true, -- Heartbroken "Suffering from a broken heart."
[ 43052] = true, -- Ram Fatigue "Your racing ram is fatigued."
[ 69438] = true, -- Sample Satisfaction (some love crap)
-- WoD weird debuffs
[174958] = true, -- Acid Trail "Riding on the slippery back of a Goren!" -- added 6.0.1
[160510] = true, -- Encroaching Darkness "Something is watching you..." -- some zone in WoD
[156154] = true, -- Might of Ango'rosh -- WoD, Talador zone buff
-- WoD fish debuffs
[174524] = true, -- Awesomefish
[174528] = true, -- Grieferfish
-- WoD Follower deaths
[173660] = true, -- Aeda Brightdawn
[173657] = true, -- Defender Illona
[173658] = true, -- Delvar Ironfist
[173976] = true, -- Leorajh
[173659] = true, -- Talonpriest Ishaal
[173649] = true, -- Tormmok
[173661] = true, -- Vivianne
-- BfA
[271571] = true, -- Ready! (Shell Game World Quests)
-- Shadowlands
[320227] = true, -- Depleted Shell (Conduit)
[304510] = true, -- Endmire (Revendreth Area Debuff)
[329492] = true, -- Slumberwood Band (Item Effect)
[304511] = true, -- Weakened Soul (Revendreth Area Debuff, comes along with Endmire)
[340556] = true, -- Well-Honed Instincts (Conduit)
}
end
-- These are buffs that will keep the interface visible while active.
-- This table accepts both spellID and spellName as keys.
local unsafeBuffs = {
[(GetSpellInfo(430))] = true, -- Drink
[(GetSpellInfo(433))] = true -- Food
}
-- Syntax check
local check = function(value, num, ...)
assert(type(num) == "number", ("Bad argument #%.0f to '%s': %s expected, got %s"):format(2, "Check", "number", type(num)))
for i = 1,select("#", ...) do
if type(value) == select(i, ...) then
return
end
end
local types = string_join(", ", ...)
local name = string_match(debugstack(2, 2, 0), ": in function [`<](.-)['>]")
error(string_format("Bad argument #%.0f to '%s': %s expected, got %s", num, name, types, type(value)), 3)
end
local InitiateDelay = function(self, elapsed)
return self._owner:InitiateDelay(elapsed)
end
local OnUpdate = function(self, elapsed)
return self._owner:OnUpdate(elapsed)
end
local SetToDefaultAlpha = function(object)
object:SetAlpha(Objects[object])
end
local SetToZeroAlpha = function(object)
object:SetAlpha(0)
end
local SetToProgressAlpha = function(object, progress)
object:SetAlpha(Objects[object] * progress)
end
-- Return the current fader state, if any
LibFader.GetCurrentFaderState = function(self)
return LibFader.achievedState
end
-- Register an object with a fade manager
LibFader.RegisterObjectFade = function(self, object)
-- Don't re-register existing objects,
-- as that will overwrite the default alpha value
-- which in turn can lead to max alphas of zero.
if Objects[object] then
return
end
Objects[object] = object:GetAlpha()
end
-- Unregister an object from a fade manager, and hard reset its alpha
LibFader.UnregisterObjectFade = function(self, object)
if (not Objects[object]) then
return
end
-- Retrieve original alpha
local alpha = Objects[object]
-- Remove the object from the manager
Objects[object] = nil
-- Restore the original alpha
object:SetAlpha(alpha)
end
-- Force all faded objects visible
LibFader.SetObjectFadeOverride = function(self, force)
if (force) then
LibFader.FORCED = true
else
LibFader.FORCED = nil
end
end
-- Prevent objects from fading out in instances
LibFader.DisableInstanceFading = function(self, fade)
if (fade) then
Data.disableInstanceFade = true
else
Data.disableInstanceFade = false
end
end
-- Prevent objects from fading out while grouped
LibFader.DisableGroupFading = function(self, fade)
if (fade) then
Data.disableGroupFade = true
else
Data.disableGroupFade = false
end
end
-- Set the default alpha of an opaque object
LibFader.SetObjectAlpha = function(self, object, alpha)
check(alpha, 2, "number")
if (not Objects[object]) then
return
end
Objects[object] = alpha
end
LibFader.CheckMouse = function(self)
if (SpellFlyout and SpellFlyout:IsVisible()) then
Data.mouseOver = true
return true
end
for object in pairs(Objects) do
if (object and not object.ignoreMouse) then
if (object.GetExplorerHitRects) then
local top, bottom, left, right = object:GetExplorerHitRects()
if (object:IsMouseOver(top, bottom, left, right) and object:IsVisible()) then
Data.mouseOver = true
return true
end
else
if (object:IsMouseOver() and object:IsVisible()) then
Data.mouseOver = true
return true
end
end
end
end
Data.mouseOver = nil
end
LibFader.CheckCursor = function(self)
if (CursorHasSpell() or CursorHasItem()) then
Data.busyCursor = true
return
end
-- other values: money, merchant
local cursor = GetCursorInfo()
if (cursor == "petaction")
or (cursor == "spell")
or (cursor == "macro")
or (cursor == "mount")
or (cursor == "item") then
Data.busyCursor = true
return
end
Data.busyCursor = nil
end
LibFader.CheckAuras = function(self)
for i = 1, BUFF_MAX_DISPLAY do
local name, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossDebuff, isCastByPlayer, nameplateShowAll, timeMod, value1, value2, value3 = LibFader:GetUnitBuff("player", i)
-- No name means no more debuffs matching the filter
if (not name) then
break
end
-- Set the flag and return if a filtered buff is encountered
if (unsafeBuffs[spellId]) or (unsafeBuffs[name]) then
Data.badAura = true
return
end
end
for i = 1, DEBUFF_MAX_DISPLAY do
local name, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossDebuff, isCastByPlayer, nameplateShowAll, timeMod, value1, value2, value3 = LibFader:GetUnitDebuff("player", i)
-- No name means no more debuffs matching the filter
if (not name) then
break
end
-- Set the flag and return if a non-filtered debuff is encountered
if (not safeDebuffs[spellId]) then
Data.badAura = true
return
end
end
Data.badAura = nil
end
LibFader.CheckHealth = function(self)
local min = UnitHealth("player") or 0
local max = UnitHealthMax("player") or 0
if (max > 0) and (min/max < .9) then
Data.lowHealth = true
return
end
Data.lowHealth = nil
end
LibFader.CheckPower = function(self)
local powerID, powerType = UnitPowerType("player")
if (powerType == "MANA") then
local min = UnitPower("player") or 0
local max = UnitPowerMax("player") or 0
if (max > 0) and (min/max < .75) then
Data.lowPower = true
return
end
elseif (powerType == "ENERGY" or powerType == "FOCUS") then
local min = UnitPower("player") or 0
local max = UnitPowerMax("player") or 0
if (max > 0) and (min/max < .5) then
Data.lowPower = true
return
end
if (playerClass == "DRUID") then
min = UnitPower("player", POWER_TYPE_MANA) or 0
max = UnitPowerMax("player", POWER_TYPE_MANA) or 0
if (max > 0) and (min/max < .5) then
Data.lowPower = true
return
end
end
end
Data.lowPower = nil
end
LibFader.CheckVehicle = function(self)
--if (UnitInVehicle("player") or HasVehicleActionBar()) then
if (HasVehicleActionBar()) then
Data.inVehicle = true
return
end
Data.inVehicle = nil
end
LibFader.CheckOverride = function(self)
if (HasOverrideActionBar() or HasTempShapeshiftActionBar()) then
Data.hasOverride = true
return
end
Data.hasOverride = nil
end
LibFader.CheckPossess = function(self)
if (IsPossessBarVisible()) then
Data.hasPossess = true
return
end
Data.hasPossess = nil
end
LibFader.CheckTarget = function(self)
if UnitExists("target") then
Data.hasTarget = true
return
end
Data.hasTarget = nil
end
LibFader.CheckFocus = function(self)
if UnitExists("focus") then
Data.hasFocus = true
return
end
Data.hasFocus = nil
end
LibFader.CheckGroup = function(self)
if IsInGroup() then
Data.inGroup = true
return
end
Data.inGroup = nil
end
LibFader.CheckInstance = function(self)
if IsInInstance() then
Data.inInstance = true
return
end
Data.inInstance = nil
end
LibFader.OnEvent = function(self, event, ...)
if (event == "PLAYER_ENTERING_WORLD") then
local isInitialLogin, isReloadingUi = ...
Data.inCombat = InCombatLockdown()
self:CheckInstance()
self:CheckGroup()
self:CheckTarget()
if (IsRetail or IsTBC) then
self:CheckFocus()
end
if (IsRetail) then
self:CheckVehicle()
self:CheckOverride()
self:CheckPossess()
end
self:CheckHealth()
self:CheckPower()
self:CheckAuras()
self:CheckCursor()
self:ForAll(SetToDefaultAlpha)
self.FORCED = nil
self.elapsed = 0
-- Attempt to only reset fader state at startup and manual reloads.
if (isInitialLogin) or (isReloadingUi) then
self.frame:SetScript("OnUpdate", InitiateDelay)
else
self:ValidateTimerData()
self.frame:SetScript("OnUpdate", OnUpdate)
end
elseif (event == "PLAYER_LEAVING_WORLD") then
-- Only needed this when we added the initial delay on startup/reloads
-- Now it's redundant.
-- If we could check if this was leaving and instance or reloading,
-- we could do something here. But we can't. So we won't.
--local oldState = self.achievedState
--self.achievedState = nil
--if (oldState) then
-- LibModule:AddDebugMessageFormatted(string_format("FaderState lost: '%s'", oldState))
-- self:SendMessage("GP_FADER_STATE_LOST", oldState)
--end
elseif (event == "PLAYER_LEVEL_UP") then
local level = ...
if (level and (level ~= playerLevel)) then
playerLevel = level
else
local level = UnitLevel("player")
if (not playerLevel) or (playerLevel < level) then
playerLevel = level
end
end
elseif (event == "PLAYER_REGEN_DISABLED") then
Data.inCombat = true
elseif (event == "PLAYER_REGEN_ENABLED") then
Data.inCombat = false
elseif (event == "PLAYER_TARGET_CHANGED") then
self:CheckTarget()
elseif (event == "PLAYER_FOCUS_CHANGED") then
self:CheckFocus()
elseif (event == "GROUP_ROSTER_UPDATE") then
self:CheckGroup()
elseif (event == "UPDATE_POSSESS_BAR") then
self:CheckPossess()
elseif (event == "UPDATE_OVERRIDE_ACTIONBAR") then
self:CheckOverride()
elseif (event == "UNIT_ENTERING_VEHICLE")
or (event == "UNIT_ENTERED_VEHICLE")
or (event == "UNIT_EXITING_VEHICLE")
or (event == "UNIT_EXITED_VEHICLE")
or (event == "UPDATE_VEHICLE_ACTIONBAR") then
self:CheckVehicle()
elseif (event == "UNIT_POWER_FREQUENT")
or (event == "UNIT_DISPLAYPOWER") then
self:CheckPower()
elseif (event == "UNIT_HEALTH_FREQUENT") or (event == "UNIT_HEALTH") then
self:CheckHealth()
elseif (event == "UNIT_AURA") then
self:CheckAuras()
elseif (event == "ZONE_CHANGED_NEW_AREA") then
self:CheckInstance()
end
end
LibFader.ClearTimerData = function(self)
self.elapsed = 0
self.totalElapsed = 0
self.totalElapsedIn = 0
self.totalElapsedOut = 0
self.totalDurationIn = self.totalDurationInOverride or .15
self.totalDurationOut = self.totalDurationOutOverride or .75
self.totalDurationHold = self.totalDurationHoldOverride or 0
self.totalDurationHoldCounter = 0
self.currentPosition = 1
self.achievedState = "peril"
end
LibFader.ValidateTimerData = function(self)
self.elapsed = 0
self.totalElapsed = 0
self.totalElapsedIn = 0
self.totalElapsedOut = 0
self.totalDurationIn = self.totalDurationInOverride or .15
self.totalDurationOut = self.totalDurationOutOverride or .75
self.totalDurationHold = self.totalDurationHoldOverride or 0
self.totalDurationHoldCounter = 0
self.currentPosition = self.currentPosition or 1
self.achievedState = self.achievedState or "peril"
end
LibFader.SetObjectFadeDurationIn = function(self, seconds)
check(seconds, 1, "number")
LibFader.totalDurationIn = seconds
LibFader.totalDurationInOverride = seconds
end
LibFader.SetObjectFadeDurationOut = function(self, seconds)
check(seconds, 1, "number")
LibFader.totalDurationOut = seconds
LibFader.totalDurationOutOverride = seconds
end
LibFader.SetObjectFadeHold = function(self, seconds)
check(seconds, 1, "number")
LibFader.totalDurationHold = seconds
LibFader.totalDurationHoldOverride = seconds
end
LibFader.InitiateDelay = function(self, elapsed)
self.elapsed = self.elapsed + elapsed
-- Enforce a delay at the start
if (self.elapsed < 15) then
return
end
-- Clearout everything
self:ClearTimerData()
-- Debug output
LibModule:AddDebugMessageFormatted(string_format("FaderState achieved: '%s'", self.achievedState))
-- Notify the environment
self:SendMessage("GP_FADER_STATE_ACHIEVED", self.achievedState)
-- Validate values and return to standard updates
self:ValidateTimerData()
self.frame:SetScript("OnUpdate", OnUpdate)
end
LibFader.OnUpdate = function(self, elapsed)
self.elapsed = self.elapsed + elapsed
-- Throttle any and all updates
if (self.elapsed < 1/60) then
return
end
local oldState = self.achievedState
if self.FORCED
or Data.inCombat
or Data.hasTarget
--or Data.hasFocus
or (Data.inGroup and Data.disableGroupFade)
or Data.hasOverride
or Data.hasPossess
or Data.inVehicle
or (Data.inInstance and Data.disableInstanceFade)
or Data.lowHealth
or Data.lowPower
or Data.busyCursor
or Data.badAura
or self:CheckMouse() then
if (self.currentPosition == 1) and (self.achievedState == "peril") then
self.elapsed = 0
return
end
local progress = self.elapsed / self.totalDurationIn
if ((self.currentPosition + progress) < 1) then
self.currentPosition = self.currentPosition + progress
self.achievedState = nil
self:ForAll(SetToProgressAlpha, self.currentPosition)
if (oldState) then
LibModule:AddDebugMessageFormatted(string_format("FaderState lost: '%s'", oldState))
self:SendMessage("GP_FADER_STATE_LOST", oldState)
end
else
self.currentPosition = 1
self.achievedState = "peril"
self.totalDurationHoldCounter = self.totalDurationHold
self:ForAll(SetToDefaultAlpha)
if (oldState ~= self.achievedState) then
LibModule:AddDebugMessageFormatted(string_format("FaderState achieved: '%s'", self.achievedState))
self:SendMessage("GP_FADER_STATE_ACHIEVED", self.achievedState)
end
end
else
if (self.currentPosition == 1) and (self.achievedState == "peril") and (self.totalDurationHoldCounter > 0) then
if ((self.totalDurationHoldCounter - self.elapsed) > 0) then
self.totalDurationHoldCounter = self.totalDurationHoldCounter - self.elapsed
self.elapsed = 0
return
else
self.totalDurationHoldCounter = 0
end
end
local progress = self.elapsed / self.totalDurationOut
if ((self.currentPosition - progress) > 0) then
self.currentPosition = self.currentPosition - progress
self.achievedState = nil
self:ForAll(SetToProgressAlpha, self.currentPosition)
if (oldState) then
LibModule:AddDebugMessageFormatted(string_format("FaderState lost: '%s'", oldState))
self:SendMessage("GP_FADER_STATE_LOST", oldState)
end
else
self.currentPosition = 0
self.achievedState = "safe"
self:ForAll(SetToZeroAlpha)
if (oldState ~= self.achievedState) then
LibModule:AddDebugMessageFormatted(string_format("FaderState achieved: '%s'", self.achievedState))
self:SendMessage("GP_FADER_STATE_ACHIEVED", self.achievedState)
end
end
end
self.elapsed = 0
end
LibFader.ForAll = function(self, method, ...)
for object in pairs(Objects) do
if (type(method) == "string") then
object[method](object, ...)
elseif (type(method) == "function") then
method(object, ...)
end
end
end
local embedMethods = {
SetObjectFadeHold = true,
SetObjectFadeDurationIn = true,
SetObjectFadeDurationOut = true,
SetObjectFadeOverride = true,
RegisterObjectFade = true,
UnregisterObjectFade = true,
DisableInstanceFading = true,
GetCurrentFaderState = true
}
LibFader.Embed = function(self, target)
for method in pairs(embedMethods) do
target[method] = self[method]
end
self.embeds[target] = true
return target
end
-- Upgrade existing embeds, if any
for target in pairs(LibFader.embeds) do
LibFader:Embed(target)
end
LibFader:RegisterEvent("ZONE_CHANGED_NEW_AREA", "OnEvent")
LibFader:RegisterEvent("PLAYER_ENTERING_WORLD", "OnEvent")
LibFader:RegisterEvent("PLAYER_LEAVING_WORLD", "OnEvent")
LibFader:RegisterEvent("PLAYER_LEVEL_UP", "OnEvent")
LibFader:RegisterEvent("PLAYER_REGEN_DISABLED", "OnEvent")
LibFader:RegisterEvent("PLAYER_REGEN_ENABLED", "OnEvent")
LibFader:RegisterEvent("PLAYER_TARGET_CHANGED", "OnEvent")
LibFader:RegisterEvent("GROUP_ROSTER_UPDATE", "OnEvent")
LibFader:RegisterUnitEvent("UNIT_HEALTH", "OnEvent", "player")
LibFader:RegisterUnitEvent("UNIT_POWER_FREQUENT", "OnEvent", "player")
LibFader:RegisterUnitEvent("UNIT_DISPLAYPOWER", "OnEvent", "player")
LibFader:RegisterUnitEvent("UNIT_AURA", "OnEvent", "player", "vehicle")
if (IsRetail) then
LibFader:RegisterEvent("PLAYER_FOCUS_CHANGED", "OnEvent")
LibFader:RegisterEvent("UPDATE_OVERRIDE_ACTIONBAR", "OnEvent")
LibFader:RegisterEvent("UPDATE_POSSESS_BAR", "OnEvent")
LibFader:RegisterEvent("UPDATE_VEHICLE_ACTIONBAR", "OnEvent", "player")
LibFader:RegisterUnitEvent("UNIT_ENTERED_VEHICLE", "OnEvent", "player")
LibFader:RegisterUnitEvent("UNIT_ENTERING_VEHICLE", "OnEvent", "player")
LibFader:RegisterUnitEvent("UNIT_EXITED_VEHICLE", "OnEvent", "player")
LibFader:RegisterUnitEvent("UNIT_EXITING_VEHICLE", "OnEvent", "player")
end
|
local M = {}
-- (arch)
-- pacman -S shfmt shellcheck
-- (mac)
-- brew install shfmt
-- (npm)
-- npm i -g markdownlint-cli
-- (rust)
-- cargo install stylua
function M.setup()
local nls = require('null-ls')
nls.config({
debug = true,
debounce = 150,
save_after_format = false,
sources = {
-- formatters
-- nls.builtins.formatting.prettierd,
nls.builtins.formatting.stylua.with({
extra_args = {
'--config-path',
vim.fn.expand('~/.config/nvim/.stylua'),
'-',
},
}),
-- nls.builtins.formatting.eslint_d,
nls.builtins.formatting.shfmt.with({
extra_args = { '-i', '2', '-ci' },
}),
nls.builtins.formatting.sqlformat.with({
extra_args = { '-r' },
}),
-- nls.builtins.formatting.phpcsfixer.with({
-- command = "php-cs-fixer",
-- }),
-- diagnostics
nls.builtins.diagnostics.shellcheck.with({
condition = function()
local filename_exclude = {
'.*%.env$',
}
local full_name = vim.api.nvim_buf_get_name(0)
for _, pattern in ipairs(filename_exclude) do
if string.match(full_name, pattern) then
return false
end
end
return true
end,
}),
nls.builtins.diagnostics.markdownlint,
-- nls.builtins.diagnostics.selene,
-- code_actions
nls.builtins.code_actions.gitsigns,
},
})
end
function M.has_formatter(ft)
local config = require('null-ls.config').get()
local formatters = config._generators['NULL_LS_FORMATTING']
for _, f in ipairs(formatters) do
if vim.tbl_contains(f.filetypes, ft) then
return true
end
end
end
return M
|
function menu_init()
menu_time = 0
GAME_STATES[STATE][2] = false
selected = 1
transitioning = false
end
function menu_update()
menu_time += FSPEED
local ch = 0
if(btnp(2)) ch -= 1
if(btnp(3)) ch += 1
if(ch != 0) then
menu_time = 0
selected = clamp(selected + ch, 1, #GAME_STATES-1)
end
if(btnp(4)) then
if(#GAME_STATES[selected+1] == 5) then
STATE = selected + 1
transitioning = true
_update()
end
end
end
function menu_draw()
cls()
circ(2,2,2,kGREEN)
circ(2,125,2,kGREEN)
circ(125,2,2,kGREEN)
circ(125,125,2,kGREEN)
line(5, 128-5, 128-5, 128-5, kGREEN)
line(5, 5, 128-5, 5, kGREEN)
line(5, 5, 5, 128-5, kGREEN)
line(128-5, 5, 128-5, 128-5, kGREEN)
print("neutrino olympics", 28, 16, kSLATE)
line(30, 22, 92, 22, kSLATE)
for I = 2, #GAME_STATES do
local menu_it = (I-1)
print(menu_it..": "..GAME_STATES[I][1], 24, 24 + 8*menu_it,
(menu_it == selected) and
(menu_time < 1/2) and kWHITE or kSLATE)
end
menu_time = menu_time % 1
print("\131/\148 : select, \142: choose",8,116,kWHITE)
end
GAME_STATES = {
{"MENU", true, menu_init, menu_update, menu_draw},
{"linacCEL"},
{"synch", true, synch_init, synch_update, synch_draw},
{"focus", },
{"decay", true, decay_init, decay_update, decay_draw },
{"interact"},
{"oscillate", },
{"zoo", true, zoo_init, zoo_update, zoo_draw},
}
function _init()
STATE = 1
end
function _update()
if (GAME_STATES[STATE][2]) GAME_STATES[STATE][3]()
GAME_STATES[STATE][4](transitioning)
transitioning = false
end
function _draw()
GAME_STATES[STATE][5]()
show_vmachine_stats(10, 0, kWHITE)
end
|
module("TaskEntity", package.seeall)
setmetatable(TaskEntity, {__index=XEntity})
function new(id)
local entity = {
}
setmetatable(entity, {__index=TaskEntity})
entity:Init(id)
return entity
end
function Init(self, id)
XEntity.Init(self, id)
self.tasks = {}
self.current = self:Create(resmng.TASK_DEMO)
end
function Create(self, id)
local task = self:Query(id)
if task then
ELOG("Can't add task id(%s)", tostring(id))
else
task = TaskItem.new(id)
table.insert(self.tasks,
task)
end
return task
end
function AddTask(self, id)
local task = self:Query(id)
if task then
return task
end
return self:Create(id)
end
function Query(self, id)
for idx, task in ipairs(self.tasks) do
if task:ID() == id then
return task
end
end
end
function GetCurrent(self)
return self.current
end
function Remove(self, id)
for idx, task in ipairs(self.tasks) do
if task:ID() == id then
table.remove(self.tasks, idx)
break
end
end
end
function Reset(self)
self.tasks = {}
self.current = nil
end
|
object_tangible_food_generic_dessert_smugglers_delight = object_tangible_food_generic_shared_dessert_smugglers_delight:new {
}
ObjectTemplates:addTemplate(object_tangible_food_generic_dessert_smugglers_delight, "object/tangible/food/generic/dessert_smugglers_delight.iff")
|
local debug = false
--@debug@
debug = true
--@end-debug@
local L = LibStub("AceLocale-3.0"):NewLocale("DrDamage", "enUS", true, debug)
--@localization(locale="enUS", format="lua_additive_table", same-key-is-true=true)@
|
local comp=require("component")
local thread=require("thread")
local share={comp:{}}
-- DEBUG: 0 INFO: 1 WARN 2 ERROR 3
function log(...)
local a={...}
local t=nil
local m=""
for i,v in ipairs(a) do
if i==0 then t=v
elseif i==1 then m=m..v
else m=m.." "..v
end
end
-- TODO: add type
print(m)
end
function setup()
if not comp.isAvailable("internet") then
log(2,"Internet component not available.")
else
share.comp.inet=comp.internet
if not share.comp.inet.isHttpEnabled() then
log(2,"This server didn't allow http access.")
share.comp.inet=nil
end
end
end
function fileExists(file)
local f = io.open(file, "rb")
if f then f:close() end
return f ~= nil
end
function main()
if not fileExists("config.json") then
end
share.tListener=thread.create(tListener)
end
function tListener()
log(1, "")
end
setup()
main()
|
-- FUNCTIONAL
local Q = require 'Q'
require 'Q/UTILS/lua/strict'
local eigen = require 'Q/OPERATORS/PCA/lua/eigen'
local tests = {}
tests.t1 = function()
local stand_alone = true
local x1 = Q.mk_col({3, 2, 4}, 'F8')
local x2 = Q.mk_col({2, 0, 2}, 'F8')
local x3 = Q.mk_col({4, 2, 3}, 'F8')
local X = {x1, x2, x3}
local eigen_info = eigen(X, stand_alone)
assert(type(eigen_info) == "table")
print("Completed eigen")
Q.print_csv(eigen_info["eigenvalues"])
Q.print_csv(eigen_info.eigenvectors)
print("SUCCESS for t1")
end
tests.t2 = function()
local stand_alone = false
local x1 = Q.mk_col({3, 2, 4}, 'F8')
local x2 = Q.mk_col({2, 0, 2}, 'F8')
local x3 = Q.mk_col({4, 2, 3}, 'F8')
local X = {x1, x2, x3}
local eigen_info = eigen(X, stand_alone)
assert(type(eigen_info) == "table")
print("Completed eigen")
Q.print_csv(eigen_info["eigenvalues"])
Q.print_csv(eigen_info.eigenvectors)
print("SUCCESS for t2")
end
return tests
|
return function()
local Aurora = require(script.Parent)
describe("Server Aurora", function()
it("Should return the same agent for any given object", function()
local agent1 = Aurora.GetAgent(workspace)
local agent2 = Aurora.GetAgent(workspace)
expect(agent1).to.equal(agent2)
end)
itSKIP("Should not prevent garbage collection", function()
end)
it("Should not return destroyed agents", function()
local agent = Aurora.GetAgent(workspace)
agent:Destroy()
expect(Aurora.GetAgent(workspace).Destroyed).to.never.equal(true)
end)
end)
end
|
local shell = require("shellex.shell")
local fs = require("shellex.filesystem")
local text = require("shellex.text")
local USAGE =
[===[Usage: find [path] [--type=[dfs]] [--[i]name=EXPR]
--path if not specified, path is assumed to be current working directory
--type returns results of a given type, d:directory, f:file, and s:symlinks
--name specify the file name pattern. Use quote to include *. iname is
case insensitive
--help display this help and exit]===]
local args, options = shell.parse(...)
if (not args or not options) or options.help then
print(USAGE)
if not options.help then
return 1
else
return -- nil return, meaning no error
end
end
if #args > 1 then
io.stderr:write(USAGE..'\n')
return 1
end
local path = #args == 1 and args[1] or "."
local bDirs = true
local bFiles = true
local bSyms = true
local fileNamePattern = ""
local bCaseSensitive = true
if options.iname and options.name then
io.stderr:write("find cannot define both iname and name\n")
return 1
end
if options.type then
bDirs = false
bFiles = false
bSyms = false
if options.type == "f" then
bFiles = true
elseif options.type == "d" then
bDirs = true
elseif options.type == "s" then
bSyms = true
else
io.stderr:write(string.format("find: Unknown argument to type: %s\n", options.type))
io.stderr:write(USAGE..'\n')
return 1
end
end
if options.iname or options.name then
bCaseSensitive = options.iname ~= nil
fileNamePattern = options.iname or options.name
if type(fileNamePattern) ~= "string" then
io.stderr:write('find: missing argument to `name\'\n')
return 1
end
if not bCaseSensitive then
fileNamePattern = fileNamePattern:lower()
end
-- prefix any * with . for gnu find glob matching
fileNamePattern = text.escapeMagic(fileNamePattern)
fileNamePattern = fileNamePattern:gsub("%%%*", ".*")
end
local function isValidType(spath)
if not fs.exists(spath) then
return false
end
if fileNamePattern:len() > 0 then
local fileName = spath:gsub('.*/','')
if fileName:len() == 0 then
return false
end
local caseFileName = fileName
if not bCaseSensitive then
caseFileName = caseFileName:lower()
end
local s, e = caseFileName:find(fileNamePattern)
if not s or not e then
return false
end
if s ~= 1 or e ~= caseFileName:len() then
return false
end
end
if fs.isDirectory(spath) then
return bDirs
elseif fs.isLink(spath) then
return bSyms
else
return bFiles
end
end
local function visit(rpath)
local spath = shell.resolve(rpath)
if isValidType(spath) then
local result = rpath:gsub('/+$','')
print(result)
end
if fs.isDirectory(spath) then
local list_result = fs.list(spath)
for list_item in list_result do
visit(rpath:gsub('/+$', '') .. '/' .. list_item)
end
end
end
visit(path)
|
-- Test if strings truncated before the last character are correctly reported
-- as truncated data.
-- Bug+fix reported by Jorge "xopxe" Visca on 2013-12-07, fixed in 40:1918f698336c
local b = require 'bencode'
local total,fail = 0,0
local broken = {
"3:a", -- this never worked to begin with. (and it shouldn't)
"3:ab" -- this wasn't detected properly prior to Dec 2013
}
for _,v in ipairs(broken) do
total = total + 1
if b.decode(v) ~= nil then
fail = fail + 1
print (v, "FAIL")
else
print (v, "OK")
end
end
return fail,total
|
-- Generated by LairTool
endor_boar_wolf_lair_neutral_small = Lair:new {
mobiles = {{"boar_wolf",1}},
spawnLimit = 15,
buildingsVeryEasy = {"object/tangible/lair/base/poi_all_lair_thicket_small_evil_fire_green.iff"},
buildingsEasy = {"object/tangible/lair/base/poi_all_lair_thicket_small_evil_fire_green.iff"},
buildingsMedium = {"object/tangible/lair/base/poi_all_lair_thicket_small_evil_fire_green.iff"},
buildingsHard = {"object/tangible/lair/base/poi_all_lair_thicket_small_evil_fire_green.iff"},
buildingsVeryHard = {"object/tangible/lair/base/poi_all_lair_thicket_small_evil_fire_green.iff"},
}
addLairTemplate("endor_boar_wolf_lair_neutral_small", endor_boar_wolf_lair_neutral_small)
|
local Event = require('__stdlib__/stdlib/event/event')
local ErmConfig = require('__enemyracemanager__/lib/global_config')
local RaceSettingHelper = require('__enemyracemanager__/lib/helper/race_settings_helper')
local ErmDebugHelper = require('__enemyracemanager__/lib/debug_helper')
local modify_race_setting = function()
local race_settings = remote.call('enemy_race_manager', 'get_race', MOD_NAME)
if game.active_mods['Explosive_biters'] then
ErmDebugHelper.print('Explosive_biters is active')
RaceSettingHelper.add_structure_to_tier(race_settings, 1, 'explosive-biter-spawner')
RaceSettingHelper.add_unit_to_tier(race_settings, 1, 'small-explosive-biter')
RaceSettingHelper.add_unit_to_tier(race_settings, 1, 'small-explosive-spitter')
RaceSettingHelper.add_unit_to_tier(race_settings, 1, 'medium-explosive-biter')
RaceSettingHelper.add_unit_to_tier(race_settings, 1, 'medium-explosive-spitter')
RaceSettingHelper.add_unit_to_tier(race_settings, 2, 'big-explosive-biter')
RaceSettingHelper.add_unit_to_tier(race_settings, 2, 'big-explosive-spitter')
RaceSettingHelper.add_unit_to_tier(race_settings, 3, 'behemoth-explosive-biter')
RaceSettingHelper.add_unit_to_tier(race_settings, 3, 'behemoth-explosive-spitter')
else
ErmDebugHelper.print('Explosive_biters is inactive')
RaceSettingHelper.remove_structure_from_tier(race_settings, 1, 'explosive-biter-spawner')
RaceSettingHelper.remove_unit_from_tier(race_settings, 1, 'small-explosive-biter')
RaceSettingHelper.remove_unit_from_tier(race_settings, 1, 'small-explosive-spitter')
RaceSettingHelper.remove_unit_from_tier(race_settings, 1, 'medium-explosive-biter')
RaceSettingHelper.remove_unit_from_tier(race_settings, 1, 'medium-explosive-spitter')
RaceSettingHelper.remove_unit_from_tier(race_settings, 2, 'big-explosive-biter')
RaceSettingHelper.remove_unit_from_tier(race_settings, 2, 'big-explosive-spitter')
RaceSettingHelper.remove_unit_from_tier(race_settings, 3, 'behemoth-explosive-biter')
RaceSettingHelper.remove_unit_from_tier(race_settings, 3, 'behemoth-explosive-spitter')
end
end
---
--- Inject race settings into existing race
---
Event.register(Event.generate_event_name(ErmConfig.RACE_SETTING_UPDATE), function(event)
if (event.affected_race == MOD_NAME) then
modify_race_setting()
end
end)
|
--[[
Humor API
Awesome Humor API.
The version of the OpenAPI document: 1.0
Contact: mail@humorapi.com
Generated by: https://openapi-generator.tech
]]
-- inline_response_200_8 class
local inline_response_200_8 = {}
local inline_response_200_8_mt = {
__name = "inline_response_200_8";
__index = inline_response_200_8;
}
local function cast_inline_response_200_8(t)
return setmetatable(t, inline_response_200_8_mt)
end
local function new_inline_response_200_8(message)
return cast_inline_response_200_8({
["message"] = message;
})
end
return {
cast = cast_inline_response_200_8;
new = new_inline_response_200_8;
}
|
-- -----------------------------------------------------------------------------
--
-- private
--
-- -----------------------------------------------------------------------------
---@class ship_meta
-- -----------------------------------------------------------------------------
--
-- meta
--
-- -----------------------------------------------------------------------------
local M = {}
---@param meta ship_meta
---@param go gobject
function M.on_start(meta, go)
end
---@param meta ship_meta
---@param go gobject
function M.on_update(meta, go)
end
---@param go gobject
---@param type string
---@param event touchable_mouse_evt
function M:on_event(go, type, event)
if type == "touchable.mouse_evt" then
the_debug:trace(string.format(
"ship %q touched(%s %s) - %s",
go.named and go.named.name or "---",
event.type,
event.button,
go == event.target and "self" or "other"))
end
end
return M
|
--- The Rednet API allows systems to communicate between each other without
-- using redstone. It serves as a wrapper for the modem API, offering ease of
-- functionality (particularly in regards to repeating signals) with some
-- expense of fine control.
--
-- In order to send and receive data, a modem (either wired, wireless, or ender)
-- is required. The data reaches any possible destinations immediately after
-- sending it, but is range limited.
--
-- Rednet also allows you to use a "protocol" - simple string names indicating
-- what messages are about. Receiving systems may filter messages according to
-- their protocols, thereby automatically ignoring incoming messages which don't
-- specify an identical string. It's also possible to @{rednet.lookup|lookup}
-- which systems in the area use certain protocols, hence making it easier to
-- determine where given messages should be sent in the first place.
--
-- @module rednet
local expect = dofile("rom/modules/main/cc/expect.lua").expect
--- The channel used by the Rednet API to @{broadcast} messages.
CHANNEL_BROADCAST = 65535
--- The channel used by the Rednet API to repeat messages.
CHANNEL_REPEAT = 65533
local tReceivedMessages = {}
local tReceivedMessageTimeouts = {}
local tHostnames = {}
--- Opens a modem with the given @{peripheral} name, allowing it to send and
-- receive messages over rednet.
--
-- This will open the modem on two channels: one which has the same
-- @{os.getComputerID|ID} as the computer, and another on
-- @{CHANNEL_BROADCAST|the broadcast channel}.
--
-- @tparam string modem The name of the modem to open.
-- @throws If there is no such modem with the given name
function open(modem)
expect(1, modem, "string")
if peripheral.getType(modem) ~= "modem" then
error("No such modem: " .. modem, 2)
end
peripheral.call(modem, "open", os.getComputerID())
peripheral.call(modem, "open", CHANNEL_BROADCAST)
end
--- Close a modem with the given @{peripheral} name, meaning it can no longer
-- send and receive rednet messages.
--
-- @tparam[opt] string modem The side the modem exists on. If not given, all
-- open modems will be closed.
-- @throws If there is no such modem with the given name
function close(modem)
expect(1, modem, "string", "nil")
if modem then
-- Close a specific modem
if peripheral.getType(modem) ~= "modem" then
error("No such modem: " .. modem, 2)
end
peripheral.call(modem, "close", os.getComputerID())
peripheral.call(modem, "close", CHANNEL_BROADCAST)
else
-- Close all modems
for _, modem in ipairs(peripheral.getNames()) do
if isOpen(modem) then
close(modem)
end
end
end
end
--- Determine if rednet is currently open.
--
-- @tparam[opt] string modem Which modem to check. If not given, all connected
-- modems will be checked.
-- @treturn boolean If the given modem is open.
function isOpen(modem)
expect(1, modem, "string", "nil")
if modem then
-- Check if a specific modem is open
if peripheral.getType(modem) == "modem" then
return peripheral.call(modem, "isOpen", os.getComputerID()) and peripheral.call(modem, "isOpen", CHANNEL_BROADCAST)
end
else
-- Check if any modem is open
for _, modem in ipairs(peripheral.getNames()) do
if isOpen(modem) then
return true
end
end
end
return false
end
--- Allows a computer or turtle with an attached modem to send a message
-- intended for a system with a specific ID. At least one such modem must first
-- be @{rednet.open|opened} before sending is possible.
--
-- Assuming the target was in range and also had a correctly opened modem, it
-- may then use @{rednet.receive} to collect the message.
--
-- @tparam number nRecipient The ID of the receiving computer.
-- @param message The message to send. This should not contain coroutines or
-- functions, as they will be converted to @{nil}.
-- @tparam[opt] string sProtocol The "protocol" to send this message under. When
-- using @{rednet.receive} one can filter to only receive messages sent under a
-- particular protocol.
-- @treturn boolean If this message was successfully sent (i.e. if rednet is
-- currently @{rednet.open|open}). Note, this does not guarantee the message was
-- actually _received_.
-- @see rednet.receive
function send(nRecipient, message, sProtocol)
expect(1, nRecipient, "number")
expect(3, sProtocol, "string", "nil")
-- Generate a (probably) unique message ID
-- We could do other things to guarantee uniqueness, but we really don't need to
-- Store it to ensure we don't get our own messages back
local nMessageID = math.random(1, 2147483647)
tReceivedMessages[nMessageID] = true
tReceivedMessageTimeouts[os.startTimer(30)] = nMessageID
-- Create the message
local nReplyChannel = os.getComputerID()
local tMessage = {
nMessageID = nMessageID,
nRecipient = nRecipient,
message = message,
sProtocol = sProtocol,
}
local sent = false
if nRecipient == os.getComputerID() then
-- Loopback to ourselves
os.queueEvent("rednet_message", nReplyChannel, message, sProtocol)
sent = true
else
-- Send on all open modems, to the target and to repeaters
for _, sModem in ipairs(peripheral.getNames()) do
if isOpen(sModem) then
peripheral.call(sModem, "transmit", nRecipient, nReplyChannel, tMessage)
peripheral.call(sModem, "transmit", CHANNEL_REPEAT, nReplyChannel, tMessage)
sent = true
end
end
end
return sent
end
--- Broadcasts a string message over the predefined @{CHANNEL_BROADCAST}
-- channel. The message will be received by every device listening to rednet.
--
-- @param message The message to send. This should not contain coroutines or
-- functions, as they will be converted to @{nil}.
-- @tparam[opt] string sProtocol The "protocol" to send this message under. When
-- using @{rednet.receive} one can filter to only receive messages sent under a
-- particular protocol.
-- @see rednet.receive
function broadcast(message, sProtocol)
expect(2, sProtocol, "string", "nil")
send(CHANNEL_BROADCAST, message, sProtocol)
end
--- Wait for a rednet message to be received, or until `nTimeout` seconds have
-- elapsed.
--
-- @tparam[opt] string sProtocolFilter The protocol the received message must be
-- sent with. If specified, any messages not sent under this protocol will be
-- discarded.
-- @tparam[opt] number nTimeout The number of seconds to wait if no message is
-- received.
-- @treturn[1] number The computer which sent this message
-- @return[1] The received message
-- @treturn[1] string|nil The protocol this message was sent under.
-- @treturn[2] nil If the timeout elapsed and no message was received.
-- @see rednet.broadcast
-- @see rednet.send
function receive(sProtocolFilter, nTimeout)
-- The parameters used to be ( nTimeout ), detect this case for backwards compatibility
if type(sProtocolFilter) == "number" and nTimeout == nil then
sProtocolFilter, nTimeout = nil, sProtocolFilter
end
expect(1, sProtocolFilter, "string", "nil")
expect(2, nTimeout, "number", "nil")
-- Start the timer
local timer = nil
local sFilter = nil
if nTimeout then
timer = os.startTimer(nTimeout)
sFilter = nil
else
sFilter = "rednet_message"
end
-- Wait for events
while true do
local sEvent, p1, p2, p3 = os.pullEvent(sFilter)
if sEvent == "rednet_message" then
-- Return the first matching rednet_message
local nSenderID, message, sProtocol = p1, p2, p3
if sProtocolFilter == nil or sProtocol == sProtocolFilter then
return nSenderID, message, sProtocol
end
elseif sEvent == "timer" then
-- Return nil if we timeout
if p1 == timer then
return nil
end
end
end
end
--- Register the system as "hosting" the desired protocol under the specified
-- name. If a rednet @{rednet.lookup|lookup} is performed for that protocol (and
-- maybe name) on the same network, the registered system will automatically
-- respond via a background process, hence providing the system performing the
-- lookup with its ID number.
--
-- Multiple computers may not register themselves on the same network as having
-- the same names against the same protocols, and the title `localhost` is
-- specifically reserved. They may, however, share names as long as their hosted
-- protocols are different, or if they only join a given network after
-- "registering" themselves before doing so (eg while offline or part of a
-- different network).
--
-- @tparam string sProtocol The protocol this computer provides.
-- @tparam string sHostname The name this protocol exposes for the given protocol.
-- @throws If trying to register a hostname which is reserved, or currently in use.
-- @see rednet.unhost
-- @see rednet.lookup
function host(sProtocol, sHostname)
expect(1, sProtocol, "string")
expect(2, sHostname, "string")
if sHostname == "localhost" then
error("Reserved hostname", 2)
end
if tHostnames[sProtocol] ~= sHostname then
if lookup(sProtocol, sHostname) ~= nil then
error("Hostname in use", 2)
end
tHostnames[sProtocol] = sHostname
end
end
--- Stop @{rednet.host|hosting} a specific protocol, meaning it will no longer
-- respond to @{rednet.lookup} requests.
--
-- @tparam string sProtocol The protocol to unregister your self from.
function unhost(sProtocol)
expect(1, sProtocol, "string")
tHostnames[sProtocol] = nil
end
--- Search the local rednet network for systems @{rednet.host|hosting} the
-- desired protocol and returns any computer IDs that respond as "registered"
-- against it.
--
-- If a hostname is specified, only one ID will be returned (assuming an exact
-- match is found).
--
-- @tparam string sProtocol The protocol to search for.
-- @tparam[opt] string sHostname The hostname to search for.
--
-- @treturn[1] { number }|nil A list of computer IDs hosting the given
-- protocol, or @{nil} if none exist.
-- @treturn[2] number|nil The computer ID with the provided hostname and protocol,
-- or @{nil} if none exists.
function lookup(sProtocol, sHostname)
expect(1, sProtocol, "string")
expect(2, sHostname, "string", "nil")
-- Build list of host IDs
local tResults = nil
if sHostname == nil then
tResults = {}
end
-- Check localhost first
if tHostnames[sProtocol] then
if sHostname == nil then
table.insert(tResults, os.getComputerID())
elseif sHostname == "localhost" or sHostname == tHostnames[sProtocol] then
return os.getComputerID()
end
end
if not isOpen() then
if tResults then
return table.unpack(tResults)
end
return nil
end
-- Broadcast a lookup packet
broadcast({
sType = "lookup",
sProtocol = sProtocol,
sHostname = sHostname,
}, "dns")
-- Start a timer
local timer = os.startTimer(2)
-- Wait for events
while true do
local event, p1, p2, p3 = os.pullEvent()
if event == "rednet_message" then
-- Got a rednet message, check if it's the response to our request
local nSenderID, tMessage, sMessageProtocol = p1, p2, p3
if sMessageProtocol == "dns" and type(tMessage) == "table" and tMessage.sType == "lookup response" then
if tMessage.sProtocol == sProtocol then
if sHostname == nil then
table.insert(tResults, nSenderID)
elseif tMessage.sHostname == sHostname then
return nSenderID
end
end
end
else
-- Got a timer event, check it's the end of our timeout
if p1 == timer then
break
end
end
end
if tResults then
return table.unpack(tResults)
end
return nil
end
local bRunning = false
--- Listen for modem messages and converts them into rednet messages, which may
-- then be @{receive|received}.
--
-- This is automatically started in the background on computer startup, and
-- should not be called manually.
function run()
if bRunning then
error("rednet is already running", 2)
end
bRunning = true
while bRunning do
local sEvent, p1, p2, p3, p4 = os.pullEventRaw()
if sEvent == "modem_message" then
-- Got a modem message, process it and add it to the rednet event queue
local sModem, nChannel, nReplyChannel, tMessage = p1, p2, p3, p4
if isOpen(sModem) and (nChannel == os.getComputerID() or nChannel == CHANNEL_BROADCAST) then
if type(tMessage) == "table" and tMessage.nMessageID then
if not tReceivedMessages[tMessage.nMessageID] then
tReceivedMessages[tMessage.nMessageID] = true
tReceivedMessageTimeouts[os.startTimer(30)] = tMessage.nMessageID
os.queueEvent("rednet_message", nReplyChannel, tMessage.message, tMessage.sProtocol)
end
end
end
elseif sEvent == "rednet_message" then
-- Got a rednet message (queued from above), respond to dns lookup
local nSenderID, tMessage, sProtocol = p1, p2, p3
if sProtocol == "dns" and type(tMessage) == "table" and tMessage.sType == "lookup" then
local sHostname = tHostnames[tMessage.sProtocol]
if sHostname ~= nil and (tMessage.sHostname == nil or tMessage.sHostname == sHostname) then
rednet.send(nSenderID, {
sType = "lookup response",
sHostname = sHostname,
sProtocol = tMessage.sProtocol,
}, "dns")
end
end
elseif sEvent == "timer" then
-- Got a timer event, use it to clear the event queue
local nTimer = p1
local nMessage = tReceivedMessageTimeouts[nTimer]
if nMessage then
tReceivedMessageTimeouts[nTimer] = nil
tReceivedMessages[nMessage] = nil
end
end
end
end
|
describe("toml.encode()", function()
local toml = require("toml")
local data = require("spec/tables")
it("can encode sample TOML document", function()
local fh = io.open("spec/test-data/test.toml")
local expectedTOML = fh:read("*all")
fh:close()
assert.are.same(toml.encode(data.tableForTestToml, {}), expectedTOML)
end)
it("can encode another sample TOML document", function()
local fh = io.open("spec/test-data/test2.toml")
local expectedTOML = fh:read("*all")
fh:close()
assert.are.same(toml.encode(data.tableForTest2Toml, {}), expectedTOML)
end)
it("can encode massive table", function()
local returnedTOML = toml.encode(data.tableForMassiveToml, {})
local fh = io.open("spec/test-data/massive.toml")
local expectedTOML = fh:read("*all")
fh:close()
assert.equal(returnedTOML, expectedTOML)
end)
end)
|
Config = {}
Config.DrawDistance = 100.0
Config.MaxInService = -1
Config.EnablePlayerManagement = true
Config.EnableSocietyOwnedVehicles = false
Config.EnableLicenses = false
Config.EnableESXIdentity = true
Config.Locale = 'fr'
Config.Cig = {
'bread',
'carottevend'
}
Config.CigResellChances = {
bread = 45,
carottevend = 55,
}
Config.CigResellQuantity= {
bread = {min = 1, max = 10},
carottevend = {min = 1, max = 10},
}
Config.CigPrices = {
bread = {min = 35, max = 20},
carottevend = {min = 25, max = 25},
}
Config.CigPricesHigh = {
bread = {min = 65, max = 30},
carottevend = {min = 55, max = 35},
}
Config.Time = {
bread = 5 * 60,
carottevend = 5 * 60,
}
Config.Blip = {
Pos = {x = 2412.1389, y = 4989.6904, z = 45.2441},
Sprite = 88,
Display = 4,
Scale = 1.2,
Colour = 2,
}
Config.Zones = {
FermierActions = {
Pos = { x = 2415.30566, y = 5005.6007, z = 45.6626 },
Size = { x = 1.6, y = 1.6, z = 1.0 },
Color = {r = 136, g = 243, b = 216},
Type = 23,
},
Garage = {
Pos = { x = 1890.0177, y = 4978.8623, z = 50.2120 },
Size = { x = 1.6, y = 1.6, z = 1.0 },
Color = {r = 136, g = 243, b = 216},
Type = 23,
},
Harvest2 = {
Pos = { x = 2151.8986, y = 5117.6059, z = 46.2056 },
Size = { x = 1.6, y = 1.6, z = 1.0 },
Color = {r = 136, g = 243, b = 216},
Type = 23,
},
Harvest3 = {
Pos = { x = 2027.4128, y = 4939.7866, z = 40.0826 },
Size = { x = 1.6, y = 10.6, z = 1.0 },
Color = {r = 136, g = 243, b = 216},
Type = 23,
},
Harvest4 = {
Pos = { x = 1937.7705, y = 4822.3339, z = 43.9788 },
Size = { x = 5.6, y = 5.6, z = 1.0 },
Color = {r = 136, g = 243, b = 216},
Type = 23,
},
Harvest5 = {
Pos = { x = 2432.3037, y = 4962.5004, z = 41.3476 },
Size = { x = 1.6, y = 1.6, z = 1.0 },
Color = {r = 136, g = 243, b = 216},
Type = 23,
},
Harvest6 = {
Pos = { x = 1846.4705, y = 5031.6191, z = 43.5611 },
Size = { x = 10.6, y = 10.6, z = 1.0 },
Color = {r = 136, g = 243, b = 216},
Type = 23,
},
Harvest7 = {
Pos = { x = 1963.0651, y = 4859.2558, z = 44.4560 },
Size = { x = 10.6, y = 10.6, z = 1.0 },
Color = {r = 136, g = 243, b = 216},
Type = 23,
},
Harvest10 = {
Pos = { x = 1978.9212, y = 4831.6127, z = 42.8817 },
Size = { x = 10.6, y = 10.6, z = 1.0 },
Color = {r = 136, g = 243, b = 216},
Type = 23,
},
Central = {
Pos = { x = 1961.8022, y = 4837.2436, z = 35.4358 },
Size = { x = 10.6, y = 10.6, z = 1.0 },
Color = {r = 136, g = 243, b = 216},
Type = 23,
},
Craft = {
Pos = { x = 1722.4018, y = 4711.3647, z = 41.1847 },
Size = { x = 1.6, y = 1.6, z = 1.0 },
Color = {r = 136, g = 243, b = 216},
Type = 27,
},
Craft4 = {
Pos = { x = 1722.4018, y = 4711.3647, z = 41.1847 },
Size = { x = 1.6, y = 1.6, z = 1.0 },
Color = {r = 136, g = 243, b = 216},
Type = 27,
},
Craft2 = {
Pos = { x = 2568.0031, y = 4685.0029, z = 33.0512 },
Size = { x = 1.6, y = 1.6, z = 1.0 },
Color = {r = 136, g = 243, b = 216},
Type = 27,
},
VehicleSpawnPoint = {
Pos = { x = 2411.7187, y = 4988.7070, z = 45.2357 },
Size = { x = 1.6, y = 1.6, z = 1.0 },
Type = -1,
},
VehicleDeleter = {
Pos = { x = 2413.5090, y = 4993.2045, z = 45.2724 },
Size = { x = 1.6, y = 1.6, z = 1.0 },
Color = { r = 204, g = 204, b = 0 },
Type = 1,
},
SellFarm = {
Pos = {x = 26.4358, y = -1314.7958, z = 28.6217},
Size = { x = 1.6, y = 1.6, z = 1.0 },
Color = {r = 136, g = 243, b = 216},
Name = "Vente des produits",
Type = 1
},
}
|
-- include useful files
u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "utils.lua")
u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "common.lua")
u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "commonpatterns.lua")
u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "nextpatterns.lua")
u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "evolutionpatterns.lua")
-- onInit is an hardcoded function that is called when the level is first loaded
function onInit()
l_setSpeedMult(2.7)
l_setSpeedInc(0.15)
l_setRotationSpeed(0.1)
l_setRotationSpeedMax(0.4)
l_setRotationSpeedInc(0.035)
l_setDelayMult(1.2)
l_setDelayInc(0.0)
l_setFastSpin(0.0)
l_setSides(6)
l_setSidesMin(6)
l_setSidesMax(6)
l_setIncTime(15)
l_setPulseMin(77)
l_setPulseMax(95)
l_setPulseSpeed(1.95)
l_setPulseSpeedR(0.51)
l_setPulseDelayMax(13)
l_setBeatPulseMax(17)
l_setBeatPulseDelayMax(27.8)
l_setSwapEnabled(true)
l_setTutorialMode(true)
end
-- onLoad is an hardcoded function that is called when the level is started/restarted
function onLoad()
ct0 = ct_create()
ct1 = ct_create()
ct2 = ct_create()
ct_eval(ct0, [[u_log("ct0_A")]])
ct_wait(ct0, 60)
ct_eval(ct0, [[u_log("ct0_B")]])
ct_eval(ct1, [[u_log("ct1_A")]])
ct_wait(ct1, 60)
ct_eval(ct1, [[u_log("ct1_B")]])
ct_eval(ct2, [[u_log("ct2_A")]])
ct_wait(ct2, 60)
ct_eval(ct2, [[u_log("ct2_B")]])
ct3 = ct_create()
ct_eval(ct3, [[u_log("ct3_A")]])
ct_wait(ct3, 20)
ct_eval(ct3, [[u_log("ct3_AX")]])
ct_wait(ct3, 20)
ct_eval(ct3, [[u_log("ct3_AY")]])
ct_wait(ct3, 20)
ct_eval(ct3, [[u_log("ct3_B")]])
end
-- onStep is an hardcoded function that is called when the level timeline is empty
-- onStep should contain your pattern spawning logic
function onStep()
end
-- onIncrement is an hardcoded function that is called when the level difficulty is incremented
function onIncrement()
end
-- onUnload is an hardcoded function that is called when the level is closed/restarted
function onUnload()
end
-- onUpdate is an hardcoded function that is called every frame
function onUpdate(mFrameTime)
end
|
function GetFuel(vehicle)
return DecorGetFloat(vehicle, Config.FuelDecor)
end
function SetFuel(vehicle, fuel)
if type(fuel) == 'number' and fuel >= 0 and fuel <= 100 then
SetVehicleFuelLevel(vehicle, fuel + 0.0)
DecorSetFloat(vehicle, Config.FuelDecor, GetVehicleFuelLevel(vehicle))
end
end
function LoadAnimDict(dict)
if not HasAnimDictLoaded(dict) then
RequestAnimDict(dict)
while not HasAnimDictLoaded(dict) do
Citizen.Wait(1)
end
end
end
function DrawText3Ds(x, y, z, text)
local onScreen,_x,_y=World3dToScreen2d(x,y,z)
if onScreen then
SetTextScale(0.35, 0.35)
SetTextFont(4)
SetTextProportional(1)
SetTextColour(255, 255, 255, 215)
SetTextEntry("STRING")
SetTextCentre(1)
AddTextComponentString(text)
DrawText(_x,_y)
end
end
function Round(num, numDecimalPlaces)
local mult = 10^(numDecimalPlaces or 0)
return math.floor(num * mult + 0.5) / mult
end
function CreateBlip(coords)
local blip = AddBlipForCoord(coords)
SetBlipSprite(blip, 361)
SetBlipScale(blip, 0.4)
SetBlipColour(blip, 1)
SetBlipDisplay(blip, 4)
SetBlipAsShortRange(blip, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentString("Gas Station")
EndTextCommandSetBlipName(blip)
return blip
end
function FindNearestFuelPump()
local coords = GetEntityCoords(PlayerPedId())
local fuelPumps = {}
local handle, object = FindFirstObject()
local success
repeat
if Config.PumpModels[GetEntityModel(object)] then
table.insert(fuelPumps, object)
end
success, object = FindNextObject(handle, object)
until not success
EndFindObject(handle)
local pumpObject = 0
local pumpDistance = 1000
for _, fuelPumpObject in pairs(fuelPumps) do
local dstcheck = GetDistanceBetweenCoords(coords, GetEntityCoords(fuelPumpObject))
if dstcheck < pumpDistance then
pumpDistance = dstcheck
pumpObject = fuelPumpObject
end
end
return pumpObject, pumpDistance
end
|
function Cyst:GetIsFlameableMultiplier(doer)
if doer and doer.isa and doer:isa("Welder") then
return 4
else
return 7
end
end
function Cyst:GetAutoBuildRateMultiplier()
if GetHasTech(self, kTechId.ShiftHive) then
-- return 1.25
return 1.5 -- increase by 20% from vanilla
end
return 1
end
|
Citizen.CreateThread(function()
local isDead = false
while true do
Citizen.Wait(0)
local player = PlayerId()
if NetworkIsPlayerActive(player) then
local playerPed = PlayerPedId()
if IsPedFatallyInjured(playerPed) and not isDead then
isDead = true
local killerEntity, deathCause = GetPedSourceOfDeath(playerPed), GetPedCauseOfDeath(playerPed)
local killerClientId = NetworkGetPlayerIndexFromPed(killerEntity)
if killerEntity ~= playerPed and killerClientId and NetworkIsPlayerActive(killerClientId) then
PlayerKilledByPlayer(GetPlayerServerId(killerClientId), killerClientId, deathCause)
else
PlayerKilled(deathCause)
end
elseif not IsPedFatallyInjured(playerPed) then
isDead = false
end
end
end
end)
function PlayerKilledByPlayer(killerServerId, killerClientId, deathCause)
local victimCoords = GetEntityCoords(PlayerPedId())
local killerCoords = GetEntityCoords(GetPlayerPed(killerClientId))
local distance = #(victimCoords - killerCoords)
local data = {
victimCoords = {x = ESX.Math.Round(victimCoords.x, 1), y = ESX.Math.Round(victimCoords.y, 1), z = ESX.Math.Round(victimCoords.z, 1)},
killerCoords = {x = ESX.Math.Round(killerCoords.x, 1), y = ESX.Math.Round(killerCoords.y, 1), z = ESX.Math.Round(killerCoords.z, 1)},
killedByPlayer = true,
deathCause = deathCause,
distance = ESX.Math.Round(distance, 1),
killerServerId = killerServerId,
killerClientId = killerClientId
}
TriggerEvent('esx:onPlayerDeath', data)
TriggerServerEvent('esx:onPlayerDeath', data)
end
function PlayerKilled(deathCause)
local playerPed = PlayerPedId()
local victimCoords = GetEntityCoords(playerPed)
local data = {
victimCoords = {x = ESX.Math.Round(victimCoords.x, 1), y = ESX.Math.Round(victimCoords.y, 1), z = ESX.Math.Round(victimCoords.z, 1)},
killedByPlayer = false,
deathCause = deathCause
}
TriggerEvent('esx:onPlayerDeath', data)
TriggerServerEvent('esx:onPlayerDeath', data)
end
|
local _NAME = "LibDatabase"
local _VERSION = "1.0.0"
local _LICENSE = [[
MIT License
Copyright (c) 2020 Jayrgo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
]]
assert(LibMan1, format("%s requires LibMan-1.x.x.", _NAME))
assert(LibMan1:Exists("LibCallback", 1), format("%s requires LibCallback-1.x.x.", _NAME))
assert(LibMan1:Exists("LibMixin", 1), format("%s requires LibMixin-1.x.x.", _NAME))
assert(LibMan1:Exists("LibEvent", 1), format("%s requires LibEvent-1.x.x.", _NAME))
local LibDatabase --[[ , oldVersion ]] = LibMan1:New(_NAME, _VERSION, "_LICENSE", _LICENSE)
if not LibDatabase then return end
LibDatabase.dbs = LibDatabase.dbs or {}
local dbs = LibDatabase.dbs
local CHAR_KEY = UnitName("player") .. " - " .. GetRealmName()
---@class Database
local DatabaseMixin = {}
local next = next
local pairs = pairs
local type = type
---@param profile table
---@param defaults table
local function removeDefaults(profile, defaults)
if type(profile) ~= "table" or type(defaults) ~= "table" then return end
for k, v in pairs(profile) do
if type(v) == "table" and type(defaults[k]) == "table" then
removeDefaults(v, defaults[k])
if not next(v) then profile[k] = nil end
elseif v == defaults[k] then
profile[k] = nil
end
end
end
function DatabaseMixin:Save()
for profileKey, profile in pairs(self.profiles) do
removeDefaults(profile, self.defaults)
if not next(profile) then self.profiles[profileKey] = nil end
end
removeDefaults(self.globals, self.defaults_globals)
_G[self.variableName] = {
profileKeys = self.profileKeys,
profiles = self.profiles,
globals = self.globals,
lastChangeTime = self.lastChangeTime,
lastChangeChar = self.lastChangeChar,
}
end
---@param self Database
local function PLAYER_LOGOUT(self) if self.restored then self:Save() end end
local GetServerTime = GetServerTime
---@param self Database
local function setLastChange(self)
self.lastChangeTime = GetServerTime()
self.lastChangeChar = CHAR_KEY
end
local wipe = wipe
local CopyTable = CopyTable
---@param self Database
local function Restore(self)
local profileKeys, profiles, globals
if type(_G[self.variableName]) == "table" then
profileKeys = _G[self.variableName].profileKeys
profiles = _G[self.variableName].profiles
globals = _G[self.variableName].globals
self.lastChangeTime = _G[self.variableName].lastChangeTime
self.lastChangeChar = _G[self.variableName].lastChangeChar
wipe(_G[self.variableName])
end
self.lastChangeTime = type(self.lastChangeTime) == "number" and self.lastChangeTime or GetServerTime()
self.lastChangeChar = type(self.lastChangeChar) == "string" and self.lastChangeChar or CHAR_KEY
for char, key in pairs(type(profileKeys) == "table" and profileKeys or {}) do
if type(char) == "string" and type(key) == "string" then self.profileKeys[char] = key end
end
for key, data in pairs(type(profiles) == "table" and profiles or {}) do
if type(key) == "string" and type(data) == "table" then self.profiles[key] = CopyTable(data) end
end
for k, v in pairs(type(globals) == "table" and globals or {}) do
if type(k) == "string" then
if type(v) == "table" then
self.globals[k] = CopyTable(v)
else
self.globals[k] = v
end
end
end
self.restored = true
self:SetProfile(self.profileKeys[CHAR_KEY] or self.defaultProfile)
end
local LibEvent = LibMan1:Get("LibEvent", 1)
---@param self Database
---@param addonName string
local function ADDON_LOADED(self, addonName)
if addonName == self.addonName then
LibEvent:Unregister("ADDON_LOADED", ADDON_LOADED, self)
Restore(self)
end
end
local LibCallback = LibMan1:Get("LibCallback", 1)
local IsAddOnLoaded = IsAddOnLoaded
function DatabaseMixin:OnLoad()
self.OnLoad = nil
self.callbacks = self.callbacks or LibCallback:New(self)
self.defaults = self.defaults or {}
self.db = {}
self.profileKeys = {}
self.profiles = {}
self.defaults_globals = self.defaults_globals or {}
self.globals = {}
LibEvent:Register("PLAYER_LOGOUT", PLAYER_LOGOUT, self)
local loaded, finished = IsAddOnLoaded(self.addonName)
if not loaded or not finished then
LibEvent:Register("ADDON_LOADED", ADDON_LOADED, self)
else
Restore(self)
end
dbs[self] = true
end
---@param profile table
---@param defaults table
local function copyDefaults(profile, defaults)
for k, v in pairs(defaults) do
if type(profile[k]) == "nil" then
if type(v) == "table" then
profile[k] = CopyTable(v)
else
profile[k] = v
end
elseif type(v) == "table" and type(profile[k]) == "table" then
copyDefaults(profile[k], v)
end
end
end
---@param self Database
---@param event string
---@vararg any
local function TriggerEvent(self, event, ...)
local callbacks = self.callbacks
callbacks:xTriggerEvent(event, self, ...)
callbacks:xTriggerEvent("OnChanged", self)
end
local error = error
local format = format
---@param profileKey string
function DatabaseMixin:SetProfile(profileKey)
if type(profileKey) ~= "string" then
error(format("Usage: Database:SetProfile(profileKey): 'profileKey' - string expected got %s", type(profileKey),
2))
end
if self.profile and self.profile == profileKey then return end
if type(self.profiles[profileKey]) ~= "table" then
self.profiles[profileKey] = CopyTable(self.defaults)
else
copyDefaults(self.profiles[profileKey], self.defaults)
end
self.db = self.profiles[profileKey]
self.profileKeys[CHAR_KEY] = profileKey
if self.profile then setLastChange(self) end
self.profile = profileKey
TriggerEvent(self, "OnProfileChanged", profileKey)
end
---@param profileKey string
function DatabaseMixin:ResetProfile(profileKey)
if type(profileKey) ~= "string" then
error(format("Usage: Database:ResetProfile(profileKey): 'profileKey' - string expected got %s",
type(profileKey), 2))
end
if self.profiles[profileKey] then
wipe(self.profiles[profileKey])
self.profiles[profileKey] = CopyTable(self.defaults)
if self.profile == profileKey then self.db = self.profiles[profileKey] end
end
setLastChange(self)
TriggerEvent(self, "OnProfileReset", profileKey)
end
---@return string
function DatabaseMixin:GetProfile() return self.profile or self.defaultProfile end
---@type table<string, string>
local DEFAULT_PROFILES = {
---@type string
REALM = GetRealmName(),
---@type string
FACTION = UnitFactionGroup("player"),
---@type string
RACE = select(2, UnitRace("player")),
---@type string
CLASS = select(2, UnitClass("player")),
}
---@return string[]
function DatabaseMixin:GetProfiles()
local profiles = {}
local addDefault = true
for key in pairs(self.profiles) do
profiles[#profiles + 1] = key
if key == self.defaultProfile then addDefault = false end
end
if addDefault then profiles[#profiles + 1] = self.defaultProfile end
return profiles
end
local tContains = tContains
---@return string[]
function DatabaseMixin:GetUsedProfiles()
local usedProfiles = {}
for _, key in pairs(self.profileKeys) do
if not tContains(usedProfiles, key) then usedProfiles[#usedProfiles + 1] = key end
end
return usedProfiles
end
---@return string[]
function DatabaseMixin:GetUnusedProfiles()
local usedProfiles = self:GetUsedProfiles()
local unusedProfiles = {}
for key in pairs(self.profiles) do
if not tContains(usedProfiles, key) then unusedProfiles[#unusedProfiles + 1] = key end
end
return unusedProfiles
end
---@param profileKey string
function DatabaseMixin:DeleteProfile(profileKey)
if type(profileKey) ~= "string" then
error(format("Usage: Database:DeleteProfile(profileKey): 'profileKey' - string expected got %s",
type(profileKey), 2))
end
if self.profile == profileKey then
error(format("Usage: Database:DeleteProfile(profileKey): 'profileKey' - cannot delete current profile (%s)",
profileKey), 2)
end
self.profiles[profileKey] = nil
for char, key in pairs(self.profileKeys) do if key == profileKey then self.profileKeys[char] = nil end end
setLastChange(self)
TriggerEvent(self, "OnProfileDeleted", profileKey)
end
---@param from string
function DatabaseMixin:CopyProfile(from)
if type(from) ~= "string" then
error(format("Usage: Database:CopyProfile(from): 'from' - string expected got %s", type(from), 2))
end
if not self.profiles[from] then
error(format("Usage: Database:CopyProfile(from): 'from' - cannot find profile (%s)", from), 2)
end
local current = self:GetProfile()
wipe(self.profiles[current])
--[[ for k, v in pairs(self.profiles[current]) do
self.profiles[current][k] = nil
end ]]
--[[ for k, v in pairs(self.profiles[from]) do
self.profiles[current][k] = type(v) == "table" and CopyTable(v) or v
end ]]
self.profiles[current] = CopyTable(self.profiles[from])
copyDefaults(self.profiles[current], self.defaults)
self.db = self.profiles[current]
setLastChange(self)
TriggerEvent(self, "OnProfileCopied", from)
end
local tostringall = tostringall
---@vararg any
---@return string
local function coercePath(...) return tostringall(...) end
local validValueTypes = {"boolean", "number", "string", "nil"}
for i = 1, #validValueTypes do validValueTypes[validValueTypes[i]] = true end
local validValueTypesString = table.concat(validValueTypes, ", ", 1, #validValueTypes - 1)
validValueTypesString = format("%s or %s", validValueTypesString, validValueTypes[#validValueTypes])
---@param value any
---@param usage string
local function checkValue(value, usage)
if not validValueTypes[type(value)] then
error(format("Usage: %s: 'value' - %s expected got %s", usage, validValueTypesString, type(value)), 3)
end
end
local select = select
---@param tbl table
---@param value any
---@param path string
---@vararg string
---@return boolean
local function set(tbl, value, path, ...)
if select("#", ...) > 0 then
if type(tbl[path]) ~= "table" then tbl[path] = {} end
return set(tbl[path], value, ...)
else
if tbl[path] ~= value then
tbl[path] = value
return true
end
end
return false
end
---@param value boolean | number | string | nil
---@param path any
---@vararg any
function DatabaseMixin:SetDefault(value, path, ...)
checkValue(value, "Database:SetDefault(value, path[, ...])")
set(self.defaults, value, coercePath(path, ...))
if self.restored then copyDefaults(self.profiles[self:GetProfile()], self.defaults) end
end
---@param value boolean | number | string | nil
---@param path any
---@vararg any
function DatabaseMixin:SetWithoutResponse(value, path, ...)
checkValue(value, "Database:SetWithoutResponse(value, path[, ...]")
if set(self.db, value, coercePath(path, ...)) then setLastChange(self) end
end
---@param value boolean | number | string | nil
---@param path string
---@vararg any
function DatabaseMixin:Set(value, path, ...)
checkValue(value, "Database:Set(value, path[, ...]")
if set(self.db, value, coercePath(path, ...)) then
setLastChange(self)
TriggerEvent(self, "OnValueChanged", value, coercePath(path, ...))
end
end
---@param tbl table
---@vararg string
---@return boolean | number | string | nil
local function get(tbl, ...)
if select("#", ...) > 1 then
tbl = tbl[(...)]
if type(tbl) == "table" then return get(tbl, select(2, ...)) end
else
return tbl[(...)]
end
end
---@vararg any
---@return boolean | number | string | nil
function DatabaseMixin:Get(...)
if self.restored then
local value = get(self.db, coercePath(...))
if type(value) ~= "nil" then return value end
end
return get(self.defaults, coercePath(...))
end
---@vararg any
function DatabaseMixin:Reset(...) self:Set(get(self.defaults, coercePath(...)), coercePath(...)) end
---@vararg any
---@return boolean | number | string | nil
function DatabaseMixin:GetDefault(...) return get(self.defaults, coercePath(...)) end
local LAST_CHANGE_FORMAT = "|cffcfcfcf%s (%s)|r"
local date = date
---@return string
function DatabaseMixin:GetLastChange()
return format(LAST_CHANGE_FORMAT, date("%Y-%m-%d %X", self.lastChangeTime), self.lastChangeChar),
self.lastChangeTime, self.lastChangeChar
end
function DatabaseMixin:Clear()
local restored = self.restored
self:Save()
self.restored = nil
_G[self.variableName] = nil
if restored then Restore(self) end
end
---@param value boolean | number | string | nil
---@param path string
---@vararg any
function DatabaseMixin:SetGlobalDefault(value, path, ...)
checkValue(value, "Database:SetGlobalDefault(value, path[, ...]")
set(self.defaults_globals, value, coercePath(path, ...))
end
---@vararg any
---@return boolean | number | string | nil
function DatabaseMixin:GetGlobalDefault(...) return get(self.defaults_globals, coercePath(...)) end
---@param value boolean | number | string | nil
---@param path string
---@vararg any
function DatabaseMixin:SetGlobal(value, path, ...)
checkValue(value, "Database:SetGlobal(value, path[, ...]")
if set(self.globals, value, coercePath(path, ...)) then
setLastChange(self)
TriggerEvent(self, "OnGlobalValueChanged", value, coercePath(path, ...))
end
end
---@vararg any
---@return boolean | number | string | nil
function DatabaseMixin:GetGlobal(...)
if self.restored then
local value = get(self.globals, coercePath(...))
if type(value) ~= "nil" then return value end
end
return get(self.defaults_globals, coercePath(...))
end
---@return boolean
function DatabaseMixin:IsRestored() return self.restored end
local tostring = tostring
local LibMixin = LibMan1:Get("LibMixin")
---@param addonName string
---@param variableName string
---@param defaultProfile string | "\"REALM\"" | "\"FACTION\"" | "\"RACE\"" | "\"CLASS\""
---@return Database
function LibDatabase:New(addonName, variableName, defaultProfile)
if type(addonName) ~= "string" then
error(format("Usage: %s:New(addonName, variableName[, defaultProfile]): 'addonName' - string expected got %s",
tostring(LibDatabase), type(addonName), 2))
end
if type(variableName) ~= "string" then
error(format(
"Usage: %s:New(addonName, variableName[, defaultProfile]): 'variableName' - string expected got %s",
tostring(LibDatabase), type(variableName), 2))
end
defaultProfile = defaultProfile or CHAR_KEY
if type(defaultProfile) ~= "string" then
error(format(
"Usage: %s:New(addonName, variableName[, defaultProfile]): 'defaultProfile' - string expected got %s",
tostring(LibDatabase), type(defaultProfile), 2))
end
return LibMixin:Mixin({
addonName = addonName,
variableName = variableName,
defaultProfile = DEFAULT_PROFILES[defaultProfile] or defaultProfile,
}, DatabaseMixin)
end
for db in pairs(dbs) do -- upgrade
if db.restored then
db:Save()
db.restored = nil
end
LibMixin:Mixin(db, DatabaseMixin)
end
|
local ffi = require"ffi"
local egl = require"lib.ffi.EGL"
local gl = require"lib.ffi.OpenGLES2"
local sdl = require"lib.ffi.sdl"
local function init(self, surface, width, height)
print('initing',self,width,height)
self.surface=surface
self.init=false
self.width=width
self.height=height
local screen = sdl.SDL_SetVideoMode( width, height, 32, sdl.SDL_RESIZABLE )
local wminfo = ffi.new( "SDL_SysWMinfo" )
sdl.SDL_GetVersion( wminfo.version )
sdl.SDL_GetWMInfo( wminfo )
local systems = { "win", "x11", "dfb", "cocoa", "uikit" }
local subsystem = tonumber(wminfo.subsystem)
local wminfo = wminfo.info[systems[subsystem]]
self.window = wminfo.window
self.display = nil
if systems[subsystem]=="x11" then
display = wminfo.display
end
local event = ffi.new( "SDL_Event" )
local prev_time, curr_time, fps = 0, 0, 0
local callbacks={}
local dpy,ctx, surf
self.update=function()
while sdl.SDL_PollEvent( event ) ~= 0 do
if callbacks[event.type] then
for _,f in ipairs(callbacks[event.type]) do f(event) end
end
if event.type == sdl.SDL_QUIT then
egl.eglDestroyContext( dpy, ctx )
egl.eglDestroySurface( dpy, surf )
egl.eglTerminate( dpy )
return false
end
if event.type == sdl.SDL_KEYUP and event.key.keysym.sym == sdl.SDLK_ESCAPE then
event.type = sdl.SDL_QUIT
sdl.SDL_PushEvent( event )
end
end
return true
end
self.exit=function() sdl.SDL_Quit() end
self.on = function(self,tp, f)
callbacks[tp]=callbacks[tp] or {}
callbacks[tp][#callbacks[tp]+1]=f
print('Loading callback',tp,callbacks[tp])
end
--init egl
if self.display == nil then
self.display = egl.EGL_DEFAULT_DISPLAY
end
dpy = egl.eglGetDisplay( ffi.cast("intptr_t", self.display ))
local r = egl.eglInitialize( dpy, nil, nil)
print('wm.display/dpy/r', self.display, dpy, r)
local cfg_attr = ffi.new( "EGLint[3]", egl.EGL_RENDERABLE_TYPE, egl.EGL_OPENGL_ES2_BIT, egl.EGL_NONE )
local ctx_attr = ffi.new( "EGLint[3]", egl.EGL_CONTEXT_CLIENT_VERSION, 2, egl.EGL_NONE )
local cfg = ffi.new( "EGLConfig[1]" )
local n_cfg = ffi.new( "EGLint[1]" )
print('wm.window', self.window)
local r0 = egl.eglChooseConfig(dpy, cfg_attr, cfg, 1, n_cfg )
local c = cfg[0]
-- for i=0,10 do
-- if c[i]==egl.EGL_FALSE then break end
-- print(i,c[i])
-- end
surf = egl.eglCreateWindowSurface( dpy, cfg[0], self.window, nil )
ctx = egl.eglCreateContext(dpy, cfg[0], nil, ctx_attr )
local r = egl.eglMakeCurrent(dpy, surf, surf, ctx)
print('surf/ctx', surf, r0, ctx, r, n_cfg[0])
self.flip=function()
print('flipping')
gl.glFinish()
egl.eglSwapBuffers(dpy, surf)
end
self.loop=function(self)
while self:update() do
self.surface:prerender()
self.surface:render()
self:flip()
end
end
return self
end
return {
init=init,
VIDEORESIZE=sdl.SDL_VIDEORESIZE
}
|
local dependencyManager = {}
function dependencyManager.import(...)
local args = table.pack(...)
if(#args == 0) then
return
end
local results = {}
for key, package in pairs(args)
do
if(key == "n") then
break
end
repeat
local target = require(package)
if(target == nil) then
break
end
for name, func in pairs(target)
do
if(name == "n") then
break
end
results[name] = func
end
until true
end
return results
end
return dependencyManager
|
if settings.startup["lasertanks-electric-engine"].value and not data.raw["equipment-category"]["electric-vehicles-equipment"] then
require("electricvehicles.categories")
require("electricvehicles.equipment")
require("electricvehicles.items")
require("electricvehicles.recipes")
require("electricvehicles.technologies")
if settings.startup["lasertanks-add-train"].value then
require("electric_train")
end
end
|
ACCESS_LABELS = {}
ACCESS_LABELS[DOOR_OWNER] = "owner"
ACCESS_LABELS[DOOR_TENANT] = "tenant"
ACCESS_LABELS[DOOR_GUEST] = "guest"
ACCESS_LABELS[DOOR_NONE] = "none"
function PLUGIN:ShouldDrawEntityInfo(entity)
if (entity.isDoor(entity) and !entity.getNetVar(entity, "disabled")) then
return true
end
end
local toScreen = FindMetaTable("Vector").ToScreen
local colorAlpha = ColorAlpha
local drawText = nut.util.drawText
local configGet = nut.config.get
local teamGetColor = team.GetColor
function PLUGIN:DrawEntityInfo(entity, alpha)
if (entity.isDoor(entity) and !entity:getNetVar("hidden") and hook.Run("CanDrawDoorInfo") != false) then
local position = toScreen(entity.LocalToWorld(entity, entity.OBBCenter(entity)))
local x, y = position.x, position.y
local owner = entity.GetDTEntity(entity, 0)
local name = entity.getNetVar(entity, "title", entity.getNetVar(entity, "name", IsValid(owner) and L"dTitleOwned" or L"dTitle"))
local faction = entity.getNetVar(entity, "faction")
local class = entity.getNetVar(entity, "class")
local color
if (faction) then
color = teamGetColor(faction)
else
color = configGet("color")
end
local classData
if (class) then
classData = nut.class.list[class]
if (classData) then
color = classData.color
else
color = configGet("color")
end
else
color = configGet("color")
end
drawText(name, x, y, colorAlpha(color, alpha), 1, 1)
if (IsValid(owner)) then
drawText(L("dOwnedBy", owner.Name(owner)), x, y + 16, colorAlpha(color_white, alpha), 1, 1)
elseif (faction) then
local info = nut.faction.indices[faction]
if (info) then
drawText(L("dOwnedBy", L2(info.name) or info.name), x, y + 16, colorAlpha(color_white, alpha), 1, 1)
end
elseif (class) then
if (classData) then
drawText(L("dOwnedBy", L2(classData.name) or classData.name), x, y + 16, colorAlpha(color_white, alpha), 1, 1)
end
else
drawText(entity.getNetVar(entity, "noSell") and L"dIsNotOwnable" or L"dIsOwnable", x, y + 16, colorAlpha(color_white, alpha), 1, 1)
end
end
end
netstream.Hook("doorMenu", function(entity, access, door2)
if (IsValid(nut.gui.door)) then
return nut.gui.door:Remove()
end
if (IsValid(entity)) then
nut.gui.door = vgui.Create("nutDoorMenu")
nut.gui.door:setDoor(entity, access, door2)
end
end)
netstream.Hook("doorPerm", function(door, client, access)
local panel = door.nutPanel
if (IsValid(panel) and IsValid(client)) then
panel.access[client] = access
for k, v in ipairs(panel.access:GetLines()) do
if (v.player == client) then
v:SetColumnText(2, L(ACCESS_LABELS[access or 0]))
return
end
end
end
end)
|
-- https://github.com/ray-x/lsp_signature.nvim
require("lsp_signature").setup(
{
bind = true,
-- 边框样式
handler_opts = {
-- double、rounded、single、shadow、none
border = "rounded"
},
-- 自动触发
floating_window = false,
-- 绑定按键
toggle_key = "<C-j>",
-- 虚拟提示关闭
hint_enable = false,
-- 正在输入的参数将如何突出显示
hi_parameter = "LspSignatureActiveParameter"
}
)
|
useConfig = require "RTS use config";
useConfig(1, 8);
|
require("prototypes.technology")
require("prototypes.sounds")
require("prototypes.TabSortingStuff")
require("prototypes.TrainGoBrrrr.PropHunt")
if (settings.startup["RTThrowersSetting"].value == true) then
require("prototypes.BouncePlates.BouncePlate")
require("prototypes.BouncePlates.DirectedBouncePlate")
require("prototypes.PlayerLauncher")
require("prototypes.OpenContainer")
require("prototypes.hatch")
if (settings.startup["RTBounceSetting"].value == true) then
require("prototypes.BouncePlates.PrimerBouncePlate")
require("prototypes.BouncePlates.SignalBouncePlate")
if (settings.startup["RTTrainRampSetting"].value == true) then
require("prototypes.TrainGoBrrrr.PayloadWagon")
end
end
if (settings.startup["RTTrainBounceSetting"].value == true and settings.startup["RTTrainRampSetting"].value == true) then
require("prototypes.BouncePlates.TrainBouncePlate")
require("prototypes.BouncePlates.TrainDirectedBouncePlate")
end
end
if (settings.startup["RTTrainRampSetting"].value == true) then
require("prototypes.TrainGoBrrrr.TrainRamp")
require("prototypes.TrainGoBrrrr.MagnetTrainRamp")
require("prototypes.TrainGoBrrrr.sprites.base")
require("prototypes.TrainGoBrrrr.GhostLoco")
end
if (settings.startup["RTZiplineSetting"].value == true) then
require("prototypes.zipline")
end
data:extend({
{
type = "custom-input",
name = "RTInteract",
key_sequence = "F"
},
-- {
-- type = "custom-input",
-- name = "RTtcaretnI",
-- key_sequence = "SHIFT + F"
-- },
{
type = "custom-input",
name = "RTClick",
key_sequence = "mouse-button-1"
}
})
|
/**************************************************************
Buu's Base Muzzleflash Effect
https://github.com/buu342/GMod-BuuBaseRedone
**************************************************************/
/*-----------------------------
Init
Initializes the effect
@Param Effect data
-----------------------------*/
function EFFECT:Init(data)
-- Initialize the effect with the effect data
self:SetRenderMode(RENDERMODE_TRANSALPHA)
self.WeaponEnt = data:GetEntity()
self.Attachment = data:GetAttachment()
-- Store some variables with our positio and direction
self.Position = self:GetTracerShootPos(data:GetOrigin(), self.WeaponEnt, self.Attachment)
self.Forward = data:GetNormal()
self.Angle = self.Forward:Angle()
self.Right = self.Angle:Right()
-- Ensure the weapon exists
if (!IsValid(self.WeaponEnt) || self.WeaponEnt:GetOwner() == nil) then return end
-- Create the muzzle effect itself
local AddVel = self.WeaponEnt:GetOwner():GetVelocity()
local emitter = ParticleEmitter(self.Position)
for i=1,2 do
local particle = emitter:Add("effects/muzzleflash"..math.random(1,4), self.Position)
particle:SetVelocity(Vector(0, 0, 0)+AddVel)
particle:SetDieTime(0.1)
particle:SetStartAlpha(255)
particle:SetEndAlpha(math.Rand(0, 255))
particle:SetStartSize(1*i)
particle:SetEndSize(7*i)
particle:SetRoll(math.Rand(180, 480))
particle:SetRollDelta(math.Rand(-1, 1))
particle:SetColor(255, 255, 255)
particle:SetAirResistance(160)
end
-- Create smoke from the muzzleflash
for i=1,3 do
local particle = emitter:Add("particle/particle_smokegrenade", self.Position)
particle:SetVelocity(Vector(math.random(-20,20),math.random(-20,20),math.random(-20,20)))
particle:SetDieTime(math.Rand(0.5,1))
particle:SetStartAlpha(math.Rand(50,155))
particle:SetStartSize(math.random(0.5,1)*i)
particle:SetEndSize(math.Rand(2,3)*i)
particle:SetRoll(math.Rand(180,480))
particle:SetRollDelta(math.Rand(-1,1))
particle:SetColor(200,200,200)
particle:SetAirResistance(140)
end
-- Kill the emitter
emitter:Finish()
end
/*-----------------------------
Think
Handles effect logic every tick
@Return Whether the effect should live
-----------------------------*/
function EFFECT:Think()
return false
end
/*-----------------------------
Render
Renders the effect
-----------------------------*/
function EFFECT:Render()
end
|
local Players = game:GetService("Players")
local Modules = Players.LocalPlayer.PlayerGui.AvatarEditorInGame.Modules
local SetSearchParameters = require(Modules.NotLApp.Actions.SetSearchParameters)
return function(state, action)
state = state or {}
if action.type == SetSearchParameters.name then
state = action.searchUuid
end
return state
end
|
-- Table of tables containing the scripts of the cutscenes for each room in the game.
-- Aurelien Coet, 2017.
cutscenes = {
main = {
onEntry = {
always = false,
script = {
{"movePlayer", 300, 450},
{"addMessage", "Well, here I am.", 340, 490, 3}
}
}
},
secondary = {
onEntry = {
always = true,
script = {
{"movePlayer", 760, 650}
}
}
}
}
return cutscenes
|
local x, y = 2, 3
local a = (2 + x) * y
local b = x + 2 * y
local c = 2 ^ x ^ y
local d = (2 ^ x) ^ y
local e = 2 * x / y
local f = 2 * (x / y)
local g = 2 + x + y
local h = 2 + (x + y)
local i = -x * y
local l = -x^2 + (-x)^2
print(a, b, c, d, e, f, g, h, i, l)
|
local m = component.proxy(component.list('modem')())
local name = component.proxy(component.list('eeprom')()).getLabel()
local PORT= 1
local h = {}
local c={}
local code = ''
local function dispatch(evt, ...)
if h[evt] then
pcall(h[evt], ...)
return true
end
return false
end
local function pullSignal(timeout)
local e = table.pack(computer.pullSignal(timeout))
dispatch(table.unpack(e))
return table.unpack(e)
end
function h.modem_message(_, ra, p, _, cmd, n, ...)
if p ~= PORT then return end
if cmd == nil then return end
if n ~= name then return end
if c[cmd] == nil then return end
local s, r = pcall(c[cmd], ra, ...)
if not s then
m.close()
m.open(PORT)
m.send(ra, PORT, 'error', name, r)
computer.beep(1000, 0.2)
end
end
function c.netload(_, d)
if d ~= nil and type(d) == 'string' and #d > 0 then
code = code .. d
return
end
local ch, err = load(code, '=netbios', "t", setmetatable({modem=m}, {__index=_G}))
code = ''
if not ch then error(err) end
m.close()
ch()
m.close()
m.open(PORT)
end
function c.netload_clear()
code = ''
end
function c.ping(ra, ...)
m.send(ra, PORT, 'pong', name, ...)
end
function c.beep(_, ...)
computer.beep(...)
end
function c.shutdown(_, reboot)
computer.shutdown(reboot or false)
end
m.open(PORT)
computer.beep(800,0.05)
computer.beep(1200,0.05)
m.broadcast(PORT, 'netboot', name)
while true do
pullSignal()
end
|
data:extend({
{
type = "recipe",
name = "oilburner",
enabled = "false",
ingredients =
{
{"storage-tank",1},
{"electronic-circuit",1},
{"stone-furnace",1},
{"iron-plate",10}
},
result = "oilburner"
}
})
|
input_handler = {}
input_handler["Up"] = 'j'
input_handler["Down"] = 'k'
input_handler["Left"] = 'h'
input_handler["Right"] = 'l'
|
--[[
LuCI LXC module
Copyright (C) 2014, Cisco Systems, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Author: Petar Koretic <petar.koretic@sartura.hr>
]]--
local fs = require "nixio.fs"
m = Map("lxc", translate("LXC Containers"))
if fs.access("/etc/config/lxc") then
m:section(SimpleSection).template = "lxc"
s = m:section(TypedSection, "lxc", translate("Options"))
s.anonymous = true
s.addremove = false
s:option(Value, "url", translate("Containers URL"))
end
return m
|
return {
summary = 'Convert a point from local space to world space.',
description = 'Convert a point relative to the collider to a point in world coordinates.',
arguments = {
{
name = 'x',
type = 'number',
description = 'The x position of the point.'
},
{
name = 'y',
type = 'number',
description = 'The y position of the point.'
},
{
name = 'z',
type = 'number',
description = 'The z position of the point.'
}
},
returns = {
{
name = 'wx',
type = 'number',
description = 'The x coordinate of the world point.'
},
{
name = 'wy',
type = 'number',
description = 'The y coordinate of the world point.'
},
{
name = 'wz',
type = 'number',
description = 'The z coordinate of the world point.'
}
},
related = {
'Collider:getLocalPoint',
'Collider:getLocalVector',
'Collider:getWorldVector'
}
}
|
function init(virtual)
if not virtual then
entity.setInteractive(true)
end
end
function onInteraction(args)
if args ~= nil and args.sourceId ~= nil then
local p = entity.position()
local parameters = {}
-- local type = "gardenbotv80g"
-- if entity.configParameter("botspawner.type") ~= nil then
local type = entity.configParameter("botspawner.type","gardenbotv80g")
-- end
parameters.persistent = true
parameters.damageTeam = 1
parameters.ownerUuid = world.entityUniqueId(args.sourceId) or args.sourceId
parameters.selfUuid = sb.makeUuid()
parameters.level = getLevel()
parameters.spawnPoint = {p[1], p[2]}
world.spawnMonster(type, {p[1], p[2] +0.5}, parameters)
entity.smash()
end
end
function getLevel()
if world.getProperty("ship.fuel") ~= nil then return 10 end
if world.threatLevel then return world.threatLevel() end -- pleased giraffe
return 1
end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.