Skip to content

Commit

Permalink
feat(gameTable): deadlock support (#5332)
Browse files Browse the repository at this point in the history
Move Deadlock's Custom GameTable to GitHub
  • Loading branch information
ElectricalBoy authored Jan 16, 2025
1 parent 690c14a commit e0b9027
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions components/game_table/deadlock/game_table_character_custom.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
-- @Liquipedia
-- wiki=deadlock
-- page=Module:GameTable/Character/Custom
--
-- Please see https://github.com/Liquipedia/Lua-Modules to contribute
--

local Arguments = require('Module:Arguments')
local Class = require('Module:Class')
local Lua = require('Module:Lua')

local GameTableCharacter = Lua.import('Module:GameTable/Character')

local CustomGameTableCharacter = Class.new(GameTableCharacter)

---@return integer
function CustomGameTableCharacter:getNumberOfBans()
return 1
end

---@param opponentIndex number
---@param playerIndex number
---@return string
function CustomGameTableCharacter:getCharacterKey(opponentIndex, playerIndex)
return 'team' .. opponentIndex .. 'hero' .. playerIndex
end

---@param frame Frame
---@return Html
function CustomGameTableCharacter.results(frame)
local args = Arguments.getArgs(frame)

return CustomGameTableCharacter(args):readConfig():query():build()
end

return CustomGameTableCharacter

0 comments on commit e0b9027

Please sign in to comment.