Merge pull request #983 from YumiWhellie/main
edit slots by dropping Charisma/Relic Hunter
This commit is contained in:
commit
500efef81c
@ -1177,6 +1177,31 @@ function resetSlotSymbols()
|
||||
updateSlotSymbols()
|
||||
end
|
||||
|
||||
function modifySlot(newSlot, cardPosition)
|
||||
local slotSnaps = {}
|
||||
local snaps = self.getSnapPoints()
|
||||
for i, snap in ipairs(snaps) do
|
||||
if inArea(snap.position, MAIN_PLAY_AREA) then
|
||||
table.insert(slotSnaps, snap)
|
||||
end
|
||||
end
|
||||
cardPosition.y = 0
|
||||
for snapId, snap in ipairs(slotSnaps) do
|
||||
local snapPosition = Vector(snap.position.x, 0, snap.position.z)
|
||||
if snapPosition == cardPosition then
|
||||
slotData[snapId] = newSlot
|
||||
if Player[playerColor].seated then
|
||||
printToColor(newSlot .. " slot added to player mat", playerColor, Color.fromString(playerColor))
|
||||
else
|
||||
local hostColor = Player.getPlayers()[1].color
|
||||
printToColor(newSlot .. " slot added to player mat", hostColor, Color.fromString(hostColor))
|
||||
end
|
||||
end
|
||||
end
|
||||
updateSave()
|
||||
updateSlotSymbols()
|
||||
end
|
||||
|
||||
---------------------------------------------------------
|
||||
-- playermat token spawning
|
||||
---------------------------------------------------------
|
||||
@ -1255,6 +1280,11 @@ function onCollisionEnter(collisionInfo)
|
||||
-- main uses spawning
|
||||
if inArea(localCardPos, MAIN_PLAY_AREA) and (md.type == "Asset" or md.type == "Event") then
|
||||
spawnTokensOrShowHelper(object)
|
||||
if md.id == "02158" or id == "01694" then
|
||||
modifySlot("Ally", localCardPos)
|
||||
elseif md.id == "02157" or id == "01695" then
|
||||
modifySlot("Accessory", localCardPos)
|
||||
end
|
||||
end
|
||||
|
||||
-- encounter types / committed skill cards in the threat area
|
||||
|
Loading…
x
Reference in New Issue
Block a user