Skip to content

Commit

Permalink
1.4.2 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
iakona committed Feb 21, 2021
1 parent 0bc45ce commit 82d9bbc
Show file tree
Hide file tree
Showing 160 changed files with 475 additions and 407 deletions.
130 changes: 63 additions & 67 deletions global-script.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---- Versioning
version = "1.4.1"
version = "1.4.2"
versionGuid = "57d9fe"
---- Used with Spirit Board Scripts
counterBag = "5f595a"
Expand Down Expand Up @@ -839,6 +839,24 @@ function SetupPowerDecks()
getObjectFromGUID(minorPowerZone).getObjects()[1].shuffle()
getObjectFromGUID(majorPowerZone).getObjects()[1].shuffle()

exploratoryPowersDone = false
if not gameStarted and SetupChecker.getVar("exploratoryVOTD") then
local deck = getObjectFromGUID(majorPowerZone).getObjects()[1]
deck.takeObject({
guid = "152fe0",
callback_function = function(obj)
local temp = obj.setState(2)
Wait.frames(function()
deck.putObject(temp)
deck.shuffle()
exploratoryPowersDone = true
end, 1)
end,
})
else
exploratoryPowersDone = true
end

SetupChecker.setScale(Vector(1,1,1))
SetupChecker.setRotationSmooth(Vector(0,180,0))
SetupChecker.setPositionSmooth(Vector(-41.95,0.2,-7.97))
Expand Down Expand Up @@ -885,7 +903,7 @@ function SetupPowerDecks()
tooltip = "Click to learn a Minor Power",
})
stagesSetup = stagesSetup + 1
end, function() return not SetupChecker.isSmoothMoving() end)
end, function() return not SetupChecker.isSmoothMoving() and exploratoryPowersDone end)
return 1
end
handOffset = Vector(0,0,35)
Expand Down Expand Up @@ -1803,7 +1821,6 @@ function PostSetup()

local postSetupSteps = 0
local firstAdversarySetup = false
local exploratoryPowersDone = false

if adversaryCard == nil then
difficultyString = difficultyString.."No Adversary\n"
Expand All @@ -1820,24 +1837,6 @@ function PostSetup()
difficultyString = difficultyString.."Difficulty "..difficulty
createDifficultyButton()

if SetupChecker.getVar("exploratoryVOTD") then
local deck = getObjectFromGUID(majorPowerZone).getObjects()[1]
deck.takeObject({
guid = "152fe0",
callback_function = function(obj)
local temp = obj.setState(2)
Wait.frames(function()
deck.putObject(temp)
deck.shuffle()
postSetupSteps = postSetupSteps + 1
exploratoryPowersDone = true
end, 1)
end,
})
else
postSetupSteps = postSetupSteps + 1
exploratoryPowersDone = true
end
if SetupChecker.getVar("exploratoryBODAN") then
local spirit = getObjectFromGUID("606f23").setState(2)
if not SetupChecker.call("isSpiritPickable", {guid = "606f23"}) then
Expand Down Expand Up @@ -1866,59 +1865,59 @@ function PostSetup()
postSetupSteps = postSetupSteps + 1
end
if scenarioCard ~= nil and scenarioCard.getVar("postSetup") then
-- Wait for all exploratory powers to have state changed
Wait.condition(function()
scenarioCard.call("PostSetup",{})
Wait.condition(function() postSetupSteps = postSetupSteps + 1 end, function() return scenarioCard.getVar("postSetupComplete") end)
end, function() return exploratoryPowersDone end)
scenarioCard.call("PostSetup",{})
Wait.condition(function() postSetupSteps = postSetupSteps + 1 end, function() return scenarioCard.getVar("postSetupComplete") end)
else
postSetupSteps = postSetupSteps + 1
end

