removed Nkosi

This commit is contained in:
dscarpac 2024-02-14 12:16:48 -06:00
parent ad69498d2a
commit 2b686c7df2
6 changed files with 53 additions and 271 deletions

View File

@ -67,13 +67,13 @@
},
{
"Type": 0,
"Name": "resolve_bless",
"URL": "http://cloud-3.steamusercontent.com/ugc/2324488110706766387/EDC440CC9E6F1EDA73FB3A7B6DD1DE5ABDBD42D8/"
"Name": "bless",
"URL": "http://cloud-3.steamusercontent.com/ugc/2380784374775547028/7855033DE0EB1FDDF706E1303054D35FE0902532/"
},
{
"Type": 0,
"Name": "resolve_curse",
"URL": "http://cloud-3.steamusercontent.com/ugc/2380783739898089676/02286A78E1F30A6A0E832F32271621ED5A2E987C/"
"Name": "curse",
"URL": "http://cloud-3.steamusercontent.com/ugc/2380784374775547135/2360372CBE9452CB7B4D135BE13BBA6D46B7D427/"
}
]

View File

@ -1,114 +0,0 @@
{
"AltLookAngle": {
"x": 0,
"y": 0,
"z": 0
},
"Autoraise": true,
"CardID": 378929,
"ColorDiffuse": {
"b": 0.71324,
"g": 0.71324,
"r": 0.71324
},
"CustomDeck": {
"3789": {
"BackIsHidden": true,
"BackURL": "http://cloud-3.steamusercontent.com/ugc/2342503777940352139/A2D42E7E5C43D045D72CE5CFC907E4F886C8C690/",
"FaceURL": "http://cloud-3.steamusercontent.com/ugc/1625226898126493809/0EE7F5B9B916B56425CAC1C46F7FCEF9DBF55112/",
"NumHeight": 7,
"NumWidth": 10,
"Type": 0,
"UniqueBack": false
}
},
"Description": "Enigmatic Warlock",
"DragSelectable": true,
"GMNotes_path": "AllPlayerCards.15bb07/NkosiMabati3.6c5628.gmnotes",
"GUID": "6c5628",
"Grid": true,
"GridProjection": false,
"Hands": true,
"HideWhenFaceDown": true,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": false,
"LuaScript": "require(\"playercards/cards/NkosiMabati3\")",
"LuaScriptState": "",
"MeasureMovement": false,
"Name": "Card",
"Nickname": "Nkosi Mabati (3)",
"SidewaysCard": false,
"Snap": true,
"Sticky": true,
"Tags": [
"Asset",
"PlayerCard"
],
"Tooltip": true,
"Transform": {
"posX": 9.182,
"posY": 2.801,
"posZ": -16.733,
"rotX": 0,
"rotY": 270,
"rotZ": 0,
"scaleX": 1,
"scaleY": 1,
"scaleZ": 1
},
"Value": 0,
"XmlUI": "\u003cInclude src=\"playercards/NkosiMabati3.xml\"/\u003e",
"CustomUIAssets": [
{
"Type": 1,
"Name": "font_teutonic-arkham",
"URL": "http://cloud-3.steamusercontent.com/ugc/2027213118467703445/89328E273B4C5180BF491516CE998DE3C604E162/"
},
{
"Type": 0,
"Name": "bless",
"URL": "http://cloud-3.steamusercontent.com/ugc/2380784374775547028/7855033DE0EB1FDDF706E1303054D35FE0902532/"
},
{
"Type": 0,
"Name": "curse",
"URL": "http://cloud-3.steamusercontent.com/ugc/2380784374775547135/2360372CBE9452CB7B4D135BE13BBA6D46B7D427/"
},
{
"Type": 0,
"Name": "skull",
"URL": "http://cloud-3.steamusercontent.com/ugc/2380784374775547231/E0FEEF462DE4E7704832CA2415D0D027A6BF5041/"
},
{
"Type": 0,
"Name": "autofail",
"URL": "http://cloud-3.steamusercontent.com/ugc/2380784374792650351/EA4CE1F7A59E0B4CF5AD29DBCC40C8413DA14ADC/"
},
{
"Type": 0,
"Name": "unnamed",
"URL": "http://cloud-3.steamusercontent.com/ugc/2380784374792650571/E4C2B2B69282A4EE15FE290FF6B08BEFC8FCA65C/"
},
{
"Type": 0,
"Name": "elderthing",
"URL": "http://cloud-3.steamusercontent.com/ugc/2380784374792650683/1C046B6335317CA1AEBFC80645EEC18852D83D80/"
},
{
"Type": 0,
"Name": "cultist",
"URL": "http://cloud-3.steamusercontent.com/ugc/2380784374792650461/10D8037632900AA86045BDD42A564716D5855B1B/"
},
{
"Type": 0,
"Name": "tablet",
"URL": "http://cloud-3.steamusercontent.com/ugc/2380784374792650857/29DAE514E5C838C24C90ABBFFF92B1359B9A2F76/"
},
{
"Type": 0,
"Name": "frost",
"URL": "http://cloud-3.steamusercontent.com/ugc/2380784374792650766/73E07A50BE6FD9BED266F3421B472C4BF913DE81/"
}
]
}

