Skip to content

Commit

Permalink
1.2.0 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Dolan committed Feb 8, 2021
1 parent 1750c71 commit e6937d2
Show file tree
Hide file tree
Showing 481 changed files with 10,287 additions and 2,444 deletions.
604 changes: 310 additions & 294 deletions global-script.lua

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions objects/00aa5c/object.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@
"Description": "JE",
"GMNotes": "",
"ColorDiffuse": {
"r": 0.19997668266296387,
"g": 0.15683943033218384,
"b": 0.1489962935447693
"r": 0.1999746561050415,
"g": 0.15683740377426147,
"b": 0.14899426698684692
},
"Tags": [
"Spirit"
],
"LayoutGroupSortIndex": 0,
"Locked": true,
"Grid": true,
Expand Down
51 changes: 34 additions & 17 deletions objects/00aa5c/script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
useProgression = false
progressionCard = nil
useAspect = 2
aspect = nil

function onLoad()
Color.Add("SoftBlue", Color.new(0.45,0.6,0.7))
Expand Down Expand Up @@ -64,8 +65,15 @@ function onLoad()
end

function PickSpirit(params)
if params.random.aspect then
useAspect = 1
if params.aspect then
if params.aspect == "Random" then
useAspect = 1
elseif params.aspect == "" then
useAspect = 0
else
useAspect = 3
aspect = params.aspect
end
end
SetupSpirit(nil, params.color)
end
Expand Down Expand Up @@ -96,24 +104,15 @@ function SetupSpirit(object_pick,player_color)
end

-- Setup Ready Token
PlayerBag.takeObject({
local ready = PlayerBag.takeObject({
position = Vector(spos.x,0,spos.z) + Vector(6, 1.1, 7),
rotation = Vector(0, 180, 180),
})
Global.call("removeSpirit", {spirit=self.guid, color=player_color})

-- Setup Aid Tokens
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-10.2, 1.3, -4)})
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-10.2, 1.3, -2)})
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-10.2, 1.3, 0)})
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-9.2, 1.1, -5)})
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-9.2, 1.1, -3)})
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-9.2, 1.1, -1)})
Global.call("removeSpirit", {spirit=self.guid, color=player_color, ready=ready})

-- Setup Energy Counter
local counter = getObjectFromGUID(Global.getVar("counterBag")).takeObject({
position = Vector(spos.x,0,spos.z) + Vector(-5,1,5)
})
local counter = getObjectFromGUID(Global.getVar("counterBag")).takeObject({position = Vector(spos.x,0,spos.z) + Vector(-5,1,5)})
counter.setLock(true)

-- Setup Progression Deck if enabled
Expand Down Expand Up @@ -159,7 +158,7 @@ function SetupSpirit(object_pick,player_color)
end
end
else
broadcastToColor("You already picked a spirit", player_color, "Red")
Player[player_color].broadcast("You already picked a spirit", "Red")
end
end
function HandleAspect(deck, player_color)
Expand All @@ -168,16 +167,34 @@ function HandleAspect(deck, player_color)
elseif useAspect == 1 then
local index = math.random(0,#deck.getObjects())
if index == 0 then
broadcastToColor("Your random Aspect is no Aspect", player_color, Color.SoftBlue)
Player[player_color].broadcast("Your random Aspect is no Aspect", Color.SoftBlue)
deck.destruct()
else
deck.takeObject({
index = index - 1,
position = deck.getPosition() + Vector(0,2,0),
callback_function = function(obj) obj.deal(1, player_color) deck.destruct() broadcastToColor("Your random Aspect is "..obj.getName(), player_color, Color.SoftBlue) end,
callback_function = function(obj) obj.deal(1, player_color) deck.destruct() Player[player_color].broadcast("Your random Aspect is "..obj.getName(), Color.SoftBlue) end,
})
if deck.remainder then deck = deck.remainder end
end
elseif useAspect == 3 then
local found = false
for index, data in pairs(deck.getObjects()) do
if data.name == aspect then
found = true
deck.takeObject({
index = data.index,
position = deck.getPosition() + Vector(0,2,0),
callback_function = function(obj) obj.deal(1, player_color) deck.destruct() end,
})
if deck.remainder then deck = deck.remainder end
break
end
end
if not found then
deck.destruct()
Player[player_color].broadcast("Unable to find aspect "..aspect, "Red")
end
else
deck.deal(#deck.getObjects(), player_color)
end
Expand Down
9 changes: 6 additions & 3 deletions objects/013dfc/object.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@
"Description": "JE",
"GMNotes": "",
"ColorDiffuse": {
"r": 0.20028498768806458,
"g": 0.16033026576042175,
"b": 0.1517685353755951
"r": 0.2002829611301422,
"g": 0.1603282392024994,
"b": 0.15176650881767273
},
"Tags": [
"Spirit"
],
"LayoutGroupSortIndex": 0,
"Locked": true,
"Grid": true,
Expand Down
51 changes: 34 additions & 17 deletions objects/013dfc/script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
useProgression = false
progressionCard = nil
useAspect = 2
aspect = nil

function onLoad()
Color.Add("SoftBlue", Color.new(0.45,0.6,0.7))
Expand Down Expand Up @@ -64,8 +65,15 @@ function onLoad()
end

function PickSpirit(params)
if params.random.aspect then
useAspect = 1
if params.aspect then
if params.aspect == "Random" then
useAspect = 1
elseif params.aspect == "" then
useAspect = 0
else
useAspect = 3
aspect = params.aspect
end
end
SetupSpirit(nil, params.color)
end
Expand Down Expand Up @@ -96,24 +104,15 @@ function SetupSpirit(object_pick,player_color)
end

-- Setup Ready Token
PlayerBag.takeObject({
local ready = PlayerBag.takeObject({
position = Vector(spos.x,0,spos.z) + Vector(6, 1.1, 7),
rotation = Vector(0, 180, 180),
})
Global.call("removeSpirit", {spirit=self.guid, color=player_color})

-- Setup Aid Tokens
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-10.2, 1.3, -4)})
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-10.2, 1.3, -2)})
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-10.2, 1.3, 0)})
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-9.2, 1.1, -5)})
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-9.2, 1.1, -3)})
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-9.2, 1.1, -1)})
Global.call("removeSpirit", {spirit=self.guid, color=player_color, ready=ready})

-- Setup Energy Counter
local counter = getObjectFromGUID(Global.getVar("counterBag")).takeObject({
position = Vector(spos.x,0,spos.z) + Vector(-5,1,5)
})
local counter = getObjectFromGUID(Global.getVar("counterBag")).takeObject({position = Vector(spos.x,0,spos.z) + Vector(-5,1,5)})
counter.setLock(true)

-- Setup Progression Deck if enabled
Expand Down Expand Up @@ -159,7 +158,7 @@ function SetupSpirit(object_pick,player_color)
end
end
else
broadcastToColor("You already picked a spirit", player_color, "Red")
Player[player_color].broadcast("You already picked a spirit", "Red")
end
end
function HandleAspect(deck, player_color)
Expand All @@ -168,16 +167,34 @@ function HandleAspect(deck, player_color)
elseif useAspect == 1 then
local index = math.random(0,#deck.getObjects())
if index == 0 then
broadcastToColor("Your random Aspect is no Aspect", player_color, Color.SoftBlue)
Player[player_color].broadcast("Your random Aspect is no Aspect", Color.SoftBlue)
deck.destruct()
else
deck.takeObject({
index = index - 1,
position = deck.getPosition() + Vector(0,2,0),
callback_function = function(obj) obj.deal(1, player_color) deck.destruct() broadcastToColor("Your random Aspect is "..obj.getName(), player_color, Color.SoftBlue) end,
callback_function = function(obj) obj.deal(1, player_color) deck.destruct() Player[player_color].broadcast("Your random Aspect is "..obj.getName(), Color.SoftBlue) end,
})
if deck.remainder then deck = deck.remainder end
end
elseif useAspect == 3 then
local found = false
for index, data in pairs(deck.getObjects()) do
if data.name == aspect then
found = true
deck.takeObject({
index = data.index,
position = deck.getPosition() + Vector(0,2,0),
callback_function = function(obj) obj.deal(1, player_color) deck.destruct() end,
})
if deck.remainder then deck = deck.remainder end
break
end
end
if not found then
deck.destruct()
Player[player_color].broadcast("Unable to find aspect "..aspect, "Red")
end
else
deck.deal(#deck.getObjects(), player_color)
end
Expand Down
4 changes: 2 additions & 2 deletions objects/055a45/object.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"GMNotes": "",
"ColorDiffuse": {
"r": 0.46227145195007324,
"g": 0.30144670605659485,
"b": 0.2859915792942047
"g": 0.30144354701042175,
"b": 0.285988450050354
},
"LayoutGroupSortIndex": 0,
"Locked": true,
Expand Down
9 changes: 6 additions & 3 deletions objects/07dd23/object.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@
"Description": "Base",
"GMNotes": "",
"ColorDiffuse": {
"r": 0.20027774572372437,
"g": 0.16032302379608154,
"b": 0.15176129341125488
"r": 0.200275719165802,
"g": 0.16032099723815918,
"b": 0.15175926685333252
},
"Tags": [
"Spirit"
],
"LayoutGroupSortIndex": 0,
"Locked": true,
"Grid": true,
Expand Down
51 changes: 34 additions & 17 deletions objects/07dd23/script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
useProgression = false
progressionCard = nil
useAspect = 2
aspect = nil

function onLoad()
Color.Add("SoftBlue", Color.new(0.45,0.6,0.7))
Expand Down Expand Up @@ -64,8 +65,15 @@ function onLoad()
end

function PickSpirit(params)
if params.random.aspect then
useAspect = 1
if params.aspect then
if params.aspect == "Random" then
useAspect = 1
elseif params.aspect == "" then
useAspect = 0
else
useAspect = 3
aspect = params.aspect
end
end
SetupSpirit(nil, params.color)
end
Expand Down Expand Up @@ -96,24 +104,15 @@ function SetupSpirit(object_pick,player_color)
end

-- Setup Ready Token
PlayerBag.takeObject({
local ready = PlayerBag.takeObject({
position = Vector(spos.x,0,spos.z) + Vector(6, 1.1, 7),
rotation = Vector(0, 180, 180),
})
Global.call("removeSpirit", {spirit=self.guid, color=player_color})

-- Setup Aid Tokens
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-10.2, 1.3, -4)})
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-10.2, 1.3, -2)})
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-10.2, 1.3, 0)})
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-9.2, 1.1, -5)})
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-9.2, 1.1, -3)})
PlayerBag.takeObject({position = Vector(spos.x,0,spos.z) + Vector(-9.2, 1.1, -1)})
Global.call("removeSpirit", {spirit=self.guid, color=player_color, ready=ready})

-- Setup Energy Counter
local counter = getObjectFromGUID(Global.getVar("counterBag")).takeObject({
position = Vector(spos.x,0,spos.z) + Vector(-5,1,5)
})
local counter = getObjectFromGUID(Global.getVar("counterBag")).takeObject({position = Vector(spos.x,0,spos.z) + Vector(-5,1,5)})
counter.setLock(true)

-- Setup Progression Deck if enabled
Expand Down Expand Up @@ -159,7 +158,7 @@ function SetupSpirit(object_pick,player_color)
end
end
else
broadcastToColor("You already picked a spirit", player_color, "Red")
Player[player_color].broadcast("You already picked a spirit", "Red")
end
end
function HandleAspect(deck, player_color)
Expand All @@ -168,16 +167,34 @@ function HandleAspect(deck, player_color)
elseif useAspect == 1 then
local index = math.random(0,#deck.getObjects())
if index == 0 then
broadcastToColor("Your random Aspect is no Aspect", player_color, Color.SoftBlue)
Player[player_color].broadcast("Your random Aspect is no Aspect", Color.SoftBlue)
deck.destruct()
else
deck.takeObject({
index = index - 1,
position = deck.getPosition() + Vector(0,2,0),
callback_function = function(obj) obj.deal(1, player_color) deck.destruct() broadcastToColor("Your random Aspect is "..obj.getName(), player_color, Color.SoftBlue) end,
callback_function = function(obj) obj.deal(1, player_color) deck.destruct() Player[player_color].broadcast("Your random Aspect is "..obj.getName(), Color.SoftBlue) end,
})
if deck.remainder then deck = deck.remainder end
end
elseif useAspect == 3 then
local found = false
for index, data in pairs(deck.getObjects()) do
if data.name == aspect then
found = true
deck.takeObject({
index = data.index,
position = deck.getPosition() + Vector(0,2,0),
callback_function = function(obj) obj.deal(1, player_color) deck.destruct() end,
})
if deck.remainder then deck = deck.remainder end
break
end
end
if not found then
deck.destruct()
Player[player_color].broadcast("Unable to find aspect "..aspect, "Red")
end
else
deck.deal(#deck.getObjects(), player_color)
end
Expand Down
Loading

0 comments on commit e6937d2

Please sign in to comment.