if not useBnCEvents and not useJEEvents and (BnCAdded or JEAdded) then
local zone = getObjectFromGUID(invaderDeckZone)
local invaderDeck = zone.getObjects()[1]
local cards = invaderDeck.getObjects()
local stageII = nil
local stageIII = nil
for _,card in pairs(cards) do
local start,finish = string.find(card.lua_script,"cardInvaderStage=")
if start ~= nil then
local stage = tonumber(string.sub(card.lua_script,finish+1))
local special = string.find(card.lua_script,"special=")
if special ~= nil then
stage = stage - 1
-- Setup up command cards last
Wait.condition(function()
local zone = getObjectFromGUID(invaderDeckZone)
local invaderDeck = zone.getObjects()[1]
local cards = invaderDeck.getObjects()
local stageII = nil
local stageIII = nil
for _,card in pairs(cards) do
local start,finish = string.find(card.lua_script,"cardInvaderStage=")
if start ~= nil then
local stage = tonumber(string.sub(card.lua_script,finish+1))
local special = string.find(card.lua_script,"special=")
if special ~= nil then
stage = stage - 1
end
if stage == 2 and stageII == nil then
stageII = card.index
elseif stage == 3 and stageIII == nil then
stageIII = card.index
end
end
if stage == 2 and stageII == nil then
stageII = card.index
elseif stage == 3 and stageIII == nil then
stageIII = card.index
if stageII ~= nil and stageIII ~= nil then
break
end
end
if stageII ~= nil and stageIII ~= nil then
break
end
end
if stageII == nil then stageII = 0 end
if stageIII == nil then stageIII = 0 end
if stageII <= stageIII then stageIII = stageIII + 1 end
if stageII == nil then stageII = 0 end
if stageIII == nil then stageIII = 0 end
if stageII <= stageIII then stageIII = stageIII + 1 end

setupCommandCard(invaderDeck, stageII, "d46930")
Wait.condition(function()
setupCommandCard(invaderDeck, stageIII, "a578fe")
Wait.condition(function() postSetupSteps = postSetupSteps + 1 end, function()
setupCommandCard(invaderDeck, stageII, "d46930")
Wait.condition(function()
setupCommandCard(invaderDeck, stageIII, "a578fe")
Wait.condition(function() postSetupSteps = postSetupSteps + 1 end, function()
local objs = zone.getObjects()
return #objs == 1 and objs[1].type == "Deck" and #objs[1].getObjects() == #cards + 2
end)
end, function()
local objs = zone.getObjects()
return #objs == 1 and objs[1].type == "Deck" and #objs[1].getObjects() == #cards + 2
return #objs == 1 and objs[1].type == "Deck" and #objs[1].getObjects() == #cards + 1
end)
end, function()
local objs = zone.getObjects()
return #objs == 1 and objs[1].type == "Deck" and #objs[1].getObjects() == #cards + 1
end)
end, function() return postSetupSteps == 4 end)
else
postSetupSteps = postSetupSteps + 1
end

Wait.condition(function() stagesSetup = stagesSetup + 1 end, function()log(postSetupSteps) return postSetupSteps == 6 end)
Wait.condition(function() stagesSetup = stagesSetup + 1 end, function() return postSetupSteps == 5 end)
return 1
end
function createDifficultyButton()
Expand Down Expand Up @@ -1956,7 +1955,6 @@ end
function StartGame()
gamePaused = false
gameStarted = true
exploratory()
enableUI()
seaTile.registerCollisions(false)
Wait.time(readyCheck,1,-1)
Expand Down Expand Up @@ -1994,8 +1992,6 @@ function StartGame()
end
return 1
end
function exploratory()
end
function enableUI()
local colors = {}
for color,_ in pairs(PlayerBags) do
Expand Down Expand Up @@ -2829,15 +2825,13 @@ function deleteObject(obj, fear)
bag = townBag
if fear then
aidBoard.call("addFear")
aidBoard.call("addFear")
end
elseif string.sub(obj.getName(),1,4) == "City" then
obj.setRotation(Vector(0,180,0))
bag = cityBag
if fear then
aidBoard.call("addFear")
aidBoard.call("addFear")
aidBoard.call("addFear")
end
elseif obj.getName() == "Blight" then
obj.setRotation(Vector(0,180,0))
Expand Down Expand Up @@ -3050,13 +3044,13 @@ function setupPlayerArea(params)
-- Energy Cost (button index 0)
obj.createButton({
label="Energy Cost: ?", click_function="nullFunc",
position={0,3.2,-11.2}, rotation={0,180,0}, height=0, width=0,
position={0.2,3.2,-11.2}, rotation={0,180,0}, height=0, width=0,
font_color={1,1,1}, font_size=500
})
-- Pay Energy (button index 1)
obj.createButton({
label="", click_function="nullFunc", function_owner=Global,
position={-5,3.2,-11.2}, rotation={0,180,0}, height=0, width=0,
position={-4.8,3.2,-11.2}, rotation={0,180,0}, height=0, width=0,
font_color="White", font_size=500,
})
-- Other buttons to follow/be fixed later.
Expand Down Expand Up @@ -3138,7 +3132,8 @@ function setupPlayerArea(params)
for j = 1, 8 do
outTable[j] = outTable[j] + elemTable[j]
end
if inTableOfElemStrCards[i].getVar("energy") ~= nil then
-- Skip counting locked card's energy (Aid from Lesser Spirits)
if not inTableOfElemStrCards[i].getLock() and inTableOfElemStrCards[i].getVar("energy") ~= nil then
energy = energy + inTableOfElemStrCards[i].getVar("energy")
end
end
Expand Down Expand Up @@ -3364,6 +3359,7 @@ function updateSwapButtons()
end
end
function updatePlaySpiritButton(color)
if color == "Grey" then return end
if Player[color].seated or (not selectedColors[color] and not showAllMultihandedButtons) then
playerTables[color].editButton({index=2, label="", height=0, width=0})
else
Expand Down
6 changes: 3 additions & 3 deletions note.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@




Spawn Tokens:
Spawn Objects:
Num 1 - Explorer
Num 2 - Town
Num 3 - City
Expand All @@ -22,4 +21,5 @@ Num 6 - Strife
Num 7 - Beasts
Num 8 - Wilds
Num 9 - Disease
Num 0 - Dahan
Num 0 - Dahan
For more keybindings: Options -> Game Keys
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.19997349381446838,
"g": 0.15683624148368835,
"b": 0.1489931046962738
"r": 0.19997379183769226,
"g": 0.15683653950691223,
"b": 0.14899340271949768
},
"Tags": [
"Spirit"
Expand Down
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.2002817988395691,
"g": 0.16032707691192627,
"b": 0.1517653465270996
"r": 0.20028209686279297,
"g": 0.16032737493515015,
"b": 0.1517656445503235
},
"Tags": [
"Spirit"
Expand Down
4 changes: 2 additions & 2 deletions objects/029995/script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function toggleObjects()
if empty then
for guid,_ in pairs(contents) do
local obj = getObjectFromGUID(guid)
if obj ~= nil then
if obj ~= nil and obj.getLock() then
obj.setLock(false)
self.putObject(obj)
count = count + 1
Expand All @@ -91,4 +91,4 @@ function toggleObjects()
Wait.stop(timerID)
end
end, 1, -1)
end
end
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.30144110321998596,
"b": 0.2859860062599182
"g": 0.3014417290687561,
"b": 0.28598663210868835
},
"LayoutGroupSortIndex": 0,
"Locked": true,
Expand Down
6 changes: 3 additions & 3 deletions objects/07dd23/object.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"Description": "Base",
"GMNotes": "",
"ColorDiffuse": {
"r": 0.20027455687522888,
"g": 0.16031983494758606,
"b": 0.1517581045627594
"r": 0.20027485489845276,
"g": 0.16032013297080994,
"b": 0.15175840258598328
},
"Tags": [
"Spirit"
Expand Down
4 changes: 2 additions & 2 deletions objects/0925a3/object.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"GMNotes": "",
"ColorDiffuse": {
"r": 0.8549019694328308,
"g": 0.09802991896867752,
"b": 0.09018752723932266,
"g": 0.0980302169919014,
"b": 0.09018778055906296,
"a": 0.0
},
"LayoutGroupSortIndex": 0,
Expand Down
4 changes: 2 additions & 2 deletions objects/0b27de/object.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"GMNotes": "",
"ColorDiffuse": {
"r": 0.8549019694328308,
"g": 0.09802991896867752,
"b": 0.09018752723932266,
"g": 0.0980302169919014,
"b": 0.09018778055906296,
"a": 0.0
},
"LayoutGroupSortIndex": 0,
Expand Down
2 changes: 1 addition & 1 deletion objects/0cad5e/object.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"posX": -55.70000076293945,
"posY": 1.0031410455703735,
"posZ": 49.58000183105469,
"rotX": -6.801671226241979e-09,
"rotX": -4.552912713506885e-08,
"rotY": 179.9802703857422,
"rotZ": 180.0,
"scaleX": 1.5299999713897705,
Expand Down
4 changes: 2 additions & 2 deletions objects/0db997/object.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"GMNotes": "",
"ColorDiffuse": {
"r": 0.8549019694328308,
"g": 0.09802991896867752,
"b": 0.09018752723932266,
"g": 0.0980302169919014,
"b": 0.09018778055906296,
"a": 0.0
},
"LayoutGroupSortIndex": 0,
Expand Down
4 changes: 2 additions & 2 deletions objects/108d0b/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.3014419674873352,
"b": 0.28598687052726746
"g": 0.30144262313842773,
"b": 0.2859874963760376
},
"LayoutGroupSortIndex": 0,
"Locked": true,
Expand Down
4 changes: 2 additions & 2 deletions objects/139905/object.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"GMNotes": "",
"ColorDiffuse": {
"r": 0.8549019694328308,
"g": 0.09802991896867752,
"b": 0.09018752723932266,
"g": 0.0980302169919014,
"b": 0.09018778055906296,
"a": 0.0
},
"LayoutGroupSortIndex": 0,
Expand Down
4 changes: 2 additions & 2 deletions objects/13aabd/object.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"GMNotes": "",
"ColorDiffuse": {
"r": 0.8549019694328308,
"g": 0.09802991896867752,
"b": 0.09018752723932266,
"g": 0.0980302169919014,
"b": 0.09018778055906296,
"a": 0.0
},
"LayoutGroupSortIndex": 0,
Expand Down
Loading

0 comments on commit 82d9bbc

Please sign in to comment.