View File

@ -16,15 +16,20 @@ function onLoad(savedData)
self.addContextMenuItem("Clear Helper", deleteButtons)
end
else
self.addContextMenuItem("Enable Helper", createButtons)
self.UI.hide("active_bless")
self.UI.hide("inactive_bless")
self.UI.hide("inactive_curse")
self.UI.hide("active_curse")
self.addContextMenuItem("Enable Helper", createButtons)
end
end
function deleteButtons()
self.UI.hide("bless_button")
self.UI.hide("curse_button")
self.UI.hide("both_buttons")
self.UI.hide("active_bless")
self.UI.hide("inactive_bless")
self.UI.hide("inactive_curse")
self.UI.hide("active_curse")
self.clearContextMenu()
self.addContextMenuItem("Enable Helper", createButtons)
Wait.stop(loopId)
@ -37,29 +42,20 @@ function createButtons()
self.addContextMenuItem("Clear Helper", deleteButtons)
currentState = "Empty"
loopId = Wait.time(countBlessCurse, 1, -1)
end
function resolveCurse()
local closestMatColor = playmatApi.getMatColorByPosition(self.getPosition())
log(closestMatColor)
local mat = guidReferenceApi.getObjectByOwnerAndType(closestMatColor, "Playermat")
log(mat)
tokenType = "Curse"
chaosBagApi.drawChaosToken(mat, true , tokenType)
end
function resolveBless()
local closestMatColor = playmatApi.getMatColorByPosition(self.getPosition())
--log(closestMatColor)
local mat = guidReferenceApi.getObjectByOwnerAndType(closestMatColor, "Playermat")
--log(mat)
tokenType = "Bless"
--self.setRotationSmooth({0, 0, 0})
chaosBagApi.drawChaosToken(mat, true , tokenType)
end
function countBlessCurse()
@ -77,30 +73,34 @@ function countBlessCurse()
if numInBag.Bless > numInBag.Curse then
if currentState ~= "More Bless" then
self.UI.show("bless_button")
self.UI.hide("curse_button")
self.UI.hide("both_buttons")
self.UI.show("active_bless")
self.UI.hide("inactive_bless")
self.UI.show("inactive_curse")
self.UI.hide("active_curse")
end
currentState = "More Bless"
elseif numInBag.Curse > numInBag.Bless then
if currentState ~= "More Curse" then
self.UI.show("curse_button")
self.UI.hide("bless_button")
self.UI.hide("both_buttons")
self.UI.show("active_curse")
self.UI.hide("inactive_curse")
self.UI.show("inactive_bless")
self.UI.hide("active_bless")
end
currentState = "More Curse"
elseif numInBag.Curse == 0 then
if currentState ~= "Empty" then
self.UI.hide("both_buttons")
self.UI.hide("bless_button")
self.UI.hide("curse_button")
self.UI.show("inactive_bless")
self.UI.hide("active_bless")
self.UI.show("inactive_curse")
self.UI.hide("active_curse")
end
currentState = "Empty"
else
if currentState ~= "Equal" then
self.UI.show("both_buttons")
self.UI.hide("bless_button")
self.UI.hide("curse_button")
self.UI.show("active_bless")
self.UI.hide("inactive_bless")
self.UI.show("active_curse")
self.UI.hide("inactive_curse")
end
currentState = "Equal"
end

View File

@ -1,45 +0,0 @@
local playmatApi = require("playermat/PlaymatApi")
local guidReferenceApi = require("core/GUIDReferenceApi")
local chaosBagApi = require("chaosbag/ChaosBagApi")
function chooseSigil(_,_,id)
if id == "Bless" then
sigil = "Bless"
self.UI.hide("sigils")
self.UI.hide("choose")
self.UI.show("resolve_bless")
elseif id == "Curse" then
sigil = "Curse"
self.UI.hide("sigils")
self.UI.hide("choose")
self.UI.show("resolve_curse")
else
sigil = "Skull"
self.UI.hide("sigils")
self.UI.hide("choose")
self.UI.show("resolve_skull")
end
log("Sigil is " .. sigil)
end
function resolveSigil()
local closestMatColor = playmatApi.getMatColorByPosition(self.getPosition())
log(closestMatColor)
local mat = guidReferenceApi.getObjectByOwnerAndType(closestMatColor, "Playermat")
log(mat)
tokenType = sigil
log("hello")
log(tokenType)
local chaosbag = chaosBagApi.findChaosBag()
for i, obj in ipairs(chaosbag.getObjects()) do
if obj.name == tokenType then
chaosBagApi.drawChaosToken(mat, true, tokenType, _)
return
end
end
broadcastToAll(tokenType .. " token not found in chaos bag", "Red")
end

View File

@ -1,40 +1,27 @@
<Panel id="both_buttons" position="0 -50 -22"
rotation="0 0 180"
height="400" width="500"
scale="0.25 0.25 1"
showAnimation="FadeIn" hideAnimation="FadeOut" active="false">
<TableLayout cellSpacing="20" cellBackgroundColor="rgba(1,1,1,0)">
<Row>
<Cell><Button color="rgba(1,1,1,0)" icon="resolve_bless" onClick="resolveBless"></Button></Cell></Row>
<Row><Cell><Button color="rgba(1,1,1,0)" icon="resolve_curse" onClick="resolveCurse"></Button></Cell>
</Row>
</TableLayout>
<Panel
position="0 -50 -22"
rotation="0 0 180"
height="900" width="1400"
scale="0.1 0.1 1" active="true">
<TableLayout cellSpacing="80" cellBackgroundColor="rgba(1,1,1,0)">
<Row><Cell>
<Button id="active_bless" padding="50 50 50 50" icon="bless" iconWidth="400" font="font_teutonic-arkham" fontSize="300" textColor="White"
onClick="resolveBless" color="#9D702CE6" iconAlignment="Right">Resolve</Button></Cell></Row>
<Row><Cell>
<Button id="active_curse" padding="50 50 50 50" icon="curse" iconWidth="400" font="font_teutonic-arkham" fontSize="300" textColor="White"
onClick="resolveCurse" color="#37232FE6" iconAlignment="Right">Resolve</Button></Cell></Row></TableLayout>
</Panel>
<Panel id="curse_button" position="0 -50 -22"
rotation="0 0 180"
height="400" width="500"
scale="0.25 0.25 1"
showAnimation="FadeIn" hideAnimation="FadeOut" active="false">
<TableLayout cellSpacing="20" cellBackgroundColor="rgba(1,1,1,0)">
<Row>
<Cell><Button color="rgba(1,1,1,0)" icon="resolve_curse" onClick="resolveCurse"></Button></Cell>
</Row>
</TableLayout>
</Panel>
<Panel id="bless_button" position="0 -50 -22"
rotation="0 0 180"
height="400" width="500"
scale="0.25 0.25 1"
showAnimation="FadeIn" hideAnimation="FadeOut" active="false">
<TableLayout cellSpacing="20" cellBackgroundColor="rgba(1,1,1,0)">
<Row>
<Cell><Button color="rgba(1,1,1,0)" icon="resolve_bless" onClick="resolveBless"></Button></Cell>
</Row>
</TableLayout>
<Panel
position="0 -50 -22"
rotation="0 0 180"
height="900" width="1400"
scale="0.1 0.1 1" active="true">
<TableLayout cellSpacing="80" cellBackgroundColor="rgba(1,1,1,0)">
<Row><Cell>
<Button id="inactive_bless" padding="50 50 50 50" icon="bless" iconWidth="400" font="font_teutonic-arkham" fontSize="300" textColor="#A0A0A0"
color="#5C5C5CE6" iconAlignment="Right">Resolve</Button></Cell></Row>
<Row><Cell>
<Button id="inactive_curse" padding="50 50 50 50" icon="curse" iconWidth="400" font="font_teutonic-arkham" fontSize="300" textColor="#A0A0A0"
color="#353535E6" iconAlignment="Right">Resolve</Button></Cell></Row></TableLayout>
</Panel>

