remove tokens from card
This commit is contained in:
parent
1bd55af78a
commit
06532bb994
@ -36,7 +36,6 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -137,6 +136,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -194,6 +194,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -251,6 +252,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -308,6 +310,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -365,6 +368,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -422,6 +426,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -479,6 +484,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -536,6 +542,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -593,6 +600,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -650,6 +658,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -707,6 +716,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -764,6 +774,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -821,6 +832,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -878,6 +890,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -935,6 +948,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -992,6 +1006,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1049,6 +1064,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1106,6 +1122,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1163,6 +1180,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1220,6 +1238,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1277,6 +1296,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1334,6 +1354,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1391,6 +1412,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1448,6 +1470,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1505,6 +1528,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1562,6 +1586,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1619,6 +1644,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1676,6 +1702,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1733,6 +1760,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1790,6 +1818,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1847,6 +1876,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1904,6 +1934,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -1961,6 +1992,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -2018,6 +2050,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -2075,6 +2108,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -2132,6 +2166,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -2189,6 +2224,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -2246,6 +2282,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -2303,6 +2340,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -2360,6 +2398,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -2417,6 +2456,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -2474,6 +2514,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -2531,6 +2572,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -2588,6 +2630,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -2645,6 +2688,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -2702,6 +2746,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -2759,6 +2804,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
@ -2816,6 +2862,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "damage",
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Damage",
|
||||
"Snap": false,
|
||||
|
@ -79,6 +79,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "path",
|
||||
"Name": "Custom_Tile",
|
||||
"Nickname": "",
|
||||
"Snap": true,
|
||||
@ -139,6 +140,7 @@
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Memo": "path",
|
||||
"Name": "Custom_Tile",
|
||||
"Nickname": "",
|
||||
"Snap": true,
|
||||
|
@ -1,13 +1,18 @@
|
||||
local playAreaApi = require("core/PlayAreaApi")
|
||||
local tokenChecker = require("core/token/TokenChecker")
|
||||
local pendingCall = false
|
||||
local messageSent = {}
|
||||
local missingData = {}
|
||||
local countedVP = {}
|
||||
local highlightMissing = false
|
||||
local highlightCounted = false
|
||||
local TRASHCAN
|
||||
local TRASHCAN_GUID = "70b9f6"
|
||||
|
||||
-- button creation when loading the game
|
||||
function onLoad()
|
||||
TRASHCAN = getObjectFromGUID(TRASHCAN_GUID)
|
||||
|
||||
-- index 0: VP - "Display"
|
||||
local buttonParameters = {}
|
||||
buttonParameters.label = "0"
|
||||
@ -266,6 +271,21 @@ function placeCard(card)
|
||||
end
|
||||
end
|
||||
|
||||
-- remove tokens from the card
|
||||
for _, v in ipairs(searchOnObj(card)) do
|
||||
local obj = v.hit_object
|
||||
|
||||
-- don't touch decks / cards
|
||||
if obj.tag == "Deck" or obj.tag == "Card" then
|
||||
-- put chaos tokens back into bag
|
||||
elseif tokenChecker.isChaosToken(obj) then
|
||||
local chaosBag = Global.call("findChaosBag")
|
||||
chaosBag.putObject(obj)
|
||||
elseif obj.memo ~= nil and obj.getLock() == false then
|
||||
TRASHCAN.putObject(obj)
|
||||
end
|
||||
end
|
||||
|
||||
-- place the card
|
||||
local name = card.getName() or "Unnamed card"
|
||||
for i = 1, 10 do
|
||||
|
Loading…
Reference in New Issue
Block a user