Skip to content

Commit

Permalink
1.5.0 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
iakona committed Mar 5, 2021
1 parent 82d9bbc commit 3ec5b4b
Show file tree
Hide file tree
Showing 1,793 changed files with 23,431 additions and 58,697 deletions.
6 changes: 3 additions & 3 deletions objects/00aa5c/object.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"Description": "JE",
"GMNotes": "",
"ColorDiffuse": {
"r": 0.19997379183769226,
"g": 0.15683653950691223,
"b": 0.14899340271949768
"r": 0.19997364282608032,
"g": 0.1568363904953003,
"b": 0.14899325370788574
},
"Tags": [
"Spirit"
Expand Down
43 changes: 27 additions & 16 deletions objects/00aa5c/script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@ useProgression = false
progressionCard = nil
useAspect = 2
aspect = nil
broadcast = nil

function onLoad(saved_data)
if saved_data ~= "" then
local loaded_data = JSON.decode(saved_data)
broadcast = loaded_data.broadcast
end

function onLoad()
Color.Add("SoftBlue", Color.new(0.45,0.6,0.7))
if Global.getVar("gameStarted") then return end

self.createButton({
click_function = "SetupSpirit",
function_owner = self,
Expand Down Expand Up @@ -48,15 +55,15 @@ function onLoad()
progressionCard = obj
self.editButton({
index = 1,
label = "No Progression",
width = 2000,
label = "Progression: No",
width = 2200,
height = 500,
})
elseif string.find(obj.getName(),"Aspects") then
self.editButton({
index = 2,
label = "Include Aspects",
width = 2000,
label = "Aspects: All",
width = 2300,
height = 500,
})
end
Expand Down Expand Up @@ -118,8 +125,8 @@ function SetupSpirit(object_pick,player_color)

-- Setup Ready Token
local ready = PlayerBag.takeObject({
position = Vector(spos.x,0,spos.z) + Vector(7, 1.1, 7),
rotation = Vector(0, 180, 180),
position = Vector(spos.x,0,spos.z) + Vector(7.5, 1.1, 6.5),
rotation = Vector(0, 180, 0),
})

-- Setup Energy Counter
Expand Down Expand Up @@ -151,7 +158,7 @@ function SetupSpirit(object_pick,player_color)
end

-- Setup objects on top of board
for i,obj in pairs(castObjects) do
for _, obj in pairs(castObjects) do
obj.setLock(false)
if obj.type == "Deck" then
if obj.getName() == "Aspects" then
Expand All @@ -170,6 +177,10 @@ function SetupSpirit(object_pick,player_color)
placed = placed + 1
end
end

if broadcast ~= nil then
Player[player_color].broadcast(broadcast, Color.SoftBlue)
end
else
Player[player_color].broadcast("You already picked a spirit", "Red")
end
Expand All @@ -192,7 +203,7 @@ function HandleAspect(deck, player_color)
end
elseif useAspect == 3 then
local found = false
for index, data in pairs(deck.getObjects()) do
for _, data in pairs(deck.getObjects()) do
if data.name == aspect then
found = true
deck.takeObject({
Expand All @@ -218,12 +229,12 @@ function ToggleProgression()
if useProgression then
self.editButton({
index = 1,
label = "Progression",
label = "Progression: Yes",
})
else
self.editButton({
index = 1,
label = "No Progression",
label = "Progression: No",
})
end
end
Expand All @@ -236,17 +247,17 @@ function ToggleAspect(_, _, alt_click)
if useAspect == 0 then
self.editButton({
index = 2,
label = "No Aspects",
label = "Aspects: None",
})
elseif useAspect == 1 then
self.editButton({
index = 2,
label = "Random Aspect",
label = "Aspects: Random",
})
else
self.editButton({
index = 2,
label = "Include Aspects",
label = "Aspects: All",
})
end
end
Expand All @@ -262,8 +273,8 @@ function upCast(obj)
--debug = true,
})
local hitObjects = {}
for i,v in pairs(hits) do
for _, v in pairs(hits) do
if v.hit_object ~= obj then table.insert(hitObjects,v.hit_object) end
end
return hitObjects
end
end
6 changes: 3 additions & 3 deletions objects/013dfc/object.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"Description": "JE",
"GMNotes": "",
"ColorDiffuse": {
"r": 0.20028209686279297,
"g": 0.16032737493515015,
"b": 0.1517656445503235
"r": 0.20028194785118103,
"g": 0.1603272259235382,
"b": 0.15176549553871155
},
"Tags": [
"Spirit"
Expand Down
3 changes: 3 additions & 0 deletions objects/013dfc/script-state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"broadcast": "In order to keep a second Power Card for Days that Never Were, right click the \"Pick Power\" button for the first choice"
}
43 changes: 27 additions & 16 deletions objects/013dfc/script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@ useProgression = false
progressionCard = nil
useAspect = 2
aspect = nil
broadcast = nil

function onLoad(saved_data)
if saved_data ~= "" then
local loaded_data = JSON.decode(saved_data)
broadcast = loaded_data.broadcast
end

function onLoad()
Color.Add("SoftBlue", Color.new(0.45,0.6,0.7))
if Global.getVar("gameStarted") then return end

self.createButton({
click_function = "SetupSpirit",
function_owner = self,
Expand Down Expand Up @@ -48,15 +55,15 @@ function onLoad()
progressionCard = obj
self.editButton({
index = 1,
label = "No Progression",
width = 2000,
label = "Progression: No",
width = 2200,
height = 500,
})
elseif string.find(obj.getName(),"Aspects") then
self.editButton({
index = 2,
label = "Include Aspects",
width = 2000,
label = "Aspects: All",
width = 2300,
height = 500,
})
end
Expand Down Expand Up @@ -118,8 +125,8 @@ function SetupSpirit(object_pick,player_color)

-- Setup Ready Token
local ready = PlayerBag.takeObject({
position = Vector(spos.x,0,spos.z) + Vector(7, 1.1, 7),
rotation = Vector(0, 180, 180),
position = Vector(spos.x,0,spos.z) + Vector(7.5, 1.1, 6.5),
rotation = Vector(0, 180, 0),
})

-- Setup Energy Counter
Expand Down Expand Up @@ -151,7 +158,7 @@ function SetupSpirit(object_pick,player_color)
end

-- Setup objects on top of board
for i,obj in pairs(castObjects) do
for _, obj in pairs(castObjects) do
obj.setLock(false)
if obj.type == "Deck" then
if obj.getName() == "Aspects" then
Expand All @@ -170,6 +177,10 @@ function SetupSpirit(object_pick,player_color)
placed = placed + 1
end
end

if broadcast ~= nil then
Player[player_color].broadcast(broadcast, Color.SoftBlue)
end
else
Player[player_color].broadcast("You already picked a spirit", "Red")
end
Expand All @@ -192,7 +203,7 @@ function HandleAspect(deck, player_color)
end
elseif useAspect == 3 then
local found = false
for index, data in pairs(deck.getObjects()) do
for _, data in pairs(deck.getObjects()) do
if data.name == aspect then
found = true
deck.takeObject({
Expand All @@ -218,12 +229,12 @@ function ToggleProgression()
if useProgression then
self.editButton({
index = 1,
label = "Progression",
label = "Progression: Yes",
})
else
self.editButton({
index = 1,
label = "No Progression",
label = "Progression: No",
})
end
end
Expand All @@ -236,17 +247,17 @@ function ToggleAspect(_, _, alt_click)
if useAspect == 0 then
self.editButton({
index = 2,
label = "No Aspects",
label = "Aspects: None",
})
elseif useAspect == 1 then
self.editButton({
index = 2,
label = "Random Aspect",
label = "Aspects: Random",
})
else
self.editButton({
index = 2,
label = "Include Aspects",
label = "Aspects: All",
})
end
end
Expand All @@ -262,8 +273,8 @@ function upCast(obj)
--debug = true,
})
local hitObjects = {}
for i,v in pairs(hits) do
for _, v in pairs(hits) do
if v.hit_object ~= obj then table.insert(hitObjects,v.hit_object) end
end
return hitObjects
end
end
11 changes: 6 additions & 5 deletions objects/029995/script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function onLoad()
end

function updateButton()
label = "Show\nReminders"
local label = "Show\nReminders"
if empty then
label = "Hide\nReminders"
end
Expand Down Expand Up @@ -74,17 +74,18 @@ function toggleObjects()
end
empty = false
else
for _,obj in pairs(self.getObjects()) do
for _, bagObject in pairs(self.getObjects()) do
self.takeObject({
guid = obj.guid,
position = contents[obj.guid][1],
rotation = contents[obj.guid][2],
guid = bagObject.guid,
position = contents[bagObject.guid][1],
rotation = contents[bagObject.guid][2],
callback_function = function(obj) obj.setLock(true) objectsMoved = objectsMoved + 1 end,
})
count = count + 1
end
empty = true
end
local timerID
timerID = Wait.time(function()
if count == objectsMoved then
updateButton()
Expand Down
37 changes: 0 additions & 37 deletions objects/036009/object.json

This file was deleted.

8 changes: 4 additions & 4 deletions objects/04397d/object.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
},
"LayoutGroupSortIndex": 0,
"Locked": true,
"Grid": true,
"Snap": true,
"Grid": false,
"Snap": false,
"IgnoreFoW": false,
"MeasureMovement": false,
"DragSelectable": true,
"Autoraise": true,
"Sticky": true,
"Sticky": false,
"Tooltip": true,
"GridProjection": false,
"HideWhenFaceDown": false,
"Hands": true,
"Hands": false,
"CardID": 17500,
"SidewaysCard": false,
"CustomDeck": {
Expand Down
2 changes: 1 addition & 1 deletion objects/04397d/script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ function PostSetup(params)
end

postSetupComplete = true
end
end
Loading

0 comments on commit 3ec5b4b

Please sign in to comment.