View File

@ -1,46 +0,0 @@
<Panel id="choose" position="0 -90 -22"
rotation="0 0 180"
height="200" width="500"
scale="0.3 0.3 1"
showAnimation="FadeIn" hideAnimation="FadeOut" active="true">
<Text font="font_teutonic-arkham" fontSize="100" color="White" outline="Black" outlineSize="2, -2">Choose sigil:</Text>
</Panel>
<Panel id="sigils" position="0 -50 -22"
rotation="0 0 180"
height="200" width="500"
scale="0.3 0.3 1"
showAnimation="FadeIn" hideAnimation="FadeOut" active="true">
<TableLayout cellSpacing="20" cellBackgroundColor="rgba(1,1,1,0)">
<Row>
<Cell><Button id="Bless" color="rgba(1,1,1,0)" icon="bless" onClick="chooseSigil"></Button></Cell>
<Cell><Button id="Curse" color="rgba(1,1,1,0)" icon="curse" onClick="chooseSigil"></Button></Cell>
<Cell><Button id="Skull" color="rgba(1,1,1,0)" icon="skull" onClick="chooseSigil"></Button></Cell>
</Row>
</TableLayout>
</Panel>
<Panel id="resolve_bless"
position="0 -30 -22"
rotation="0 0 180"
height="500" width="1000"
scale="0.1 0.1 1" active="false" showAnimation="FadeIn" hideAnimation="FadeOut"
><Button icon="bless" font="font_teutonic-arkham" fontSize="200" textColor="Red"
onClick="resolveSigil" color="rgba(1,1,1,0)" iconAlignment="Right">Resolve </Button></Panel>
<Panel id="resolve_skull"
position="0 -30 -22"
rotation="0 0 180"
height="500" width="1000"
scale="0.1 0.1 1" active="false" showAnimation="FadeIn" hideAnimation="FadeOut"
><Button icon="skull" font="font_teutonic-arkham" fontSize="200" textColor="Red"
onClick="resolveSigil" color="rgba(1,1,1,0)" iconAlignment="Right">Resolve </Button></Panel>
<Panel id="resolve_curse"
position="0 -40 -22"
rotation="0 0 180"
height="500" width="1400"
scale="0.1 0.1 1" active="false" showAnimation="FadeIn" hideAnimation="FadeOut"
><Button icon="curse" font="font_teutonic-arkham" fontSize="260" textColor="White"
onClick="resolveSigil" color="rgba(1,1,1,0)" iconAlignment="Right" padding="40 40 0 0">Resolve</Button></Panel>