Skip to content

Commit

Permalink
Added scripting zone over ravage area so salt card can detect when it…
Browse files Browse the repository at this point in the history
… enters the zone and automatically lock
  • Loading branch information
iakona committed Dec 31, 2023
1 parent e865739 commit ec70dd6
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
42 changes: 42 additions & 0 deletions objects/2403e9/object.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"Name": "ScriptingTrigger",
"Transform": {
"posX": -42.835,
"posY": 1.6,
"posZ": -0.351,
"rotX": 0.0,
"rotY": 0.0,
"rotZ": 0.0,
"scaleX": 2.0,
"scaleY": 1.0,
"scaleZ": 3.0
},
"Nickname": "",
"Description": "",
"GMNotes": "",
"AltLookAngle": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"ColorDiffuse": {
"r": 1.0,
"g": 1.0,
"b": 1.0,
"a": 0.5098
},
"LayoutGroupSortIndex": 0,
"Value": 0,
"Locked": true,
"Grid": true,
"Snap": true,
"IgnoreFoW": false,
"MeasureMovement": false,
"DragSelectable": true,
"Autoraise": true,
"Sticky": true,
"Tooltip": true,
"GridProjection": false,
"HideWhenFaceDown": false,
"Hands": false
}
11 changes: 11 additions & 0 deletions objects/AdversaryBag/contained/8dc86e/script.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
cardInvaderType="L"
cardInvaderStage=2

function onObjectEnterZone(zone, object)
if object ~= self then return end
-- automatically lock the card when it enters the ravage zone
local ravageZoneGUID = "2403e9"
if zone.getGUID() == ravageZoneGUID then
print("locking "..object.getName())
-- a small wait, to allow it to settle onto the board before being locked
Wait.time(function() self.setLock(true) end, 1)
end
end
1 change: 1 addition & 0 deletions objects/index.list
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,4 @@ bd26fc
8d82f8
1d80bc
69ead2
2403e9

0 comments on commit ec70dd6

Please sign in to comment.