Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Tables and Variables --------------------------------------------------------
- name = ""
- monsterSelected = ""
- pos = {24.96, 4.01, 1.79}
- showdown_box = nil
- -- updated
- pos_deckBasic = { - 27.98, 2, 16.82}
- pos_deckMonst = { - 24.77, 2, 16.70}
- huntPos1 = { - 13.10, 4.00, 27.57}
- huntPos2 = { - 10.46, 4.00, 27.57}
- huntPos3 = { - 7.85, 4.00, 27.57}
- huntPos4 = { - 5.21, 4.00, 27.57}
- huntPos5 = { - 2.61, 4.00, 27.57}
- huntPos6 = {2.60, 4.00, 27.57}
- huntPos7 = {5.27, 4.00, 27.57}
- huntPos8 = {7.89, 4.00, 27.57}
- huntPos9 = {10.52, 4.00, 27.57}
- huntPos10 = {13.15, 4.00, 27.57}
- indom_pos = {3.95, 0.33, - 22.20}
- indom_rot = {2.00, 180, 0.00}
- -- Card/Deck takeObject Rotations
- zoneAI_rot = {5.86, 180.0, 180.00}
- trait_rot = {4.87, 180.0, 0.00}
- surv_status_rot = {4.94, 180, 0.00}
- -- monster figure positions
- monst_2x2_pos = {0.09, 4, 5.31}
- monst_3x3_pos = {1.56, 4, 4.01}
- monst_4x4_pos = {0.06, 4, 5.10}
- hunt_Phase = false
- monstersSetup = {}
- -- Dice Rolling Functions ------------------------------------------------------
- -- function clickRollButton
- -- function rollDice
- -- function clearDice
- -- function watchDice
- -- function getd100Total
- -- function get_hunt_event
- -- Buttons ---------------------------------------------------------------------
- -- function set_btn_params
- -- function createButtons_nemesis
- -- function createButtons_quarry
- -- View Quarries and Nemesis ---------------------------------------------------
- -- function view_Quarry
- -- function close_Quarry
- -- function view_Nemesis
- -- function close_Nemesis
- -- function view_legendaries
- -- function special_showdown
- -- Depart ----------------------------------------------------------------------
- -- function departClick
- -- function calculate_departing_bonuses
- -- function departCoroutine
- -- function departSurv
- -- function checkStinkyGear
- -- function checkOtherGear
- -- Return ----------------------------------------------------------------------
- -- function returnClick
- -- function returnCoroutine
- -- function returnSurv
- -- function spawnEndeavor
- -- function spawnTinkerEndeavor
- -- Set Quarries ----------------------------------------------------------------
- -- Set Nemesis -----------------------------------------------------------------
- -- Setup Levels ----------------------------------------------------------------
- -- function setup_level1
- -- function setup_level2
- -- function setup_level3
- -- function setup_level4
- -- Get Showdown Bag / Monster Story --------------------------------------------
- -- function load_monster_box
- -- function load_showdown_story_set_board_state
- -- Setup Terrain Decks ---------------------------------------------------------
- -- function get_terrain_deck
- -- function set_terrain_cards
- -- Setup Hunt Decks ------------------------------------------------------------
- -- function get_hunt_decks
- -- function deal_hunt_event_cards
- -- Utility Functions -----------------------------------------------------------
- -- function updateDisplay
- -- function resetTemps
- -- function plus
- -- function minus
- -- function changeAllSurvivors
- -- function changeSurvivors
- -- function changeMonster
- -- function wait
- -- function raise_hunt_figurine_after_load
- -- function dud
- function onLoad()
- createButtons()
- reset_obj_toLoad()
- spawnedDice = {}
- -- Objects ------------------------------------------------------------------
- bag_d100 = getObjectFromGUID('d0d4ff')
- bag_d10 = getObjectFromGUID('2989bc')
- deck_hunt_events = getObjectFromGUID('c14d81')
- gameBox = getObjectFromGUID(Global.getTable('bags').gameBox.guid)
- monsterBoard = getObjectFromGUID(Global.getTable("boards").boardMonster.guid)
- current_showdown_lvl = getObjectFromGUID(Global.getTable('user_settings').current_showdown_lvl.guid)
- terrainBox = getObjectFromGUID(Global.getTable('bags').terrainBox.guid)
- -- Zones --------------------------------------------------------------------
- zoneInjuryBoard = getObjectFromGUID(Global.getTable('zones').zoneInjuryBoard.guid)
- zoneShowdown = getObjectFromGUID(Global.getTable('zonesDestruct').zoneShowdown.guid)
- zoneAIBoard = getObjectFromGUID(Global.getTable('zones').zoneAIBoard.guid)
- -- Positions ----------------------------------------------------------------
- monster_resource_pos = Global.getTable('monster_resource_pos')
- basic_action_pos = Global.getTable('basic_action_pos')
- -----------------------------------------------------------------------------
- HL_discard_pos = Global.getTable('HL_discard_pos')
- HL_deck_pos = Global.getTable('HL_deck_pos')
- -----------------------------------------------------------------------------
- surv_status_card_p1 = Global.getTable('surv_status_card_p1')
- surv_status_card_p2 = Global.getTable('surv_status_card_p2')
- surv_status_card_p3 = Global.getTable('surv_status_card_p3')
- surv_status_card_p4 = Global.getTable('surv_status_card_p4')
- -----------------------------------------------------------------------------
- AI_discard_pos = Global.getTable('AI_discard_pos')
- AI_deck_pos = Global.getTable('AI_deck_pos')
- AI_wound_pos = Global.getTable('AI_wound_pos')
- basic_deck_pos = Global.getTable('basic_deck_pos')
- advanced_deck_pos = Global.getTable('advanced_deck_pos')
- legendary_deck_pos = Global.getTable('legendary_deck_pos')
- -----------------------------------------------------------------------------
- terrainPos1 = Global.getTable('terrainPos1')
- terrainPos2 = Global.getTable('terrainPos2')
- terrainPos3 = Global.getTable('terrainPos3')
- terrainPos4 = Global.getTable('terrainPos4')
- terrainPos5 = Global.getTable('terrainPos5')
- terrainPos6 = Global.getTable('terrainPos6')
- terrainPos7 = Global.getTable('terrainPos7')
- terrainPos8 = Global.getTable('terrainPos8')
- -----------------------------------------------------------------------------
- inj_pos = {
- Global.getTable('inj_pos_1'),
- Global.getTable('inj_pos_2'),
- Global.getTable('inj_pos_3'),
- Global.getTable('inj_pos_4'),
- Global.getTable('inj_pos_5'),
- Global.getTable('inj_pos_6'),
- Global.getTable('inj_pos_7'),
- Global.getTable('inj_pos_8'),
- Global.getTable('inj_pos_9'),
- Global.getTable('inj_pos_10'),
- Global.getTable('inj_pos_11'),
- Global.getTable('inj_pos_12'),
- Global.getTable('inj_pos_13'),
- Global.getTable('inj_pos_14'),
- Global.getTable('inj_pos_15'),
- }
- -- bag_quarry_showdowns = getObjectFromGUID('f18343')
- -- bag_nemesis_showdowns = getObjectFromGUID('3cb738')
- -- Available Monster Display
- -- bag_Quarry = getObjectFromGUID('6e836f')
- -- bag_Nemesis = getObjectFromGUID('e59309')
- -- Hunt Phase Setup Bag
- -- bag_Hunt = getObjectFromGUID('3bc832')
- -- For Setting Monster Stats
- -- Token used to get Rotation for ifHunt
- -- huntLoaded = getObjectFromGUID('50ec55')
- loadMonsterStats()
- end
- function loadMonsterStats()
- monstersSetup["Dragon King"] = {
- stats = {{mov = 10, tgh = 13}, {mov = 10, tgh = 15, spd = 1, dmg = 1}, {mov = 10, tgh = 17, spd = 2, dmg = 2, lck = 1}},
- hunt_fig_pos = {huntPos5, huntPos7, huntPos9},
- obj_toLoad_all = {"Irradiate", "Unseen Agony"},
- obj_toLoad_lvl = {{}, {}, {"Smolder"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}},
- terrain_toLoad = {"Toppled Pillar 1", "Toppled Pillar 2", "Stone Columns 1", "Stone Columns 2", "Stone Columns 3", "Lava Pool", "Obsidian Tower"},
- terrain_toLoad_pos = {{pos = { - 12.46, 0.62, 15.12}, rot = {0, 270, 0}}, {pos = {12.87, 0.62, - 4.60}, rot = {0, 270, 0}}, {pos = { - 5.32, 0.50, - 6.69}, rot = {0, 180, 0}}, {pos = { - 11.66, 0.45, - 0.92}, rot = {0, 90, 0}}, {pos = {5.38, 0.50, 16.96}, rot = {0, 270, 0}}, {pos = {26.56, 1.25, 0.65}, rot = {0, 0, 0}}, {pos = {26.47, 1.28, 4.11}, rot = {0, 0, 0}}},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "Irradiate Font", monst_fig_pos = monst_4x4_pos
- }
- monstersSetup["Dung Beetle Knight"] = {
- stats = {{mov = 7, tgh = 12}, {mov = 7, tgh = 14, spd = 1, dmg = 1}, {mov = 9, tgh = 11, spd = 1, dmg = 2}, {mov = 8, tgh = 18, spd = 2, dmg = 2, acc = 1, evs = 1}},
- hunt_fig_pos = {huntPos5, huntPos7, huntPos9},
- obj_toLoad_all = {"Baller", "Power Forward", "Separation Anxiety", "Ground Pound"},
- obj_toLoad_lvl = {{}, {"Heavy Load"}, {"Heavy Load", "Burrow"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}, {pos = inj_pos[4], rot = trait_rot}, {pos = inj_pos[5], rot = trait_rot}, {pos = inj_pos[6], rot = trait_rot}},
- terrain_toLoad = {"Stone Columns 1", "Stone Columns 2", "Stone Columns 3", "Stone Columns 4", "Stone Columns 5", "Stone Columns 6", "Resin Dung Ball", "Bug Patch"},
- terrain_toLoad_pos = {{pos = { - 15.30, 0.44, 13.45}, rot = {0, 90, 0}}, {pos = {15.52, 0.44, 13.52}, rot = {0, 90, 0}}, {pos = {11.85, 0.44, 5.92}, rot = {0, 90, 0}}, {pos = { - 11.61, 0.44, 5.91}, rot = {0, 90, 0}}, {pos = { - 15.43, 0.44, - 3.20}, rot = {0, 90, 0}}, {pos = {15.56, 0.44, - 3.09}, rot = {0, 90, 0}}, {pos = {0.09, 0.53, 8.76}, rot = {0, 270, 0}}, {pos = { - 0.82, 0.60, 11.49}, rot = {0, 180, 180}}},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "Smell World Font", monst_fig_pos = monst_2x2_pos
- }
- monstersSetup["Flower Knight"] = {
- stats = {{mov = 7, tgh = 6}, {mov = 8, tgh = 8, dmg = 1}, {mov = 9, tgh = 11, spd = 1, dmg = 2}},
- hunt_fig_pos = {huntPos7, huntPos8, huntPos9},
- obj_toLoad_all = {"Bloom", "Set Roots", "The Forest Gate"},
- obj_toLoad_lvl = {{}, {"Razor Bulbs"}, {"Razor Bulbs", "Perfect Aim", "Heart of the Woods"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = {0.02, 3.37, 27.58}, rot = {4.07, 179.99, 0.00}}, {pos = inj_pos[3], rot = trait_rot}, {pos = inj_pos[4], rot = trait_rot}, {pos = inj_pos[5], rot = trait_rot}},
- terrain_toLoad = {"Fairy Ring", "Flower Patches"},
- terrain_toLoad_pos = {{pos = {0.14, 0.77, 5.16}, rot = {0, 90, 0}}, {pos = { - 7.92, 0.69, 0.62}, rot = {0, 180, 0}}},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "Flower Funnel Font", monst_fig_pos = monst_2x2_pos
- }
- monstersSetup["Gorm"] = {
- stats = {{mov = 6, tgh = 8}, {mov = 9, tgh = 11, spd = 1, dmg = 1}, {mov = 8, tgh = 15, spd = 2, dmg = 2, lck = 1}},
- hunt_fig_pos = {huntPos4, huntPos6, huntPos10},
- obj_toLoad_all = {},
- obj_toLoad_lvl = {{}, {"Musth", "Gorm's Den"}, {"Ancient Tusks", "Gormyard"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}},
- terrain_toLoad = {"Tall Grass 1", "Tall Grass 2"},
- terrain_toLoad_pos = {{pos = { - 3.49, 0.57, 8.78}, rot = {0, 270, 0}}, {pos = {5.53, 0.57, - 0.21}, rot = {0, 270, 0}}},
- card_toLoad = {},
- card_toLoad_pos = {},
- -- fromGameBox = {"Gorm Bulb Effect", "Posturing Piss Miasma"},
- -- fromGameBox_pos = {{pos = {79.50, 4.11, 46.94}, rot = {0, 0, 0}}, {pos = {79.50, 4.11, 50}, rot = {0, 0, 0}}},
- font_toLoad = "", monst_fig_pos = monst_3x3_pos
- }
- -- if obj.name == "Gorm Bulb Effect" then
- -- gameBox.takeObject({guid = obj.guid, position = {79.50, 4.11, 46.94}, rotation = {0, 0, 0}, smooth = false})
- -- elseif obj.name == "Posturing Piss Miasma" then
- -- gameBox.takeObject({guid = obj.guid, position = {79.50, 4.11, 50}, rotation = {0, 0, 0}, smooth = false})
- -- end
- monstersSetup["Phoenix"] = {
- stats = {{mov = 8, tgh = 14}, {mov = 8, tgh = 12, spd = 1, dmg = 1}, {mov = 8, tgh = 17, spd = 2, dmg = 3, lck = 2}, {mov = 10, tgh = 25, spd = 3, dmg = 3, lck = 1000, evs = 1, acc = 2}},
- hunt_fig_pos = {huntPos5, huntPos7, huntPos10, huntPos10},
- obj_toLoad_all = {"Materialize", "Spiral Age", "Zeal"},
- obj_toLoad_lvl = {{}, {"Top of the Food Chain"}, {"Top of the Food Chain"}, {"Top of the Food Chain", "Life Trait", "Berserker", "Golden Eyes"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}, {pos = inj_pos[4], rot = trait_rot}, {pos = AI_discard_pos, rot = zoneAI_rot}, {pos = { - 2.67, 0.51, - 17.23}, rot = zoneAI_rot}, {pos = inj_pos[11], rot = trait_rot}},
- terrain_toLoad = {"Nightmare Tree", "Proxy P1", "Proxy P2", "Proxy P3", "Proxy P4", "Age Counter P1", "Age Counter P2", "Age Counter P3", "Age Counter P4"},
- terrain_toLoad_pos = {{pos = {1.09, 0.60, 6.11}, rot = {0, 180, 0}}, {pos = { - 2.19, 0.62, 7.73}, rot = {0, 180, 0}}, {pos = { - 2.19, 0.62, 6.62}, rot = {0, 180, 0}}, {pos = { - 2.19, 0.62, 5.53}, rot = {0, 180, 0}}, {pos = { - 2.19, 0.62, 4.42}, rot = {0, 180, 0}}, {pos = { - 2.25, 0.36, - 22.40}, rot = {5, 180, 0}}, {pos = { - 0.75, 0.36, - 22.40}, rot = {5, 180, 0}}, {pos = {0.75, 0.33, - 22.40}, rot = {5, 180, 0}}, {pos = {2.25, 0.33, - 22.40}, rot = {5, 180, 0}}},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "", monst_fig_pos = {1.09, 4.00, 6.11}
- }
- monstersSetup["Lion God"] = {
- stats = {{mov = 8, tgh = 10}, {mov = 9, tgh = 16, spd = 1, dmg = 1, lck = 1}, {mov = 10, tgh = 21, spd = 2, dmg = 3, evs = 1, lck = 2}},
- hunt_fig_pos = {huntPos6, huntPos8, huntPos10},
- obj_toLoad_all = {"Whiplash", "Hollow Earth", "Heft"},
- obj_toLoad_lvl = {{}, {"Divine Prowess"}, {"Divine Prowess", "Immaculate Intuition"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}, {pos = inj_pos[4], rot = trait_rot}, {pos = inj_pos[5], rot = trait_rot}},
- terrain_toLoad = {"Toppled Pillar 1", "Toppled Pillar 2", "Stone Columns 1", "Stone Columns 2", "Stone Columns 3", "Stone Columns 4", "Lion Statue 1", "Lion Statue 2", "Lion Statue 3", "Lion Statue 4", "Giant Stone Face 1", "Giant Stone Face 2", "Sinkhole Terrain"},
- terrain_toLoad_pos = {{pos = { - 8.80, 0.62, 4.22}, rot = {0, 270, 0}}, {pos = {11.05, 0.62, 4.33}, rot = {0, 270, 0}}, {pos = { - 17.17, 0.44, 9.49}, rot = {0, 270, 0}}, {pos = { - 17.18, 0.44, 0.42}, rot = {0, 270, 0}}, {pos = {17.36, 0.44, 9.68}, rot = {0, 270, 0}}, {pos = {17.38, 0.44, 0.47}, rot = {0, 270, 0}}
- , {pos = { - 5.29, 0.65, 10.51}, rot = {0, 0, 0}}, {pos = { - 5.24, 0.65, - 2.08}, rot = {0, 0, 0}}, {pos = {7.30, 0.65, 10.52}, rot = {0, 0, 0}}, {pos = {7.30, 0.65, - 2.13}, rot = {0, 0, 0}}, {pos = {0.91, 0.25, 12.44}, rot = {0, 270, 0}}, {pos = {1.11, 0.25, - 3.93}, rot = {0, 90, 0}}, {pos = {26.13, 1.33, 16.01}, rot = {0, 180, 0}}},
- card_toLoad = {"Stone Columns", "Giant Stone Face", "Toppled Pillar"},
- card_toLoad_pos = {{pos = terrainPos1, rot = surv_status_rot}, {pos = terrainPos2, rot = surv_status_rot}, {pos = terrainPos3, rot = surv_status_rot}},
- font_toLoad = "Impaled Font", monst_fig_pos = monst_3x3_pos
- }
- monstersSetup["Screaming Antelope"] = {
- stats = {{mov = 6, tgh = 8}, {mov = 6, tgh = 10, spd = 1, dmg = 1}, {mov = 8, tgh = 12, spd = 2, dmg = 2, evs = 1}},
- hunt_fig_pos = {huntPos4, huntPos7, huntPos9},
- obj_toLoad_all = {},
- obj_toLoad_lvl = {{}, {"Diabolical"}, {"Diabolical", "Hypermetabolism", "Legendary Horns"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}},
- terrain_toLoad = {"Acanthus Plants 1", "Acanthus Plants 2", "Acanthus Plants 3", "Acanthus Plants 4", "Acanthus Plants 5", "Acanthus Plants 6", "Bug Patch Terrain"},
- terrain_toLoad_pos = {{pos = { - 4.55, 0.71, 9.87}, rot = {0, 180, 0}}, {pos = { - 8.01, 0.71, 6.12}, rot = {0, 180, 0}}, {pos = { - 4.36, 0.71, 0.69}, rot = {0, 180, 0}}, {pos = {4.67, 0.71, 9.74}, rot = {0, 180, 0}}, {pos = {8.27, 0.71, 4.42}, rot = {0, 180, 0}}, {pos = {4.55, 0.71, 0.72}, rot = {0, 180, 0}}, {pos = {1.00, 0.60, - 4.76}, rot = {0, 180, 0}}},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "Gobbled Up Font", monst_fig_pos = monst_2x2_pos
- }
- monstersSetup["Spidicules"] = {
- stats = {{mov = 11, tgh = 8}, {mov = 14, tgh = 10, spd = 1, dmg = 1}, {mov = 16, tgh = 12, spd = 2, dmg = 2}},
- hunt_fig_pos = {huntPos4, huntPos6, huntPos9},
- obj_toLoad_all = {"Twitching Leg Pile", "Spawn", "Spiderling Action", "The Forest Gate"},
- obj_toLoad_lvl = {{"Frantic Spinning"}, {"Hivemind", "Feeding Time"}, {"Hivemind", "Necrotoxins", "10,000 Teeth"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}, {pos = {0.02, 3.37, 27.58}, rot = {4.07, 179.99, 0.00}}, {pos = inj_pos[4], rot = trait_rot}, {pos = inj_pos[5], rot = trait_rot}, {pos = inj_pos[6], rot = trait_rot}},
- terrain_toLoad = {"Egg Sacs 1", "Egg Sacs 2", "Silk Nest", "Spiderlings"},
- terrain_toLoad_pos = {{pos = { - 8.00, 0.58, 4.19}, rot = {0, 270, 0}}, {pos = {8.20, 0.58, 6.14}, rot = {0, 270, 0}}, {pos = {0.20, 0.49, 5.13}, rot = {0, 0, 0}}, {pos = { - 21.32, 0.15, - 11.41}, rot = {0, 0, 0}}},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "", monst_fig_pos = monst_2x2_pos
- }
- monstersSetup["Sunstalker"] = {
- stats = {{mov = 16, tgh = 10}, {mov = 16, tgh = 12, spd = 1, dmg = 1}, {mov = 16, tgh = 16, spd = 2, dmg = 2, acc = 1, lck = 1}},
- hunt_fig_pos = {huntPos4, huntPos7, huntPos10},
- obj_toLoad_all = {"Light and Shadow", "Shade", "Shadows of Darkness", "Solar Energy", "Sun Dial"},
- obj_toLoad_lvl = {{}, {"Living Shadows"}, {"Living Shadows", "Monochrome", "Black Blood Red", "Black Blood Yellow", "Black Blood Green", "Black Blood Blue"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}, {pos = inj_pos[13], rot = trait_rot}, {pos = { - 26.38, 1.46, 12.35}, rot = {0, 180, 0}}, {pos = inj_pos[4], rot = trait_rot}, {pos = inj_pos[5], rot = trait_rot}
- , {pos = { - 25.08, 0.23, - 33.59}, rot = {0, 180, 0}}, {pos = { - 7.82, 0.23, - 33.59}, rot = {0, 180, 0}}, {pos = {19.40, 0.23, - 33.61}, rot = {0, 180, 0}}, {pos = {36.40, 0.23, - 33.59}, rot = {0, 180, 0}}},
- terrain_toLoad = {"Stone Columns", "Stone Columns", "Stone Columns", "Stone Columns", "Salt Sculptures", "Salt Sculptures", "Bag_Shades", "Solar Flare Tracker", "Shadow Up", "bag shadow up", "Shadow Down", "bag shadow down", "Shadow Left", "bag shadow left", "Shadow Right", "bag shadow right", "Stone Columns"},
- terrain_toLoad_pos = {{pos = { - 15.28, 0.49, 14.15}, rot = {0, 270, 0}}, {pos = {2.60, 0.44, - 4.84}, rot = {0, 0, 0}}, {pos = { - 15.41, 0.50, - 4.05}, rot = {0, 270, 0}}, {pos = {2.59, 0.44, 13.33}, rot = {0, 0, 0}}, {pos = {10.05, 0.54, - 0.19}, rot = {0, 0, 0}}, {pos = {10.10, 0.54, 10.63}, rot = {0, 0, 0}}
- , {pos = { - 21.30, 0.15, - 11.50}, rot = {0, 0, 0}}, {pos = { - 26.40, 1.34, 8.75}, rot = {0, 180, 0}}, {pos = {32.70, 0.05, 16.74}, rot = {0, 0, 0}}, {pos = {34.29, 0.16, 16.74}, rot = {0, 0, 0}}, {pos = {32.70, 0.05, 14.23}, rot = {0, 0, 0}}, {pos = {34.29, 0.16, 14.23}, rot = {0, 0, 0}}
- , {pos = {32.70, 0.05, 11.82}, rot = {0, 0, 0}}, {pos = {34.29, 0.16, 11.82}, rot = {0, 0, 0}}, {pos = {32.70, 0.05, 9.41}, rot = {0, 0, 0}}, {pos = {34.29, 0.16, 9.41}, rot = {0, 0, 0}}, {pos = terrainPos1, rot = {0, 180, 0}}},
- card_toLoad = {},
- card_toLoad_pos = {},
- fromGameBox = {"Shade Miasma"},
- fromGameBox_pos = {{pos = {73.23, 4.10, 44.54}, rot = {0, 0, 0}}},
- font_toLoad = "Rotate Sun Dial", monst_fig_pos = monst_4x4_pos
- }
- monstersSetup["White Lion"] = {
- stats = {{mov = 6, tgh = 8}, {mov = 7, tgh = 10, spd = 1, dmg = 1}, {mov = 8, tgh = 14, spd = 2, dmg = 2, acc = 2, lck = 1}},
- hunt_fig_pos = {huntPos4, huntPos6, huntPos11},
- obj_toLoad_all = {"Weak Spot"},
- obj_toLoad_lvl = {{}, {"Cunning"}, {"Cunning", "Merciless"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}},
- terrain_toLoad = {},
- terrain_toLoad_pos = {},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "", monst_fig_pos = monst_2x2_pos
- }
- monstersSetup["Black Lion"] = {
- stats = {{mov = 7, tgh = 10}, {mov = 8, tgh = 12, spd = 1, dmg = 1}, {mov = 9, tgh = 18, spd = 2, dmg = 2, acc = 3, lck = 2}, {mov = 10, tgh = 25, spd = 4, dmg = 4, acc = 7, lck = 5}},
- hunt_fig_pos = {huntPos4, huntPos6, huntPos9},
- obj_toLoad_all = {"Ghost Step"},
- obj_toLoad_lvl = {{}, {"Cunning"}, {"Cunning", "Merciless"}, {"Cunning", "Merciless", "Golden Eyes"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}, {pos = inj_pos[4], rot = trait_rot}},
- terrain_toLoad = {},
- terrain_toLoad_pos = {},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "", monst_fig_pos = monst_2x2_pos
- }
- monstersSetup["Butcher"] = {
- stats = {{mov = 5, tgh = 9}, {mov = 5, tgh = 12, spd = 1, dmg = 1}, {mov = 8, tgh = 15, spd = 2, dmg = 2, acc = 2}},
- hunt_fig_pos = {},
- obj_toLoad_all = {"Fast Target", "Dreaded Trophies", "Infectious Lunacy P1", "Infectious Lunacy P2", "Infectious Lunacy P3", "Infectious Lunacy P4"},
- obj_toLoad_lvl = {{"Berserker"}, {"Frenzied Berserker"}, {"Frenzied Berserker", "Invincible"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = { - 2.25, 0.38, - 22.48}, rot = {0, 180, 0}}, {pos = { - 0.75, 0.38, - 22.48}, rot = {0, 180, 0}}, {pos = {0.75, 0.35, - 22.48}, rot = {0, 180, 0}}, {pos = {2.25, 0.40, - 22.48}, rot = {0, 180, 0}}
- , {pos = inj_pos[3], rot = trait_rot}, {pos = inj_pos[4], rot = trait_rot}, {pos = inj_pos[5], rot = trait_rot}},
- terrain_toLoad = {},
- terrain_toLoad_pos = {},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "", monst_fig_pos = monst_2x2_pos
- }
- monstersSetup["The Hand"] = {
- stats = {{mov = 5, tgh = 14}, {mov = 6, tgh = 15, spd = 1, dmg = 1}, {mov = 6, tgh = 30, spd = 3, dmg = 6}},
- hunt_fig_pos = {},
- obj_toLoad_all = {"Red Lens", "Green Lens", "Blue Lens", "Ghost Step", "Applause", "Impossible Eyes", "Polarized Aura P1", "Polarized Aura P2", "Polarized Aura P3", "Polarized Aura P4"},
- obj_toLoad_lvl = {{}, {}, {}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}, {pos = inj_pos[4], rot = trait_rot}, {pos = AI_deck_pos, rot = zoneAI_rot}, {pos = inj_pos[5], rot = {5.86, 180.00, 0.00}}
- , {pos = surv_status_card_p1, rot = surv_status_rot}, {pos = surv_status_card_p2, rot = surv_status_rot}, {pos = surv_status_card_p3, rot = surv_status_rot}, {pos = surv_status_card_p4, rot = surv_status_rot}},
- terrain_toLoad = {},
- terrain_toLoad_pos = {},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "", monst_fig_pos = {0.09, 6, 5.31}
- }
- monstersSetup["King's Man"] = {
- stats = {{mov = 5, tgh = 12}, {mov = 6, tgh = 15, spd = 1, dmg = 1}, {mov = 6, tgh = 18, spd = 2, dmg = 2, acc = 2}},
- hunt_fig_pos = {},
- -- obj_toLoad_all = {"King's Aura", "Battle Pressure", "Battle Tempo P1", "Battle Tempo P2", "Battle Tempo P3", "Battle Tempo P4", "Out-Fighting", "Weak Spot", "King's Combat"},
- obj_toLoad_all = {"** DO NOT ALTER THIS OR MOVE IT **", "Battle Pressure", "Battle Tempo P1", "Battle Tempo P2", "Battle Tempo P3", "Battle Tempo P4", "Out-Fighting", "Weak Spot", "King's Combat"},
- obj_toLoad_lvl = {{}, {"Silent Hymn"}, {"Silent Hymn"}},
- obj_toLoad_pos = {{pos = {6.30, 0.24, - 10.56}, rot = surv_status_rot}, {pos = {7.68, 0.43, - 13.95}, rot = surv_status_rot}, {pos = surv_status_card_p1, rot = surv_status_rot}, {pos = surv_status_card_p2, rot = surv_status_rot}, {pos = surv_status_card_p3, rot = surv_status_rot}
- , {pos = surv_status_card_p4, rot = surv_status_rot}, {pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}, {pos = inj_pos[4], rot = trait_rot}},
- terrain_toLoad = {},
- terrain_toLoad_pos = {},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "Rebel", monst_fig_pos = monst_2x2_pos
- }
- monstersSetup["Lion Knight"] = {
- stats = {{mov = 7, tgh = 10}, {mov = 8, tgh = 12}, {mov = 9, tgh = 15, spd = 1, dmg = 1}},
- hunt_fig_pos = {},
- obj_toLoad_all = {"Zeal", "Outburst", "Roles"},
- obj_toLoad_lvl = {{}, {"Drama Lessons"}, {"Drama Lessons", "Last Act"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = HL_discard_pos, rot = zoneAI_rot}, {pos = inj_pos[3], rot = trait_rot}, {pos = inj_pos[4], rot = trait_rot}},
- terrain_toLoad = {"Stage", "Balcony", "Throne", "Horn"},
- terrain_toLoad_pos = {{pos = {0.15, 1.85, 6.95}, rot = {0, 0, 180}}, {pos = {0.00, 2.77, 18.58}, rot = {0, 90, 180}}, {pos = { - 13.47, 0.53, 6.07}, rot = {0, 180, 0}}, {pos = {11.85, 0.54, 6.07}, rot = {0, 180, 0}}},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "Lion Knight Roles", monst_fig_pos = monst_2x2_pos
- }
- monstersSetup["Manhunter"] = {
- stats = {{mov = 6, tgh = 8}, {mov = 7, tgh = 11, spd = 1, dmg = 1}, {mov = 8, tgh = 11, spd = 1, dmg = 1}, {mov = 9, tgh = 13, spd = 2, dmg = 2, acc = 2}},
- hunt_fig_pos = {},
- obj_toLoad_all = {"Gun Action", "Gritty Armament", "Tombstone", "Mangled Groin"},
- obj_toLoad_lvl = {{"Short Stride"}, {"Full Stride"}, {"Full Stride"}, {"Full Stride"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}, {pos = inj_pos[4], rot = trait_rot}, {pos = inj_pos[5], rot = trait_rot}},
- terrain_toLoad = {"Stone Column 1", "Stone Column 2", "Stone Column 3", "Stone Column 4", "Stone Column 5", "Stone Column 6"},
- terrain_toLoad_pos = {{pos = { - 4.63, 0.45, 7.84}, rot = {0, 0, 0}}, {pos = {1.08, 0.45, 11.79}, rot = {0, 90, 0}}, {pos = {4.82, 0.45, 7.92}, rot = {0, 180, 0}}, {pos = {4.83, 0.45, 2.49}, rot = {0, 180, 0}}, {pos = { - 0.81, 0.45, - 1.25}, rot = {0, 270, 0}}, {pos = { - 4.59, 0.45, 2.45}, rot = {0, 0, 0}}},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "", monst_fig_pos = monst_2x2_pos
- }
- monstersSetup["Slenderman"] = {
- stats = {{mov = 6, tgh = 11}, {mov = 6, tgh = 13, spd = 1, dmg = 1, acc = 1}, {mov = 6, tgh = 17, spd = 2, dmg = 2, acc = 2, lck = 1}},
- hunt_fig_pos = {},
- obj_toLoad_all = {"Ensnare", "Gloom", "Madness Inversion"},
- obj_toLoad_lvl = {{}, {}, {"Hounds"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}, {pos = inj_pos[4], rot = trait_rot}},
- terrain_toLoad = {"Stone Column 1", "Stone Column 2", "Stone Column 3", "Bug Patch"},
- terrain_toLoad_pos = {{pos = { - 15.31, 0.44, - 1.10}, rot = {0, 90, 0}}, {pos = { - 15.34, 0.44, 14.79}, rot = {0, 270, 0}}, {pos = {15.55, 0.44, 14.86}, rot = {0, 270, 0}}, {pos = {15.49, 0.60, 0.66}, rot = {0, 180, 0}}},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "Pod Imprisonment", monst_fig_pos = monst_2x2_pos
- }
- monstersSetup["The Tyrant"] = {
- stats = {{mov = 6, tgh = 8}, {mov = 7, tgh = 10, spd = 1, dmg = 1}, {mov = 7, tgh = 14, spd = 2, dmg = 2}},
- hunt_fig_pos = {},
- obj_toLoad_all = {"Crooked Step", "Spectral Blast", "Destiny's Marrow", "Gates"},
- obj_toLoad_lvl = {{}, {"Quickened"}, {"Quickened"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}, {pos = { - 20.19, 0.15, - 11.06}, rot = {0, 0, 0}}, {pos = inj_pos[4], rot = trait_rot}},
- terrain_toLoad = {},
- terrain_toLoad_pos = {},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "", monst_fig_pos = monst_2x2_pos
- }
- monstersSetup["Lonely Tree"] = {
- stats = {{mov = 0, tgh = 11, dmg = -1}, {tgh = 13}, {tgh = 17, spd = 1, dmg = 1}},
- hunt_fig_pos = {},
- obj_toLoad_all = {"Bear Fruit", "Impenetrable Trunk"},
- obj_toLoad_lvl = {{}, {"Moving Ground"}, {"Moving Ground", "Life Trait", "Level 3 AI Deck"}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}, {pos = AI_discard_pos, rot = trait_rot}, {pos = AI_deck_pos, rot = zoneAI_rot}},
- -- terrain_toLoad = {"Tall Grass 1", "Tall Grass 2", "Tall Grass 3", "Tall Grass 4", "Nightmare Fruit 1", "Nightmare Fruit 2", "Nightmare Fruit 3", "Nightmare Fruit 4", "Nightmare Fruit 5", "Nightmare Fruit 6"},
- terrain_toLoad = {"Tall Grass 1", "Tall Grass 2", "Tall Grass 3", "Tall Grass 4"},
- terrain_toLoad_pos = {{pos = { - 12.55, 0.57, - 5.76}, rot = {0, 0, 0}}, {pos = { - 12.59, 0.57, 17.95}, rot = {0, 0, 0}}, {pos = {12.76, 0.57, 17.88}, rot = {0, 0, 0}}, {pos = {12.77, 0.57, - 5.62}, rot = {0, 0, 0}}},
- fromGameBox = {"Egg Sac Explosion Effect"},
- fromGameBox_pos = {{pos = {72.14, 4.17, 48.02}, rot = {0, 0, 0}}},
- font_toLoad = "Bear Fruit Font", monst_fig_pos = monst_3x3_pos
- }
- -- local desc = current_showdown_lvl.getDescription()
- -- if desc == "The Lonely Tree Lvl 3" then
- -- delete_LT_AI_decks()
- -- end
- -- end
- --
- -- function delete_LT_AI_decks()
- -- for _, obj in ipairs(zoneAIBoard.getObjects()) do
- -- local name = obj.getName()
- -- if name == "Basic" or name == "Advanced" or name == "Legendary" then
- -- obj.destruct()
- -- end
- -- end
- -- end
- monstersSetup["Watcher"] = {
- stats = {{mov = 100}},
- hunt_fig_pos = {},
- obj_toLoad_all = {"Life Trait", "Audience", "Vapor of Nothingness", "Lantern Vortex", "Indomitable", "Retinues", "Watcher Basic AI Deck"},
- obj_toLoad_lvl = {{}, {}, {}},
- obj_toLoad_pos = {{pos = AI_discard_pos, rot = trait_rot}, {pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}, {pos = indom_pos, rot = indom_rot}, {pos = inj_pos[4], rot = {0, 0, 0}}, {pos = AI_deck_pos, rot = zoneAI_rot}},
- terrain_toLoad = {},
- terrain_toLoad_pos = {},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "Stolen Dreams", monst_fig_pos = monst_2x2_pos
- }
- monstersSetup["Gold Smoke Knight"] = {
- stats = {{mov = 8, tgh = 27}, {mov = 8, tgh = 27}, {mov = 8, tgh = 27}, {mov = 8, tgh = 27}},
- hunt_fig_pos = {},
- obj_toLoad_all = {"Secondary Forge", "Frustration", "Blacken", "Mauler", "Indomitable", "Gold Smoke Knight AI Deck"},
- obj_toLoad_lvl = {{}, {}, {}},
- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}, {pos = inj_pos[3], rot = trait_rot}, {pos = inj_pos[4], rot = trait_rot}, {pos = indom_pos, rot = indom_rot}, {pos = AI_deck_pos, rot = zoneAI_rot}},
- terrain_toLoad = {},
- terrain_toLoad_pos = {},
- card_toLoad = {},
- card_toLoad_pos = {},
- font_toLoad = "", monst_fig_pos = monst_3x3_pos
- }
- -- monstersSetup[""] = {
- -- stats = {},
- -- hunt_fig_pos = {},
- -- obj_toLoad_all = {},
- -- obj_toLoad_lvl = {{}, {}, {}},
- -- obj_toLoad_pos = {{pos = inj_pos[1], rot = trait_rot}, {pos = inj_pos[2], rot = trait_rot}},
- -- terrain_toLoad = {},
- -- terrain_toLoad_pos = {{pos = , rot = {0, 270, 0}}, {pos = , rot = {0, 270, 0}}},
- -- card_toLoad = {},
- -- card_toLoad_pos = {},
- -- font_toLoad = "", monst_fig_pos = monst_3x3_pos
- -- }
- monsterSelected = "White Lion"
- box_toGet = "White Lion"
- -- -phoenix Legendary
- -- -Screaming Antelope Legendary
- -- obj_toLoad_1 = "Trample"
- -- elseif name == obj_toLoad_6 then
- -- showdown_box.takeObject({position = { - 2.66, 0.49, - 17.21}, rotation = zoneAI_rot, smooth = false, guid = obj.guid})
- --
- -- elseif name == obj_toLoad_7 then
- -- showdown_box.takeObject({position = {7.59, 0.43, - 13.97}, rotation = zoneAI_rot, smooth = false, guid = obj.guid})
- --
- -- elseif name == obj_toLoad_8 then
- -- battle_pressure_tool = showdown_box.takeObject({position = {6.16, 0.24, - 10.57}, rotation = {0, 180, 0}, smooth = false, guid = obj.guid})
- -- if battle_pressure_tool ~= nil then
- -- battle_pressure_tool.setScale({0.35, 1.00, 0.35})
- -- end
- --
- -- elseif name == obj_toLoad_9 then
- -- showdown_box.takeObject({position = AI_wound_pos, rotation = zoneAI_rot, smooth = false, guid = obj.guid})
- -- function setup_mad_steed()
- -- btn_clicked = 23
- -- hunt_deck_toGet = "Screaming Antelope Hunt Events Deck"
- -- box_toGet = "Screaming Antelope"
- -- name = "Mad Steed"
- -- hunt_fig_pos = huntPos9
- -- obj_toLoad_2 = "Diabolical"
- -- obj_toLoad_3 = "Hypermetabolism"
- -- obj_toLoad_4 = "Legendary Horns"
- -- obj_toLoad_5 = "Indomitable"
- -- obj_toLoad_6 = "Berserker"
- -- obj_toLoad_7 = "Battle Pressure"
- -- obj_toLoad_8 = "** DO NOT ALTER THIS OR MOVE IT **"
- -- obj_toLoad_9 = "Life Trait"
- -- obj_toLoad_HL = "The Mad Steed Hit Location Deck"
- -- reset_obj_toLoad()
- -- set_obj_toLoad_SA()
- -- set_terrain_toLoad_SA()
- -- changeMonster({mov = 9, tgh = 22, spd = 3, dmg = 5, lck = 1, acc = 1})
- -- load_monster_box()
- -- Wait.time(execute_SA, 2)
- -- calculate_departing_bonuses()
- -- end
- -- function setup_great_golden_cat()
- -- obj_toLoad_HL = "White Lion Hit Location Deck"
- -- obj_toLoad_AI = "Great Golden Cat AI Deck"
- -- obj_toLoad_1 = "Life Trait"
- -- obj_toLoad_6 = "Cunning"
- -- obj_toLoad_7 = "Merciless"
- -- obj_toLoad_8 = "Trample"
- -- btn_clicked = 21
- -- box_toGet = "White Lion"
- -- hunt_deck_toGet = "White Lion Hunt Events"
- -- hunt_fig_pos = huntPos10
- -- current_showdown_lvl.setDescription("Great Golden Cat")
- -- changeMonster({mov = 9, tgh = 17, spd = 3, dmg = 5, lck = 1, acc = 3})
- -- load_monster_box()
- -- calculate_departing_bonuses()
- -- Wait.time(execute_WL, 2)
- -- end
- -- function setup_beast_of_sorrow()
- -- obj_toLoad_HL = "White Lion Hit Location Deck"
- -- obj_toLoad_6 = "Cunning"
- -- obj_toLoad_8 = "Trample"
- -- btn_clicked = 22
- -- hunt_deck_toGet = "White Lion Hunt Events"
- -- box_toGet = "White Lion"
- -- hunt_fig_pos = huntPos10
- -- current_showdown_lvl.setDescription("Beast of Sorrow")
- -- changeMonster({mov = 7, tgh = 13, spd = 1, dmg = 1})
- -- load_monster_box()
- -- calculate_departing_bonuses()
- -- Wait.time(execute_WL, 2)
- -- end
- -- function setup_prologue_lion()
- -- obj_toLoad_AI = "White Lion Prologue Deck"
- -- obj_toLoad_2 = "Prologue Setup"
- -- obj_toLoad_3 = "Claw"
- -- obj_toLoad_4 = "Strange Hand"
- -- obj_toLoad_HL = "White Lion Prologue Hit Location Deck"
- -- box_toGet = "White Lion"
- -- current_showdown_lvl.setDescription("Prologue White Lion")
- -- changeMonster({mov = 6, tgh = 6})
- -- load_monster_box()
- -- Wait.time(execute_WL, 2)
- -- end
- end
- function counter(player, value, id)
- local amount = tonumber(id)
- local stat = tonumber(self.UI.getAttribute(value, "text")) + amount
- local base = tonumber(self.UI.getAttribute(value, "base")) + amount
- --Maximo Negative ???
- stat = math.max(stat, 0)
- base = math.max(base, 0)
- self.UI.setAttribute(value, "text", stat)
- self.UI.setAttribute(value, "base", base)
- end
- -- Dice Rolling Functions ------------------------------------------------------
- function clickRollButton()
- local pos = self.getPosition()
- local hitList = Physics.cast({
- origin = {pos.x, pos.y, pos.z + 2},
- direction = {1, 0, 0},
- type = 2,
- size = {3, 3, 3},
- max_distance = 10
- })
- for _, entry in ipairs(hitList) do
- if entry.hit_object.tag == "Card" then
- local pos = deck_hunt_events.getPosition()
- entry.hit_object.setRotation({0, 180, 0})
- entry.hit_object.setPosition({pos.x, pos.y + 3, pos.z})
- entry.hit_object.setLock(false)
- elseif entry.hit_object.getName() == "Portcullis Key" then
- gameBox.putObject(entry.hit_object)
- end
- end
- clearDice()
- die_d100 = bag_d100.takeObject({
- position = { - 0.71, 9, 30.16},
- smooth = false,
- })
- die_d10 = bag_d10.takeObject({
- position = {0.77, 9, 30.17},
- smooth = false,
- })
- table.insert(spawnedDice, die_d100.guid)
- table.insert(spawnedDice, die_d10.guid)
- Wait.time(rollDice, 0.1)
- end
- function rollDice(obj)
- die_d100.roll()
- die_d10.roll()
- startLuaCoroutine(self, "watchDice")
- end
- function clearDice()
- for i, v in pairs(spawnedDice) do
- local die = getObjectFromGUID(v)
- if die ~= nil then destroyObject(die) end
- end
- spawnedDice = {}
- end
- function watchDice()
- startTime = os.time()
- repeat
- local restingCount = 0
- for i, dieGUID in ipairs(spawnedDice) do
- local die = getObjectFromGUID(dieGUID)
- if not die or die.resting == true then
- restingCount = restingCount + 1
- end
- end
- coroutine.yield(0)
- until restingCount == #spawnedDice or os.time() > startTime + 5
- watchingDice = false
- getd100Total()
- return 1
- end
- function getd100Total()
- value_d100 = die_d100.getValue()
- if value_d100 == 10 then value_d100 = 0 end
- value_d100_mult = value_d100 * 10
- value_d10 = die_d10.getValue()
- if value_d10 == 10 then value_d10 = 0 end
- total_value = tostring(value_d100_mult + value_d10)
- if value_d100 == 10 and value_d10 == 10 then total_value = "100" end
- broadcastToAll("Hunt Event: " .. total_value, {1, 1, 1})
- get_hunt_event()
- end
- function get_hunt_event()
- local pos = deck_hunt_events.getPosition()
- for _, card in ipairs(deck_hunt_events.getObjects()) do
- local name = card.name
- if name == total_value then
- hunt_event = deck_hunt_events.takeObject({
- position = {0.00, 5.92, 36.17},
- rotation = {35, 180, 0},
- smooth = false,
- guid = card.guid,
- callback = "lock_callback",
- callback_owner = Global
- })
- end
- end
- if total_value == "65" then
- local zone = getObjectFromGUID(Global.getTable('zones').zoneGraveyard_Left.guid)
- for _, obj in ipairs(zone.getObjects()) do
- if obj.getName() == "Store Survivor in Here" then
- obj.setPosition({3.59, 3.42, 32.94})
- obj.setRotation({0, 180, 0})
- obj.call("createButton ")
- else
- for _, obj in ipairs(gameBox.getObjects()) do
- if obj.name == "Store Survivor in Here" then
- gameBox.takeObject({
- position = {3.59, 3.42, 32.94},
- rotation = {0, 180, 0},
- smooth = false,
- guid = obj.guid,
- callback = "lock_callback",
- callback_owner = Global
- })
- end
- end
- end
- end
- end
- if total_value == "99" then
- for _, obj in ipairs(gameBox.getObjects()) do
- if obj.name == "Portcullis Key" then
- gameBox.takeObject({
- position = {3.21, 4.99, 34.89},
- rotation = {35, 180, 0},
- smooth = false,
- guid = obj.guid,
- callback = "lock_callback",
- callback_owner = Global
- })
- end
- end
- end
- end
- -- Buttons ---------------------------------------------------------------------
- function createButtons()
- btn_params = {
- position = {0, 0.2, - 24.8},
- rotation = {20, 180, 0},
- click_function = "end_hunt",
- function_owner = self,
- label = "",
- width = 4900,
- height = 1300,
- color = {0, 0, 0, 0.9},
- font_color = {1, 1, 1},
- tooltip = "",
- font_size = 50
- }
- self.createButton(btn_params)
- end
- -- View Quarries and Nemesis ---------------------------------------------------
- function view_Quarry()
- returnFont()
- Wait.frames(function() showMonster("Quarries") end, 2)
- end
- function view_Nemesis()
- returnFont()
- Wait.frames(function() showMonster("Nemesis") end, 2)
- end
- function view_legendaries()
- returnFont()
- Wait.frames(function() showMonster("Legendaries") end, 2)
- end
- function special_showdown()
- returnFont()
- Wait.frames(function() showMonster("Special") end, 2)
- end
- function returnFont()
- local monsters = {Quarries = true, Nemesis = true, Legendaries = true, Special = true}
- local hitList = Physics.cast({
- origin = {0, 0, 0},
- direction = {1, 0, 0},
- type = 2,
- size = {1, 1, 1},
- max_distance = 1
- })
- for _, entry in ipairs(hitList) do
- if entry.hit_object.getDescription() == "font" and monsters[entry.hit_object.getName()] then
- gameBox.putObject(entry.hit_object)
- end
- end
- end
- function showMonster(name)
- local font = nil
- for _, obj in ipairs(gameBox.getObjects()) do
- if obj.name == name then
- font = gameBox.takeObject({
- position = {0, 0, 0},
- rotation = {0, 0, 0},
- smooth = false,
- guid = obj.guid
- }).lock()
- end
- end
- end
- -- Depart ----------------------------------------------------------------------
- function departClick(nemesis)
- if isCampaignLoaded() == false then
- goToCampaignStartButton()
- return
- end
- -- Reset Game State for Start of Showdown without triggering monster AI cards in Injury Board Zone
- local next_round_tool = getObjectFromGUID('b94669')
- next_round_tool.call("nextRound")
- local zone = getObjectFromGUID(Global.getTable('zones').zoneInjuryBoard.guid)
- for _, obj in ipairs(zone.getObjects()) do
- if string.find(obj.getDescription(), "board") then
- board = obj
- break
- end
- end
- local btns = board.getButtons()
- if btns ~= nil then
- for i, v in pairs(btns) do
- if v.label == "Main Menu" then
- board.call("main_menu")
- end
- end
- end
- if nemesis then
- createNemesisButtons()
- --local showdownTool = getObjectFromGUID('c3451a')
- --showdownTool.call("createNemesisButtons")
- else
- createQuarryButtons()
- bag_Hunt.call('buttonClick_place')
- huntLoaded.setRotation({0, 180, 0})
- end
- end
- function calculate_departing_bonuses(nemesis)
- changeAllSurvivors("survival", tonumber(self.UI.getAttribute("allSurvival", "text")) + tonumber(self.UI.getAttribute("thsSurvival", "text")) + (nemesis and (tonumber(self.UI.getAttribute("allNemesis", "text")) + tonumber(self.UI.getAttribute("thsNemesis", "text"))) or 0))
- changeAllSurvivors("insanity", tonumber(self.UI.getAttribute("allInsanity", "text")) + tonumber(self.UI.getAttribute("thsInsanity", "text")))
- broadcastToAll("_____________ Departing Bonuses Gained _____________", {1, 1, 1})
- startLuaCoroutine(self, "departCoroutine")
- end
- function departCoroutine()
- local gridTable = Global.getTable('grids')
- local zonesTable = Global.getTable('zones')
- local players = {player1 = {getObjectFromGUID(gridTable.red.guid), getObjectFromGUID(zonesTable.zoneP1.guid), "Player 1"},
- player2 = {getObjectFromGUID(gridTable.yellow.guid), getObjectFromGUID(zonesTable.zoneP2.guid), "Player 2"},
- player3 = {getObjectFromGUID(gridTable.green.guid), getObjectFromGUID(zonesTable.zoneP3.guid), "Player 3"},
- player4 = {getObjectFromGUID(gridTable.blue.guid), getObjectFromGUID(zonesTable.zoneP4.guid), "Player 4"}
- }
- wait(1)
- for _, player in pairs(players) do
- departSurv(player[1], player[2], player[3])
- end
- return 1
- end
- function departSurv(grid, zone, name)
- hasArmor = false
- isInsane = false
- local broadcastTable = {}
- for _, object in ipairs(zone.getObjects()) do
- local desc = object.getDescription()
- local rotZ = object.getRotation().z
- -- True / False Settings
- if string.find(desc, 'armor') then
- hasArmor = true
- end
- if object.getName() == "isInsane" and (rotZ > 165 and rotZ < 195) then
- isInsane = true
- end
- if string.find(desc, "green_affinities") then
- affinity_green = object
- elseif string.find(desc, "blue_affinities") then
- affinity_blue = object
- elseif string.find(desc, "red_affinities") then
- affinity_red = object
- end
- end
- for _, object in ipairs(zone.getObjects()) do
- local desc = object.getDescription()
- local rotZ = object.getRotation().z
- -- Crystal Skin
- if object.getName() == "Crystal Skin" then
- if hasArmor then
- table.insert(broadcastTable, "[b]Crystal Skin[/b]: You have Armor ~ No Bonus")
- end
- if not hasArmor then
- if object.getName() == "Crystal Skin" then
- object.translate({0, 6, 0})
- wait(1)
- local desc = object.getDescription()
- local new_desc = (object.getDescription() .. ", armor, 3head, 3body, 3waist, 3legs, 3arms")
- object.setDescription(new_desc)
- table.insert(broadcastTable, "[b]Crystal Skin[/b]: You gained 3 to all Hit Locations")
- end
- end
- end
- -- Binge Eating Disorder
- if object.getName() == "Binge Eating Disorder" then
- table.insert(broadcastTable, "[b]Binge Eating Disorder[/b]: You cannot depart unless you have 'consumable' gear.")
- -- Quixotic
- elseif object.getName() == "Quixotic" then
- local insanity = tonumber(getObjectFromGUID(grid.getVar("FullCharSheetGUID")).getTable("buttons").insanity.label)
- if isInsane or insanity >= 3 then
- table.insert(broadcastTable, "[b]Quixotic[/b]: You are insane ~ You gained +1 Survival and +1 Strength Token")
- changeSurvivors("survival", 1, grid)
- local strTokenBag = getObjectFromGUID('0bf641')
- local pos = grid.getPosition()
- local quixoticToken = strTokenBag.takeObject({position = { - 21.90, 4.12, - 26.91}, rotation = {0, 180, 0}})
- quixoticToken.setPosition({pos.x + 3.07, pos.y + 2, pos.z + 3.39})
- quixoticToken.setName("Quixotic")
- end
- -- Squeamish
- elseif object.getName() == "Squeamish" then
- table.insert(broadcastTable, "[b]Squeamish[/b]: You cannot depart with 'stinky' gear.")
- stinky = checkStinkyGear(zone)
- if stinky ~= "" then
- table.insert(stinky)
- end
- -- Superstitous
- elseif object.getName() == "Superstitous" then
- table.insert(broadcastTable, "[b]Superstitious[/b]: You cannot depart with 'other' gear.")
- other = checkOtherGear(zone)
- if other ~= "" then
- table.insert(other)
- end
- -- Flower Addiction
- elseif object.getName() == "Flower Addiction" then
- table.insert(broadcastTable, "[b]Flower Addiction[/b]: You may only depart to hunt the Flower Knight.")
- -- Megalophobia
- elseif object.getName() == "Megalophobia" then
- table.insert(broadcastTable, "[b]Megalophobia[/b]: You cannot depart to hunt a monster that occupies more than 4 spaces.")
- -- Necromancer
- elseif object.getName() == "Necromancer" then
- table.insert(broadcastTable, "[b]Necromancer[/b]: Gain +1 to All hit locations for each gear card in your grid with the symbol keyword.")
- -- Ageless Apprentice
- elseif object.getName() == "Ageless Apprentice" then
- table.insert(broadcastTable, "[b]Ageless Apprenctice[/b]: You may rotate up to 3 gear cards in your gear grid; changing the affinity locations.")
- -- Seasoned Monster Meat
- elseif object.getName() == "Seasoned Monster Meat" then
- table.insert(broadcastTable, "[b]Seasoned Monster Meat[/b]: You gained (+3) Survival.")
- changeSurvivors("survival", 3, grid)
- -- Gloom Bracelets
- elseif object.getName() == "Gloom Bracelets" then
- table.insert(broadcastTable, "[b]Gloom Bracelets[/b]: You gained (+2) Insanity.")
- changeSurvivors("insanity", 2, grid)
- -- Slender Ovule
- elseif object.getName() == "Slender Ovule" then
- table.insert(broadcastTable, "[b]Slender Ovule[/b]: You gained (+3) Insanity.")
- changeSurvivors("insanity", 3, grid)
- -- Silk Robes
- elseif object.getName() == "Silk Robes" then
- table.insert(broadcastTable, "[b]Silk Robes[/b]: You gained (+1) Survival.")
- changeSurvivors("survival", 1, grid)
- -- Silk Sash
- elseif object.getName() == "Silk Sash" then
- table.insert(broadcastTable, "[b]Silk Sash[/b]: You gained (+1) Survival.")
- changeSurvivors("survival", 1, grid)
- -- Almanac
- elseif object.getName() == "Almanac" then
- table.insert(broadcastTable, "[b]Almanac[/b]: You gained (+2) Insanity.")
- changeSurvivors("insanity", 2, grid)
- -- Lantern Cuirass
- elseif object.getName() == "Lantern Cuirass" and (rotZ > 165 and rotZ < 195) then
- table.insert(broadcastTable, "[b]Lantern Cuirass[/b]: Add 3 to all hit locations.")
- -- Leather Bracers
- elseif object.getName() == "Leather Bracers" then
- table.insert(broadcastTable, "[b]Leather Bracers[/b]: You gained (+2) Survival.")
- changeSurvivors("survival", 2, grid)
- -- Leather Mask
- elseif object.getName() == "Leather Mask" then
- table.insert(broadcastTable, "[b]Leather Mask[/b]: You gained (+2) Insanity.")
- changeSurvivors("insanity", 2, grid)
- -- Dried Acanthus
- elseif object.getName() == "Dried Acanthus" then
- table.insert(broadcastTable, "[b]Dried Acanthus[/b]: You gained (+2) Survival.")
- changeSurvivors("survival", 2, grid)
- -- Fecal Salve
- elseif object.getName() == "Fecal Salve" then
- table.insert(broadcastTable, "[b]Fecal Salve[/b]: You gained (+1) Survival.")
- changeSurvivors("survival", 1, grid)
- -- Crest Crown
- elseif object.getName() == "Crest Crown" and (rotZ > 165 and rotZ < 195) then
- local numBlueAffinity = tonumber(affinity_blue.call("getCount"))
- for i = 1, numBlueAffinity do
- changeSurvivors("survival", 1, grid)
- changeSurvivors("insanity", 1, grid)
- end
- if numBlueAffinity >= 1 then
- table.insert(broadcastTable, "[b]Crest Crown[/b]: You gained (+" .. numBlueAffinity .. ") Survival and (+" .. numBlueAffinity .. ") Insanity")
- end
- -- Phoenix Faulds
- elseif object.getName() == "Phoenix Faulds" then
- table.insert(broadcastTable, "[b]Phoenix Faulds[/b]: You gained (+1) Insanity.")
- changeSurvivors("insanity", 1, grid)
- -- Phoenix Gauntlet
- elseif object.getName() == "Phoenix Gauntlet" then
- table.insert(broadcastTable, "[b]Phoenix Gauntlet[/b]: You gained (+1) Insanity.")
- changeSurvivors("insanity", 1, grid)
- -- Rawhide Boots
- elseif object.getName() == "Rawhide Boots" then
- table.insert(broadcastTable, "[b]Rawhide Boots[/b]: You gained (+1) Survival.")
- changeSurvivors("survival", 1, grid)
- -- Rawhide Gloves
- elseif object.getName() == "Rawhide Gloves" then
- table.insert(broadcastTable, "[b]Rawhide Gloves[/b]: You gained (+1) Survival.")
- changeSurvivors("survival", 1, grid)
- -- Rawhide Drum
- elseif object.getName() == "Rawhide Drum" then
- table.insert(broadcastTable, "[b]Rawhide Drums[/b]: You gained (+1) Insanity.")
- changeSurvivors("insanity", 1, grid)
- -- Partner
- elseif object.getName() == "Partner" then
- table.insert(broadcastTable, "[b]Partner[/b]: If your Partner also departed, (+2) Survival.")
- -- Endless Babble
- elseif object.getName() == "Endless Babble" then
- table.insert(broadcastTable, "[b]Endless Babble[/b]: Departing Survivors gained (+1) Insanity.")
- changeAllSurvivors("insanity", 1)
- -- Gloom Mehndi
- elseif object.getName() == "Gloom Mehndi" then
- object.setDescription(desc .. ", once per showdown used, set, 1head, 1body, 1waist, 1arms, 1legs")
- object.translate({0, 6, 0})
- table.insert(broadcastTable, "[b]Gloom Mehndi[/b]: You gained 1 Armor to all Hit Locations.")
- -- Cycloid Scale Skirt
- elseif object.getName() == "Cycloid Scale Skirt" and (rotZ > 165 and rotZ < 195) then
- local numBlueAffinity = tonumber(affinity_blue.call("getCount"))
- for i = 1, numBlueAffinity do
- changeSurvivors("survival", 1, grid)
- end
- if numBlueAffinity >= 1 then
- table.insert(broadcastTable, "[b]Cycloid Scale Skirt[/b]: You gained (+" .. numBlueAffinity .. ") Survival" )
- end
- -- Gloom Cream
- elseif object.getName() == "Gloom Cream" and (rotZ > 165 and rotZ < 195) then
- table.insert(broadcastTable, "[b]Gloom Cream[/b]: Gain (-3) Hunt XP and (-1) Understanding. If you have no Understanding, die immediately")
- -- Acanthus Doctor
- elseif object.getName() == "Acanthus Doctor" and (rotZ < 165 or rotZ > 345) then
- if hasArmor then
- table.insert(broadcastTable, "[b]Acanthus Doctor[/b]: You are wearing Armor ~ You do not gain any Strength Tokens")
- end
- if not hasArmor then
- local pos = object.getPosition()
- local numGreenAffinity = tonumber(affinity_green.call("getCount"))
- for i = 1, numGreenAffinity do
- local strToken = getObjectFromGUID('4c2300')
- local strToken_temp = strToken.takeObject({position = {pos.x, pos.y + i * 0.5, pos.z}, rotation = {0, 180, 0}})
- strToken_temp.setScale({0.46, 1.00, 0.46})
- end
- table.insert(broadcastTable, "[b]Acanthus Doctor[/b]: You gained (+" .. numGreenAffinity .. ") Strength Tokens")
- end -- End Acanthus Doctor
- -- Sun Lure and Hook
- elseif object.getName() == "Sun Lure and Hook" then
- changeSurvivors("survival", 1, grid)
- table.insert(broadcastTable, "[b]Sun Lure and Hook[/b]: You gained (+1) Survival.")
- end
- end
- if #broadcastTable > 0 then
- broadcastToAll("~~~~~~~[b]" .. name .. "[/b]~~~~~~~", {1, 1, 1})
- for _, b in pairs(broadcastTable) do
- broadcastToAll(b, {1, 1, 1})
- wait(1.5)
- end
- wait(0.50) -- wait between each players itemcheck
- end
- end
- function checkStinkyGear(zone)
- wait(2)
- local objectsInZone = zone.getObjects()
- for _, object in ipairs(objectsInZone) do
- local desc = object.getDescription()
- if string.find(desc, 'stinky') then
- return "You have 'stinky' gear in your gear grid."
- end
- end
- return ""
- end
- function checkOtherGear(zone)
- wait(2)
- local objectsInZone = zone.getObjects()
- for _, object in ipairs(objectsInZone) do
- local desc = object.getDescription()
- if string.find(desc, 'other') then
- return "You have 'other' gear in your gear grid."
- end
- end
- return ""
- end
- -- Return ----------------------------------------------------------------------
- function returnClick()
- startLuaCoroutine(self, "returnCoroutine")
- end
- function returnCoroutine()
- local gridTable = Global.getTable('grids')
- local zonesTable = Global.getTable('zones')
- local players = {player1 = {getObjectFromGUID(gridTable.red.guid), getObjectFromGUID(zonesTable.zoneP1.guid), "Player 1"},
- player2 = {getObjectFromGUID(gridTable.yellow.guid), getObjectFromGUID(zonesTable.zoneP2.guid), "Player 2"},
- player3 = {getObjectFromGUID(gridTable.green.guid), getObjectFromGUID(zonesTable.zoneP3.guid), "Player 3"},
- player4 = {getObjectFromGUID(gridTable.blue.guid), getObjectFromGUID(zonesTable.zoneP4.guid), "Player 4"}
- }
- wait(0.1)
- for _, player in pairs(players) do
- returnSurv(player[1], player[2], player[3])
- end
- return 1
- end
- function returnSurv(grid, zone, name)
- local broadcastTable = {}
- local bag = ""
- local tempBag = ""
- if grid.getVar("FullCharSheetGUID") == '' or grid.getVar("FullCharSheetGUID") == nil then
- table.insert(broadcastTable, "__________" .. name .. " Died __________")
- else
- table.insert(broadcastTable, "__________" .. name .. " Returned __________")
- if name == "Player 1" then
- bag = getObjectFromGUID('d202ed')
- elseif name == "Player 2" then
- bag = getObjectFromGUID('6b02af')
- elseif name == "Player 3" then
- bag = getObjectFromGUID('98eafe')
- elseif name == "Player 4" then
- bag = getObjectFromGUID('38ac5c')
- end
- local objectsInZone = zone.getObjects()
- for _, object in ipairs(objectsInZone) do
- if object.getName() == "Hoarder" then
- table.insert(broadcastTable, "[b]Hoarder[/b]: Archive 1 resource gained from this showdown and gain (+1) Courage")
- elseif object.getName() == "Matchmaker" then
- table.insert(broadcastTable, "[b]Matchmaker[/b]: You may spend an Endeavor for Intimacy")
- bag = getObjectFromGUID('5dffd3')
- elseif object.getName() == "Secretive" then
- table.insert(broadcastTable, "[b]Secretive[/b]: You must skip the next hunt")
- elseif object.getName() == "Post Traumatic Stress" then
- table.insert(broadcastTable, "[b]Post Traumatic Stress[/b]: You must skip the next hunt and cannot contribute to any endeavors")
- elseif object.getName() == "Fear of the Dark" then
- table.insert(broadcastTable, "[b]Fear of the Dark[/b]: You Retire")
- elseif object.getName() == "Tinker" then
- spawnTinkerEndeavor(name)
- elseif object.getName() == "Heart of the Storm" then
- table.insert(broadcastTable, "[b]Heart of the Storm[/b]: If you gain Weapon XP, gain (+3) Weapon XP and 1 Iron Strange Resource")
- elseif object.getName() == "Elder Earrings" then
- table.insert(broadcastTable, "[b]Elder Earrings[/b]: Gain (+1) Hunt XP")
- elseif object.getName() == "Scavenger Kit" then
- table.insert(broadcastTable, "[b]Scavenger Kit[/b]: Gain either +1 Random Basic or +1 Random Monster resource from this monster.")
- elseif object.getName() == "Healing Potion" then
- table.insert(broadcastTable, "[b]Healing Potion[/b]: If you suffered any Severe Injuries ~ You may archive Healing Potion to remove it")
- elseif object.getName() == "Torn Achilles Tendon" then
- table.insert(broadcastTable, "Torn Achilles ~ Skip the Next Hunt")
- object.destroy()
- elseif object.getName() == "Dislocated Shoulder" then
- object.destroy()
- elseif object.getName() == "Ruptured Spleen" then
- table.insert(broadcastTable, "Ruptured Spleen ~ Skip the Next Hunt")
- object.destroy()
- elseif object.getName() == "Torn Muscle" then
- table.insert(broadcastTable, "Torn Muscle ~ Skip the Next Hunt")
- object.destroy()
- elseif object.getName() == "Bruised Tailbone" then
- object.destroy()
- elseif object.getName() == "Spiral Fracture" then
- table.insert(broadcastTable, "Spiral Fracture ~ Skip the Next Hunt")
- object.destroy()
- elseif object.getName() == "Slashed Back" then
- object.destroy()
- end
- end
- spawnEndeavor(bag)
- end
- if #broadcastTable > 0 then
- for _, b in pairs(broadcastTable) do
- broadcastToAll(b, {1, 1, 1})
- wait(1)
- end
- wait(0.4)
- end
- return 1
- end
- function spawnEndeavor(bag)
- local pos = bag.getPosition()
- pos.y = pos.y + 2
- pos.x = pos.x - 2
- bag.takeObject({position = pos})
- end
- function spawnTinkerEndeavor(name)
- local bag = ""
- if name == "Player 1" then
- bag = getObjectFromGUID('d202ed')
- elseif name == "Player 2" then
- bag = getObjectFromGUID('6b02af')
- elseif name == "Player 3" then
- bag = getObjectFromGUID('98eafe')
- elseif name == "Player 4" then
- bag = getObjectFromGUID('38ac5c')
- end
- local pos = bag.getPosition()
- pos.y = pos.y + 2
- pos.x = pos.x - 3
- bag.takeObject({position = pos})
- end
- -- Setup Levels ----------------------------------------------------------------
- function setup_level(player, value, id)
- -- Wait.time(function() setupMonster(1) end, 10)
- local nemesis = load_monster_box(tonumber(id))
- if nemesis == -1 then
- return
- end
- calculate_departing_bonuses(nemesis)
- end
- -- additional levels
- -- DBK - changeMonster({mov = 9, tgh = 25, spd = 2, dmg = 5, acc = 1, lck = 3})
- -----------------------------------------------------------------------------
- function setupMonster(lvl)
- if monsterSelected == "" then
- broadcastToAll("No Monster Selected!", {1, 0, 0})
- return
- end
- current_showdown_lvl.setDescription(monsterSelected .. " Lvl " .. lvl)
- changeMonster(monstersSetup[monsterSelected].stats[lvl])
- getFromBox(monsterSelected .. " (hunt)", monstersSetup[monsterSelected].hunt_fig_pos[lvl], {0, 180, 0})
- getFromBox(monsterSelected, monstersSetup[monsterSelected].monst_fig_pos, {0, 180, 0})
- getFromBox(monstersSetup[monsterSelected].font_toLoad, {0, 0, 0}, {0, 0, 0}, "lock_callback", Global)
- for i, obj in pairs(monstersSetup[monsterSelected].obj_toLoad_all) do
- getFromBox(obj, monstersSetup[monsterSelected].obj_toLoad_pos[i].pos, monstersSetup[monsterSelected].obj_toLoad_pos[i].rot)
- end
- for i, obj in pairs(monstersSetup[monsterSelected].obj_toLoad_lvl[lvl]) do
- getFromBox(obj, monstersSetup[monsterSelected].obj_toLoad_pos[#monstersSetup[monsterSelected].obj_toLoad_all + i].pos, monstersSetup[monsterSelected].obj_toLoad_pos[#monstersSetup[monsterSelected].obj_toLoad_all + i].rot)
- end
- if lvl > 2 then
- getFromBox("Indomitable", indom_pos, indom_rot, "scale_indom_callback", Global)
- end
- if monstersSetup[monsterSelected].terrain_toLoad ~= nil then
- for i, obj in pairs(monstersSetup[monsterSelected].terrain_toLoad) do
- getFromBox(obj, monstersSetup[monsterSelected].terrain_toLoad_pos[i].pos, monstersSetup[monsterSelected].terrain_toLoad_pos[i].rot, "lock_callback", Global)
- end
- end
- if monstersSetup[monsterSelected].card_toLoad ~= nil then
- for i, obj in pairs(monstersSetup[monsterSelected].card_toLoad) do
- getFromBox(obj, monstersSetup[monsterSelected].card_toLoad_pos[i].pos, monstersSetup[monsterSelected].card_toLoad_pos[i].rot)
- end
- end
- if monstersSetup[monsterSelected].fromGameBox ~= nil then
- for i, obj in pairs(monstersSetup[monsterSelected].fromGameBox) do
- getFromGameBox(obj, monstersSetup[monsterSelected].fromGameBox_pos[i].pos, monstersSetup[monsterSelected].fromGameBox_pos[i].rot)
- end
- end
- end
- function getFromBox(objName, objPos, objRot, callb, callb_owner)
- for _, obj in ipairs(showdown_box.getObjects()) do
- if obj.name == objName then
- return showdown_box.takeObject({position = objPos, rotation = objRot, smooth = false, guid = obj.guid, callback = callb, callback_owner = callb_owner})
- end
- end
- end
- function getFromGameBox(objName, objPos, objRot, callb, callb_owner)
- for _, obj in ipairs(gameBox.getObjects()) do
- if obj.name == objName then
- return gameBox.takeObject({position = objPos, rotation = objRot, smooth = false, guid = obj.guid, callback = callb, callback_owner = callb_owner})
- end
- end
- end
- -- Set Monster -----------------------------------------------------------------
- -- Set Quarries ----------------------------------------------------------------
- -- Set Nemesis -----------------------------------------------------------------
- -- Set Legendaries -------------------------------------------------------------
- -- Get Showdown Bag / Monster Story --------------------------------------------
- function load_monster_box(lvl)
- if lvl > #monstersSetup[monsterSelected].stats then
- broadcastToAll(monsterSelected .. " has no Level " .. lvl .. ". The highest level is " .. #monstersSetup[monsterSelected].stats, {1, 0, 0})
- return - 1
- end
- for _, box in ipairs(gameBox.getObjects()) do
- if box.name == box_toGet then
- showdown_box = gameBox.takeObject({position = {26.19, 1.31, - 5.23}, rotation = {0, 0, 0}, smooth = false, guid = box.guid})
- end
- end
- Wait.condition(function() returnFont() load_common_objects() set_terrain_cards() get_hunt_decks() setupMonster(lvl) end, function() return checkLoaded(showdown_box) end)
- --[[
- if hunt_Phase then
- -- Lighting
- local set_Lighting = getObjectFromGUID(Global.getTable('user_settings').set_Lighting.guid)
- local rotZ = set_Lighting.getRotation().z
- if rotZ < 10 or rotZ > 350 then
- tool_Lighting = getObjectFromGUID('cdef09')
- tool_Lighting.call("setLightingTable_hunt")
- end
- -- Music
- local set_Sound = getObjectFromGUID(Global.getTable('user_settings').set_Sound.guid)
- local rotZ = set_Sound.getRotation().z
- if rotZ < 10 or rotZ > 350 then
- local music_player = getObjectFromGUID(Global.getTable('user_settings').music_player.guid)
- local hunt_phase_soundtrack = getObjectFromGUID(Global.getTable('user_settings').hunt_phase_soundtrack.guid)
- local track = tonumber(hunt_phase_soundtrack.getDescription())
- if music_player ~= nil then
- music_player.AssetBundle.playLoopingEffect(track)
- end
- end
- end
- hunt_Phase = false
- --]]
- if #monstersSetup[monsterSelected].hunt_fig_pos > 0 then
- return false
- end
- return true
- end
- function load_common_objects()
- for _, obj in ipairs(showdown_box.getObjects()) do
- local name = obj.name
- local desc = obj.description
- if name == "Basic" then
- showdown_box.takeObject({position = basic_deck_pos, rotation = zoneAI_rot, smooth = false, guid = obj.guid})
- elseif name == "Advanced" then
- showdown_box.takeObject({position = advanced_deck_pos, rotation = zoneAI_rot, smooth = false, guid = obj.guid})
- elseif name == "Legendary" then
- showdown_box.takeObject({position = legendary_deck_pos, rotation = zoneAI_rot, smooth = false, guid = obj.guid})
- elseif string.find(name, "Basic Action") then
- showdown_box.takeObject({position = basic_action_pos, rotation = zoneAI_rot, smooth = false, guid = obj.guid})
- elseif string.find(name, "Resources Deck") then
- showdown_box.takeObject({position = monster_resource_pos, rotation = zoneAI_rot, smooth = false, guid = obj.guid})
- elseif string.find(name, "Hit Location Deck") then
- showdown_box.takeObject({position = HL_deck_pos, rotation = zoneAI_rot, smooth = false, guid = obj.guid})
- elseif name == "Story Page Left" then
- showdown_page_L = showdown_box.takeObject({position = { - 5.33, 6.24, 39.47}, rotation = {22.00, 179.98, 0.00}, smooth = false, guid = obj.guid})
- elseif string.find(name, "Showdown") and string.find(desc, "one") then
- showdown_page_L = showdown_box.takeObject({position = { - 5.33, 6.24, 39.47}, rotation = {22.00, 179.98, 0.00}, smooth = false, guid = obj.guid})
- elseif name == "Story Page Right" then
- showdown_page_R = showdown_box.takeObject({position = {5.33, 6.18, 39.52}, rotation = {22.00, 179.98, 0.00}, smooth = false, guid = obj.guid})
- elseif string.find(name, "Showdown") and string.find(desc, "two") then
- showdown_page_R = showdown_box.takeObject({position = {5.33, 6.18, 39.52}, rotation = {22.00, 179.98, 0.00}, smooth = false, guid = obj.guid})
- end
- end
- showdown_page_L.setLock(true)
- showdown_page_R.setLock(true)
- showdown_page_L.setScale({2.64, 1.00, 2.64})
- showdown_page_R.setScale({2.64, 1.00, 2.64})
- end
- -- Setup Terrain Decks ---------------------------------------------------------
- -- deprecate
- --[[
- function get_terrain_deck()
- for _, deck in ipairs(terrainBox.getObjects()) do
- if deck.name == "Terrain Deck ** loaded" then
- deckTerrain = bag.takeObject({
- position = {-24.61, 5, -5.01},
- rotation = {0, 180, 180},
- smooth = false,
- guid = deck.guid
- })
- end
- Wait.time(set_terrain_cards, 3)
- end
- end
- ]]
- function set_terrain_cards()
- deckTerrain = getObjectFromGUID(Global.getTable('decks_toSearch').deckTERRAIN.guid)
- if btn_clicked == 1 then
- local card1 = {cardName = "Toppled Pillar", zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card2 = {cardName = "Toppled Pillar", zone = "", deck = deckTerrain}
- Global.setTable("card", card2)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card3 = {cardName = "Stone Columns", zone = "", deck = deckTerrain}
- Global.setTable("card", card3)
- local pos = terrainPos3
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 2 then
- local card1 = {cardName = "Resin Dung Ball", zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card2 = {cardName = "Stone Columns", zone = "", deck = deckTerrain}
- Global.setTable("card", card2)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card3 = {cardName = "Bug Patch", zone = "", deck = deckTerrain}
- Global.setTable("card", card3)
- local pos = terrainPos3
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 3 then
- local card1 = {cardName = "Flower Patch", zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card2 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card2)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 4 then
- local card1 = {cardName = "Tall Grass", zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card2 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card2)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card3 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card3)
- local pos = terrainPos3
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 5 or btn_clicked == 24 then
- local card1 = {cardName = "Nightmare Tree", zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card2 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card2)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card3 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card3)
- local pos = terrainPos3
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- if btn_clicked == 24 then -- golden eyed king additional terrain
- wait(0.25)
- local card = {cardName = "Ore Vein", zone = "", deck = deckTerrain}
- Global.setTable("card", card)
- local pos = terrainPos4
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card = {cardName = "Bug Patch", zone = "", deck = deckTerrain}
- Global.setTable("card", card)
- local pos = terrainPos4
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- end
- elseif btn_clicked == 6 then
- local card1 = {cardName = "Stone Columns", zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card2 = {cardName = "Toppled Pillar", zone = "", deck = deckTerrain}
- Global.setTable("card", card2)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card3 = {cardName = "Giant Stone Face", zone = "", deck = deckTerrain}
- Global.setTable("card", card3)
- local pos = terrainPos3
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card4 = {cardName = "Lion God Statue", zone = "", deck = deckTerrain}
- Global.setTable("card", card4)
- local pos = terrainPos4
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 7 or btn_clicked == 23 then
- local card1 = {cardName = "Acanthus Plants", zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card2 = {cardName = "Acanthus Plants", zone = "", deck = deckTerrain}
- Global.setTable("card", card2)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card3 = {cardName = "Acanthus Plants", zone = "", deck = deckTerrain}
- Global.setTable("card", card3)
- local pos = terrainPos3
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card4 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card4)
- local pos = terrainPos4
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card5 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card5)
- local pos = terrainPos5
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card6 = {cardName = "Bug Patch", zone = "", deck = deckTerrain}
- Global.setTable("card", card6)
- local pos = terrainPos6
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- if btn_clicked == 23 then -- mad steed + 2 random
- wait(0.25)
- local card = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card)
- local pos = terrainPos7
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card)
- local pos = terrainPos8
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- end
- elseif btn_clicked == 8 then
- local card1 = {cardName = "Egg Sac", zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card2 = {cardName = "Silk Nest", zone = "", deck = deckTerrain}
- Global.setTable("card", card2)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card3 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card3)
- local pos = terrainPos3
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card4 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card4)
- local pos = terrainPos4
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 9 then
- local card1 = {cardName = "Salt Sculpture", zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card2 = {cardName = "Stone Columns", zone = "", deck = deckTerrain}
- Global.setTable("card", card2)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 10 or btn_clicked == 22 then
- local card1 = {cardName = "Tall Grass", zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card2 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card2)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card3 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card3)
- local pos = terrainPos3
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 11 then
- local card1 = {cardName = "Stone Columns", zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 12 then
- local card1 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card2 = {cardName = "Stone Columns", zone = "", deck = deckTerrain}
- Global.setTable("card", card2)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card3 = {cardName = "Giant Stone Face", zone = "", deck = deckTerrain}
- Global.setTable("card", card3)
- local pos = terrainPos3
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 13 then
- local card1 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card2 = {cardName = "Stone Columns", zone = "", deck = deckTerrain}
- Global.setTable("card", card2)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card3 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card3)
- local pos = terrainPos3
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 14 then
- local card1 = {cardName = "Horn", zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card2 = {cardName = "Throne", zone = "", deck = deckTerrain}
- Global.setTable("card", card2)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card3 = {cardName = "Balcony", zone = "", deck = deckTerrain}
- Global.setTable("card", card3)
- local pos = terrainPos3
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card4 = {cardName = "Stage", zone = "", deck = deckTerrain}
- Global.setTable("card", card4)
- local pos = terrainPos4
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 15 then
- local card1 = {cardName = "Stone Columns", zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card2 = {cardName = "Stone Columns", zone = "", deck = deckTerrain}
- Global.setTable("card", card2)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card3 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card3)
- local pos = terrainPos3
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 16 then
- local card1 = {cardName = "Stone Columns", zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card2 = {cardName = "Bug Patch", zone = "", deck = deckTerrain}
- Global.setTable("card", card2)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card3 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card3)
- local pos = terrainPos3
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 17 then
- local card1 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 19 then
- local card1 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card1)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card2 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card2)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card3 = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card3)
- local pos = terrainPos3
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 20 then
- local card = {cardName = "Acanthus Plants", zone = "", deck = deckTerrain}
- Global.setTable("card", card)
- local pos = terrainPos7
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 21 then
- local card = {cardName = "Tall Grass", zone = "", deck = deckTerrain}
- Global.setTable("card", card)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card)
- local pos = terrainPos3
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card)
- local pos = terrainPos4
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- wait(0.25)
- local card = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card)
- local pos = terrainPos5
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- elseif btn_clicked == 25 then
- local card = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card)
- local pos = terrainPos1
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- local card = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card)
- local pos = terrainPos2
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- local card = {cardName = nil, zone = "", deck = deckTerrain}
- Global.setTable("card", card)
- local pos = terrainPos3
- Global.setTable("pos_toSpawn", pos)
- Global.call("get_Card")
- end
- end
- -- Setup Hunt Decks ------------------------------------------------------------
- function get_hunt_decks()
- huntBox = getObjectFromGUID(Global.getTable('bags').huntBox.guid)
- for _, deck in ipairs(huntBox.getObjects()) do
- if deck.name == "Basic Hunt Events Deck" then
- basic = huntBox.takeObject({
- position = pos_deckBasic,
- rotation = {0, 180, 180},
- smooth = false,
- guid = deck.guid
- })
- elseif deck.name == monsterSelected .. " Hunt Events Deck" then
- monst = huntBox.takeObject({
- position = pos_deckMonst,
- rotation = {0, 180, 180},
- smooth = false,
- guid = deck.guid
- })
- end
- end
- Wait.time(deal_hunt_event_cards, 0.5)
- end
- function deal_hunt_event_cards()
- if monsterSelected == "Dragon King" then
- basic.shuffle()
- basic.takeObject({top = true, position = huntPos2, smooth = false})
- basic.takeObject({top = true, position = huntPos5, smooth = false})
- basic.takeObject({top = true, position = huntPos7, smooth = false})
- basic.takeObject({top = true, position = huntPos8, smooth = false})
- basic.takeObject({top = true, position = huntPos10, smooth = false})
- monst.shuffle()
- monst.takeObject({top = true, position = huntPos1, smooth = false})
- monst.takeObject({top = true, position = huntPos3, smooth = false})
- monst.takeObject({top = true, position = huntPos4, smooth = false})
- monst.takeObject({top = true, position = huntPos6, smooth = false})
- monst.takeObject({top = true, position = huntPos9, smooth = false})
- elseif monsterSelected == "Dung Beetle Knight" then
- basic.shuffle()
- basic.takeObject({top = true, position = huntPos1, smooth = false})
- basic.takeObject({top = true, position = huntPos4, smooth = false})
- basic.takeObject({top = true, position = huntPos5, smooth = false})
- basic.takeObject({top = true, position = huntPos7, smooth = false})
- basic.takeObject({top = true, position = huntPos8, smooth = false})
- basic.takeObject({top = true, position = huntPos10, smooth = false})
- monst.shuffle()
- monst.takeObject({top = true, position = huntPos2, smooth = false})
- monst.takeObject({top = true, position = huntPos3, smooth = false})
- monst.takeObject({top = true, position = huntPos6, smooth = false})
- monst.takeObject({top = true, position = huntPos9, smooth = false})
- elseif monsterSelected == "Flower Knight" then
- basic.shuffle()
- basic.takeObject({top = true, position = huntPos1, smooth = false})
- basic.takeObject({top = true, position = huntPos2, smooth = false})
- basic.takeObject({top = true, position = huntPos3, smooth = false})
- basic.takeObject({top = true, position = huntPos4, smooth = false})
- basic.takeObject({top = true, position = huntPos5, smooth = false})
- monst.shuffle()
- monst.takeObject({top = true, position = huntPos6, smooth = false})
- monst.takeObject({top = true, position = huntPos7, smooth = false})
- monst.takeObject({top = true, position = huntPos8, smooth = false})
- monst.takeObject({top = true, position = huntPos9, smooth = false})
- monst.takeObject({top = true, position = huntPos10})
- elseif monsterSelected == "Gorm" then
- basic.shuffle()
- basic.takeObject({top = true, position = huntPos3, smooth = false})
- basic.takeObject({top = true, position = huntPos4, smooth = false})
- basic.takeObject({top = true, position = huntPos6, smooth = false})
- basic.takeObject({top = true, position = huntPos7, smooth = false})
- basic.takeObject({top = true, position = huntPos10, smooth = false})
- monst.shuffle()
- monst.takeObject({top = true, position = huntPos1, smooth = false})
- monst.takeObject({top = true, position = huntPos2, smooth = false})
- monst.takeObject({top = true, position = huntPos5, smooth = false})
- monst.takeObject({top = true, position = huntPos8, smooth = false})
- monst.takeObject({top = true, position = huntPos9, smooth = false})
- elseif monsterSelected == "Phoenix" or monsterSelected == "PhoenixLegendary" then
- basic.shuffle()
- basic.takeObject({top = true, position = huntPos1, smooth = false})
- basic.takeObject({top = true, position = huntPos3, smooth = false})
- basic.takeObject({top = true, position = huntPos5, smooth = false})
- basic.takeObject({top = true, position = huntPos6, smooth = false})
- basic.takeObject({top = true, position = huntPos8, smooth = false})
- basic.takeObject({top = true, position = huntPos10, smooth = false})
- monst.shuffle()
- monst.takeObject({top = true, position = huntPos2, smooth = false})
- monst.takeObject({top = true, position = huntPos4, smooth = false})
- monst.takeObject({top = true, position = huntPos7, smooth = false})
- monst.takeObject({top = true, position = huntPos9, smooth = false})
- elseif monsterSelected == "Lion God" then
- basic.shuffle()
- basic.takeObject({top = true, position = huntPos1, smooth = false})
- basic.takeObject({top = true, position = huntPos3, smooth = false})
- basic.takeObject({top = true, position = huntPos5, smooth = false})
- basic.takeObject({top = true, position = huntPos7, smooth = false})
- basic.takeObject({top = true, position = huntPos9, smooth = false})
- basic.takeObject({top = true, position = huntPos10, smooth = false})
- monst.shuffle()
- monst.takeObject({top = true, position = huntPos2, smooth = false})
- monst.takeObject({top = true, position = huntPos4, smooth = false})
- monst.takeObject({top = true, position = huntPos6, smooth = false})
- monst.takeObject({top = true, position = huntPos8, smooth = false})
- elseif monsterSelected == "Screaming Antelope" then
- basic.shuffle()
- basic.takeObject({top = true, position = huntPos2, smooth = false})
- basic.takeObject({top = true, position = huntPos4, smooth = false})
- basic.takeObject({top = true, position = huntPos5, smooth = false})
- basic.takeObject({top = true, position = huntPos7, smooth = false})
- basic.takeObject({top = true, position = huntPos9, smooth = false})
- basic.takeObject({top = true, position = huntPos10, smooth = false})
- monst.shuffle()
- monst.takeObject({top = true, position = huntPos1, smooth = false})
- monst.takeObject({top = true, position = huntPos3, smooth = false})
- monst.takeObject({top = true, position = huntPos6, smooth = false})
- monst.takeObject({top = true, position = huntPos8, smooth = false})
- elseif monsterSelected == "Spidicules" then
- basic.shuffle()
- basic.takeObject({top = true, position = huntPos3, smooth = false})
- basic.takeObject({top = true, position = huntPos4, smooth = false})
- basic.takeObject({top = true, position = huntPos6, smooth = false})
- basic.takeObject({top = true, position = huntPos9, smooth = false})
- basic.takeObject({top = true, position = huntPos10, smooth = false})
- monst.shuffle()
- monst.takeObject({top = true, position = huntPos1, smooth = false})
- monst.takeObject({top = true, position = huntPos2, smooth = false})
- monst.takeObject({top = true, position = huntPos5, smooth = false})
- monst.takeObject({top = true, position = huntPos7, smooth = false})
- monst.takeObject({top = true, position = huntPos8, smooth = false})
- elseif monsterSelected == "Sunstalker" then
- basic.shuffle()
- basic.takeObject({top = true, position = huntPos1, smooth = false})
- basic.takeObject({top = true, position = huntPos4, smooth = false})
- basic.takeObject({top = true, position = huntPos5, smooth = false})
- basic.takeObject({top = true, position = huntPos7, smooth = false})
- basic.takeObject({top = true, position = huntPos8, smooth = false})
- basic.takeObject({top = true, position = huntPos10, smooth = false})
- monst.shuffle()
- monst.takeObject({top = true, position = huntPos2, smooth = false})
- monst.takeObject({top = true, position = huntPos3, smooth = false})
- monst.takeObject({top = true, position = huntPos6, smooth = false})
- monst.takeObject({top = true, position = huntPos9, smooth = false})
- elseif monsterSelected == "White Lion" or monsterSelected == "White Lion Prolog" or monsterSelected == "Great Golden Cat" then
- basic.shuffle()
- basic.takeObject({top = true, position = huntPos3, smooth = false})
- basic.takeObject({top = true, position = huntPos4, smooth = false})
- basic.takeObject({top = true, position = huntPos6, smooth = false})
- basic.takeObject({top = true, position = huntPos9, smooth = false})
- basic.takeObject({top = true, position = huntPos10, smooth = false})
- monst.shuffle()
- monst.takeObject({top = true, position = huntPos1, smooth = false})
- monst.takeObject({top = true, position = huntPos2, smooth = false})
- monst.takeObject({top = true, position = huntPos5, smooth = false})
- monst.takeObject({top = true, position = huntPos7, smooth = false})
- monst.takeObject({top = true, position = huntPos8, smooth = false})
- elseif monsterSelected == "Black Lion" then
- basic.shuffle()
- basic.takeObject({top = true, position = huntPos2, smooth = false})
- basic.takeObject({top = true, position = huntPos4, smooth = false})
- basic.takeObject({top = true, position = huntPos6, smooth = false})
- basic.takeObject({top = true, position = huntPos7, smooth = false})
- basic.takeObject({top = true, position = huntPos8, smooth = false})
- basic.takeObject({top = true, position = huntPos10, smooth = false})
- monst.shuffle()
- monst.takeObject({top = true, position = huntPos1, smooth = false})
- monst.takeObject({top = true, position = huntPos3, smooth = false})
- monst.takeObject({top = true, position = huntPos5, smooth = false})
- monst.takeObject({top = true, position = huntPos9, smooth = false})
- end
- end
- -- Utility Functions -----------------------------------------------------------
- function changeAllSurvivors(location, amount)
- for i, v in pairs(Global.getTable("grids")) do
- changeSurvivors(location, amount, getObjectFromGUID(v.guid))
- end
- end
- function changeSurvivors(location, amount, grid)
- local survSheet = getObjectFromGUID(grid.getVar("survSheetGUID"))
- if survSheet ~= nil then
- tableForCall = {}
- tableForCall[location] = amount
- survSheet.call("addStats", tableForCall)
- end
- end
- function changeMonster(stats)
- local buttons = monsterBoard.getTable("buttons")
- for i, v in pairs(stats) do
- buttons.counts[i] = v
- end
- monsterBoard.setTable("buttons", buttons)
- monsterBoard.call("updateDisplay")
- end
- function wait(time)
- local start = os.time()
- --each frame the coroutine is given control back, but we immediately call coroutine.yield() again until we exceed the time limit
- repeat coroutine.yield(0)
- until os.time() > start + time
- end
- function checkLoaded(obj)
- if not obj.loading_custom and not obj.spawning then
- return true
- end
- return false
- end
- function reset_obj_toLoad()
- hunt_fig_pos = {}
- obj_toLoad_HL = "Hit Location"
- obj_toLoad_AI = ""
- ------------------
- font_toLoad = ""
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement