User prompt
There are several victory conditions that players may choose to seek during the course of the game. The following describes conditions needed to reach each end game: MR. FINDER: Buried on each game board is a hidden anomalous item, denoted by a golden W mark on it. This item is typically protected by anomalous entities, a hazardous location, or a dangerous meme or powerful antimeme. Individuals who search for clues, discover the location of the item, survive its protections and safely return it to their containment facility will become MR. FINDER, and win the game. MR. COLLECTOR: This victory condition only becomes available if a Purple Card is drawn. If any player is able to contain the Wondertainment product and return it to their containment facility, they will become MR. COLLECTOR, and win the game. MR. GENOCIDE: Any player that directly kills every other player in the game will become MR. GENOCIDE, and win the game. This victory condition becomes unobtainable if any players are killed by means other than by the hand of anyone seeking the MR. GENOCIDE7 victory condition. MR. ESCHATOLOGY: Any player who is able to summon three “supreme divine beings” will become MR. ESCHATOLOGY, and will win the game. Divine beings (i.e. Mr. God, A Very Angry Star, The Boy in the Pit, The Gate Guardian) do not fulfill the requirements of the MR. ESCHATOLOGY win condition; they must be “supreme” (i.e. DEER, The Starfish, A Clockwork God, The Serpent, The Eel, Mary Nakayama, etc.). MR. COALITION: If a player is somehow able to destroy every anomalous artifact or entity, they become MR. COALITION and win the game. To become MR. COALITION, the winner does not actually have to destroy every single anomalous artifact or entity, they must only have destroyed the majority of the artifacts or entities, and all artifacts and entities must be destroyed.8 MR. CONTAINMENT: Any player who contains more than half of the anomalies on the board (as denoted by their Orange Cards) and returns them to their containment facility becomes MR. CONTAINMENT, and wins the game. MR. FOUNDATION: Any player who contains every entity and artifact, as well as every other player, becomes MR. FOUNDATION, and wins the game. Individuals winning under the condition of MR. FOUNDATION also receive $50,000USD upon completion of the game. Can only be completed on Safe Mode difficulty or higher. MR. SURVIVOR: If a player is the last player standing, and has not met any other win conditions, that player becomes MR. SURVIVOR, and wins the game. Additionally, the game manual claims that there are many other secret victory conditions to go alongside those listed above. The existence of these secret conditions means that some games may end suddenly and without warning, when a player meets an unexpected condition
User prompt
After the introduction has finished, the game begins. Each player starts the game by drawing seven cards from the silver box in the middle of the board, and end each turn by drawing one. If a player has more than ten cards in their hand at the end of a turn, they must discard one by returning it to the silver box. There are several types of cards that can appear in the box, and each affects the game in different ways: Green Cards - are cards that influence the environment of the board. These can range from obstacles that can be used against other players, to introducing other environments and the hostile entities within them to the board, to traps and mazes, etc. Blue Cards - are companion cards. Companion cards “equip” a companion to the game piece player, who will follow the player until the card’s time limit expires, the companion is killed, or the player is killed. Companions can perform different tasks and have different abilities to assist their player, or hinder other players. Red Cards - are weapon, equipment, or ability cards. These cards allow the player on the board to perform different abilities, or have access to different weapons and equipment. Each card lists the ability or weapon’s stats, strengths, weaknesses, limitations, etc. These cards last as long as the player is alive, or until some requirement of the card or another card are met (for example, running a Red Card through the card titled “Upgrade" will result in the Red Card disappearing, and another card being issued to the player). Additionally, if an equipment card is utilized (such as a trap, or reality anchor, etc.) the card is expended after the equipment is utilized. Orange Cards - are hostile or otherwise uncontained anomalies.2 They appear randomly across the board, and players often do not know they are nearby until they are within range of them, upon which the board will produce a card on that spot. Entities that appear as Orange Cards can be destroyed or contained, depending on the player’s equipment and chosen endgame. Yellow Cards - are cards that influence the way that the earnings of the game are distributed. At the beginning of each game, an incorporeal numerical counter appears above the game board, and another above each player. The counter starts at different values depending on the difficulty setting (for example, $10,000USD at normal difficulty), and yellow cards distribute this money across the players as the game progresses. Players who die have their “earnings” moved back into the central counter to be redistributed. Yellow cards, and the money value shown in the counters, have no impact on the actual win conditions of the game, but at the end of each game the players who won will have their sum, in the form of a gold bar of equal value engraved with the Wondertainment logo, distributed to them through the silver box in the center of the board. White Cards - are fortune cards. White Cards, and their counterpart Black Cards, are randomly distributed as an additional card to players at the beginning of their turn. White and Black Cards must be played as soon as they are drawn, and while typically only affecting the player who drew them, can potentially affect other nearby players or the entire board, if applicable.3 White Cards provide a random instance of “good fortune”, as described by the card. Black Cards - are misfortune cards. Black Cards are more rare than White Cards, but their effect on the game is typically more severe. Black Cards, like their White Card counterparts, must be used as soon as they are drawn, and are expended after their use. Purple Cards - are Wondertainment cards. These are very rare,4 and have random effects on the outcome of the game. Typically, Purple cards insert a random Wondertainment product into the game, typically with exaggerated properties or abilities.5 For examples of game cards used in testing, see Addendum 3301.3. On the outside of the game board is a slider pointing to different difficulty settings. This slider can be moved before the game has begun, but retracts into the board afterwards. The difficulty settings are as follows: Neutralized Mode: All entities and artifacts are replaced with plush versions of themselves. No entity does any damage to anything else. Lullaby music plays across the board. The game mode lacks a win condition, and just ends after all of the players have fallen asleep. Thaumiel Mode: Entities have reduced damage and players are not “killed”, only “knocked out”. Certain win conditions are removed. Blood and gore are no longer visible, and nudity is no longer possible, as all players have an unremovable skintight bodysuit beneath their lowest layer of clothes. Safe Mode: The baseline game setting. Euclid Mode: Entities do more damage, are more resistant to attack, and have more health. Players become unable to view the movements and plays of other players. Keter Mode: Same as Euclid Mode, only entities are faster as well. Maksur Mode: Same as Keter Mode, only players start with a gunshot wound to a random part of their body. Apollyon Mode: Two random, hostile supreme divine beings appear on the map after the fourth turn. Players may start the game blind. The game is played in a team vs. team format, where each two person team competes against every other two person team. Every player begins at their “containment facility”, a starting point and base of operations on their side of the board. Within the facility, each player has several spaces for “equipment”, which they can swap out at the beginning of their turn with cards from their hand, in order to equip different items to their “piece”. Typically, there are two “weapon” spaces, three “equipment” spaces, two “ability” spaces, and one “companion” space. Playing any card into that space “equips” their piece with the item, ability, or companion. If an item, ability, or companion is lost, the physical card will disappear as if made of smoke. Additionally, some cards will increase the overall number of equipment slots (notably the card “Big Bag o’ Taters” will increase the number of weapon and equipment slots from 2 / 3 to 4 / 5). At the beginning of each turn, the primary player will select one card, and make equipment additions or subtractions if necessary.6 Afterwards, the player will roll two six-sided dice. The number that is rolled corresponds with a radius within which the secondary player may move, or take an action. If the secondary player has a ranged ability or weapon, they may move to the edge of their movement radius and use it, so long as the target is within range. From this point on, the game proceeds in any number of variations. Based on the cards drawn by the primary players, and the actions taken by the secondary players, any number of outcomes are possible, depending on which victory condition the players choose to seek.
User prompt
Add: SCP-3301 is played between 2 to 8 teams of two players. Each primary player chooses a secondary player, to act as their representative on the game board. The primary players are all selected when each set of players places their game pieces1 on the board. The board contained within SCP-3301 varies depending on which version of the “game” is being played, and is random. Gameplay is similar between each board, though the setting is different (i.e. The Land of the Unclean, Echoes of the Mariana, Bigfoot’s Jungle, The Cosmic Starfish, etc.), and different hostile entities appear as opponents on different boards. Testing has revealed at least twenty-three different game boards, though there are possibly more. Once the game board is unfolded, and the silver card box placed in the middle of the board in the appropriate space, the surrounding area (a space roughly 300m in diameter) will undergo dramatic anomalous spatial changes. Observers will see the space appear to fall away, as if the viewpoint of observers outside of the area of effect has become a bird’s eye view of a space much larger than the affected area. This observed space will mimic the current game board, only on a much larger scale and typically built into an arena setting. Within the affected space, the primary players will find themselves seated around a flat, crystalline surface suspended above the aforementioned game board arena, while their game piece representatives will be at the starting positions on the game board below. The start of the game is typically accompanied by music and fireworks, and a voice announcing the beginning of a new game. Once the game has begun, nothing can be passed through the spatial distortion surrounding the game arena. Secondary players who are killed or die in-game will appear outside of the distortion shortly after their death, unharmed. Primary players will remain within the anomaly for the duration of the game.
User prompt
1. **Global Initialization**: - Initialize the player's and opponent's card hands in the global scope of `gamecode.js`. This ensures that the card hands are accessible throughout the game and can be easily managed and updated. 2. **Asset Classes**: - Create a separate asset class for cards. This class should handle the card's properties (such as type, name, description, power, and cost) and behaviors (such as revealing or hiding the card). 3. **Card Initialization**: - Use the card class to initialize cards with data. This includes setting the card's type, name, description, power, and cost. The card's visuals should be set up using `LK.getAsset` to retrieve the graphical representation of the card's front and back. 4. **Card Interaction**: - Implement event listeners for card interactions. For example, when a card is selected, it should trigger an event that applies the card's effect to the game. Use the `down` and `up` methods to handle touch interactions, ensuring compatibility with touchscreen devices. 5. **Card Effects**: - Define the effects of each card type. For instance, ability cards might restore energy, weapon cards could increase attack power temporarily, and equipment cards might heal the player. These effects should be applied when the card is selected. 6. **Card Management**: - Manage the player's hand by adding new cards when drawn and removing them when used. After a card is used, reorganize the remaining cards in the player's hand to maintain a neat display. 7. **Game Update Loop**: - Ensure that any logic related to the cards is efficiently handled within the game's update loop, which runs 60 times per second. 8. **Game Reset**: - Ensure that the card hands are properly reset during the game's automatic reset process, which re-initializes the Game class.
User prompt
Player card hand
User prompt
generate more source code for my game
User prompt
Please fix the bug: 'Timeout.tick error: selectedGameMode is not defined' in or related to this line: 'if (selectedGameMode === gameModes.chaos) {' Line Number: 1242
User prompt
make it so players can see what the cards say
User prompt
cards are not movable
User prompt
get rid of the use and discard text on the card
User prompt
make it so you just need to doubble click to use a card
User prompt
i mean the icon
User prompt
same with the card draw
User prompt
make it so thye card back uses the cardback asset
User prompt
make all assets you need for the game
User prompt
cards front use the same assets as the cards name, like the asset named Card
User prompt
when i click on a card nothing shows on the front
User prompt
cards are curently not working
User prompt
make it so cards can only use assets the same name as them
User prompt
Add to game Special Containment Procedures: SCP-3301 is to be stored within a standard small containment locker at Site-19 when not being used for testing. Testing is only to be authorized by the SCP-3301 head researcher, currently Dr. Benjamin Cole. Testing may only be carried out at the Site-19 E Wing Storage Warehouse, which has been renovated specifically for this purpose. It is a requirement that all staff members assigned to SCP-3301 must be versed in the rules and protocols of the game. As such, a detailed explanation is available in Addendum 3301.2. SCP-3301 is a Class IX information security hazard, and its full repercussions are being studied by the Foundation Information Security Department. Updated Containment Procedures: Per the special memorandum detailed in Addendum 3301.4, testing of SCP-3301 has been made available to all qualified personnel, and is available as an approved extracurricular activity in the Foundation Employee Benefit Program. Personnel are required to submit detailed testing logs for each 3301 Activation Period. Full log is available here. Description: SCP-3301 is an ornate, silver box with a latch and silver key. Inscribed on the lip of the box is the following: THE FOUNDATION A GAME BY CRYOGEN STUDIOS A DIVISION OF DR. WONDERTAINMENT Contained within the box is a board game with the aforementioned title, as well as game pieces and other miscellaneous game parts. The game comes with a small instruction manual detailing a fairly simple resource management board game. However, within the box is a small gold key in a velvet lined drawer, which fits within the lock on the front of the silver box. Inserting the key and turning it while the game box is closed will cause a sliding hatch to open on the top of the box, revealing a flat, purple button inscribed with a white letter “W”. Pressing this button, labeled within the manual as the “WonderButton”, activates the primary anomalous features of SCP-3301, and begins a game of “THE FOUNDATION”. The following information pertains to the anomalous version of the game. The baseline properties of SCP-3301 are as follows: Opening the box will reveal a large game board of differing size, shape, and design. Accompanying this game board will be 8 place markers of differing size, shape, and design. Each game board, regardless of shape, features a slot in the middle of the board where a smaller silver box is placed. This box is a smaller version of the larger game box, and bears the inscription "DRAW ONE" on its lid. If the game is not in session, or if it is opened by a player out of turn, it appears empty. If opened by a player on their turn, it will produce between one and three random game cards, which have differing utility within the game. For full description of setup, rules, and gameplay, see Addendum 3301.2. Addendum 3301.1: Discovery SCP-3301 was discovered on the desk of Director Tilda Moose at Site-19 on July 3rd, 2017. Attached to the exterior of SCP-3301 was a letter in a silver envelope bearing the word "Foundation". The contained letter reads as follows: Dear SCP Foundation, Sentient creatures so often seek purpose within their own lives, whether it be mundane or extraordinary. There are some who would dedicate their lives to healing the sick, or feeding the hungry. Others would try to resurrect their broken gods, or sail through the stars on the arms of a cosmic starfish. Some would rid the world of the unnatural, or foster it in the halls of their Library, and some are just in it for the memes†. You seek to protect the world from the anomalous, categorize and classify the strange and unique, and let humanity bask in the light. We seek to make people smile, and give people a reason to be happy, if only for a short time. Despite our differences, we cannot help but respect your motives. You've no doubt saved us a dozen times over, so we want to return the favor. We want to make you smile! Contained within this box is our greatest toy yet. There are no jokes here, no gaffs or plotting. Everything we have at our disposal, every scrap of information and wisp of arcana is contained within this game. We made it because, at the end of the day, we feel like you have the most interesting story to tell. We sincerely hope you enjoy it! Yours most splendidly, Dr. Wondertainment P.S. We are very excited about this product, and believe it is nearly ready for production! But it wouldn't be acceptable to ship a product without playtesting it. So this version we're sending to you, our sole playtester, in the hopes that you'll be able to give us feedback on how we can make our game better! If at any point you stop playing for more than a few days, we'll know that you're done testing it and we'll go ahead and put it on the shelves! If you don't think it's ready for the shelves, then just keep on testing it ;) P.P.S. Please submit all playtesting suggestions to: 111 Wondertainment Way Wondertainmentville, Wondertainmentland 10101 † Yes, children, we see you there. We hope you're having fun too. Addendum 3301.2: Gameplay The following is information pertaining to the proper gameplay of SCP-3301. In order to maintain containment of the artifact, monthly testing of SCP-3301 is required. Personnel assigned to SCP-3301 are required to maintain a thorough knowledge of the rules and regulations of the game. Introduction - Close Document The following is an introduction copied directly out of “THE FOUNDATION” gameplay handbook. The handbook is a leather-bound pamphlet with embossed silver print displaying the name of the game, the production studio, and the words “50TH ANNIVERSARY EDITION”. THE FOUNDATION A GAME BY CRYOGEN STUDIOS A DIVISION OF DR. WONDERTAINMENT Welcome, weary researcher, to THE FOUNDATION! A board game only for the strong willed and mighty of heart. But beware! For danger lurks around every corner, and foul things are creeping in the night. Do you have what it takes to stand betwixt humanity and the darkness? Or will you too be lost to the chaos eternal? Only time will tell! Become Mr. Collector, or maybe Mr. Containment! The choice is yours! Setup - Close Document SCP-3301 is played between 2 to 8 teams of two players. Each primary player chooses a secondary player, to act as their representative on the game board. The primary players are all selected when each set of players places their game pieces1 on the board. The board contained within SCP-3301 varies depending on which version of the “game” is being played, and is random. Gameplay is similar between each board, though the setting is different (i.e. The Land of the Unclean, Echoes of the Mariana, Bigfoot’s Jungle, The Cosmic Starfish, etc.), and different hostile entities appear as opponents on different boards. Testing has revealed at least twenty-three different game boards, though there are possibly more. Once the game board is unfolded, and the silver card box placed in the middle of the board in the appropriate space, the surrounding area (a space roughly 300m in diameter) will undergo dramatic anomalous spatial changes. Observers will see the space appear to fall away, as if the viewpoint of observers outside of the area of effect has become a bird’s eye view of a space much larger than the affected area. This observed space will mimic the current game board, only on a much larger scale and typically built into an arena setting. Within the affected space, the primary players will find themselves seated around a flat, crystalline surface suspended above the aforementioned game board arena, while their game piece representatives will be at the starting positions on the game board below. The start of the game is typically accompanied by music and fireworks, and a voice announcing the beginning of a new game. Once the game has begun, nothing can be passed through the spatial distortion surrounding the game arena. Secondary players who are killed or die in-game will appear outside of the distortion shortly after their death, unharmed. Primary players will remain within the anomaly for the duration of the game. Gameplay - Close Document After the introduction has finished, the game begins. Each player starts the game by drawing seven cards from the silver box in the middle of the board, and end each turn by drawing one. If a player has more than ten cards in their hand at the end of a turn, they must discard one by returning it to the silver box. There are several types of cards that can appear in the box, and each affects the game in different ways: Green Cards - are cards that influence the environment of the board. These can range from obstacles that can be used against other players, to introducing other environments and the hostile entities within them to the board, to traps and mazes, etc. Blue Cards - are companion cards. Companion cards “equip” a companion to the game piece player, who will follow the player until the card’s time limit expires, the companion is killed, or the player is killed. Companions can perform different tasks and have different abilities to assist their player, or hinder other players. Red Cards - are weapon, equipment, or ability cards. These cards allow the player on the board to perform different abilities, or have access to different weapons and equipment. Each card lists the ability or weapon’s stats, strengths, weaknesses, limitations, etc. These cards last as long as the player is alive, or until some requirement of the card or another card are met (for example, running a Red Card through the card titled “Upgrade" will result in the Red Card disappearing, and another card being issued to the player). Additionally, if an equipment card is utilized (such as a trap, or reality anchor, etc.) the card is expended after the equipment is utilized. Orange Cards - are hostile or otherwise uncontained anomalies.2 They appear randomly across the board, and players often do not know they are nearby until they are within range of them, upon which the board will produce a card on that spot. Entities that appear as Orange Cards can be destroyed or contained, depending on the player’s equipment and chosen endgame. Yellow Cards - are cards that influence the way that the earnings of the game are distributed. At the beginning of each game, an incorporeal numerical counter appears above the game board, and another above each player. The counter starts at different values depending on the difficulty setting (for example, $10,000USD at normal difficulty), and yellow cards distribute this money across the players as the game progresses. Players who die have their “earnings” moved back into the central counter to be redistributed. Yellow cards, and the money value shown in the counters, have no impact on the actual win conditions of the game, but at the end of each game the players who won will have their sum, in the form of a gold bar of equal value engraved with the Wondertainment logo, distributed to them through the silver box in the center of the board. White Cards - are fortune cards. White Cards, and their counterpart Black Cards, are randomly distributed as an additional card to players at the beginning of their turn. White and Black Cards must be played as soon as they are drawn, and while typically only affecting the player who drew them, can potentially affect other nearby players or the entire board, if applicable.3 White Cards provide a random instance of “good fortune”, as described by the card. Black Cards - are misfortune cards. Black Cards are more rare than White Cards, but their effect on the game is typically more severe. Black Cards, like their White Card counterparts, must be used as soon as they are drawn, and are expended after their use. Purple Cards - are Wondertainment cards. These are very rare,4 and have random effects on the outcome of the game. Typically, Purple cards insert a random Wondertainment product into the game, typically with exaggerated properties or abilities.5 For examples of game cards used in testing, see Addendum 3301.3. On the outside of the game board is a slider pointing to different difficulty settings. This slider can be moved before the game has begun, but retracts into the board afterwards. The difficulty settings are as follows: Neutralized Mode: All entities and artifacts are replaced with plush versions of themselves. No entity does any damage to anything else. Lullaby music plays across the board. The game mode lacks a win condition, and just ends after all of the players have fallen asleep. Thaumiel Mode: Entities have reduced damage and players are not “killed”, only “knocked out”. Certain win conditions are removed. Blood and gore are no longer visible, and nudity is no longer possible, as all players have an unremovable skintight bodysuit beneath their lowest layer of clothes. Safe Mode: The baseline game setting. Euclid Mode: Entities do more damage, are more resistant to attack, and have more health. Players become unable to view the movements and plays of other players. Keter Mode: Same as Euclid Mode, only entities are faster as well. Maksur Mode: Same as Keter Mode, only players start with a gunshot wound to a random part of their body. Apollyon Mode: Two random, hostile supreme divine beings appear on the map after the fourth turn. Players may start the game blind. The game is played in a team vs. team format, where each two person team competes against every other two person team. Every player begins at their “containment facility”, a starting point and base of operations on their side of the board. Within the facility, each player has several spaces for “equipment”, which they can swap out at the beginning of their turn with cards from their hand, in order to equip different items to their “piece”. Typically, there are two “weapon” spaces, three “equipment” spaces, two “ability” spaces, and one “companion” space. Playing any card into that space “equips” their piece with the item, ability, or companion. If an item, ability, or companion is lost, the physical card will disappear as if made of smoke. Additionally, some cards will increase the overall number of equipment slots (notably the card “Big Bag o’ Taters” will increase the number of weapon and equipment slots from 2 / 3 to 4 / 5). At the beginning of each turn, the primary player will select one card, and make equipment additions or subtractions if necessary.6 Afterwards, the player will roll two six-sided dice. The number that is rolled corresponds with a radius within which the secondary player may move, or take an action. If the secondary player has a ranged ability or weapon, they may move to the edge of their movement radius and use it, so long as the target is within range. From this point on, the game proceeds in any number of variations. Based on the cards drawn by the primary players, and the actions taken by the secondary players, any number of outcomes are possible, depending on which victory condition the players choose to seek. Victory Conditions - Close Document There are several victory conditions that players may choose to seek during the course of the game. The following describes conditions needed to reach each end game: MR. FINDER: Buried on each game board is a hidden anomalous item, denoted by a golden W mark on it. This item is typically protected by anomalous entities, a hazardous location, or a dangerous meme or powerful antimeme. Individuals who search for clues, discover the location of the item, survive its protections and safely return it to their containment facility will become MR. FINDER, and win the game. MR. COLLECTOR: This victory condition only becomes available if a Purple Card is drawn. If any player is able to contain the Wondertainment product and return it to their containment facility, they will become MR. COLLECTOR, and win the game. MR. GENOCIDE: Any player that directly kills every other player in the game will become MR. GENOCIDE, and win the game. This victory condition becomes unobtainable if any players are killed by means other than by the hand of anyone seeking the MR. GENOCIDE7 victory condition. MR. ESCHATOLOGY: Any player who is able to summon three “supreme divine beings” will become MR. ESCHATOLOGY, and will win the game. Divine beings (i.e. Mr. God, A Very Angry Star, The Boy in the Pit, The Gate Guardian) do not fulfill the requirements of the MR. ESCHATOLOGY win condition; they must be “supreme” (i.e. DEER, The Starfish, A Clockwork God, The Serpent, The Eel, Mary Nakayama, etc.). MR. COALITION: If a player is somehow able to destroy every anomalous artifact or entity, they become MR. COALITION and win the game. To become MR. COALITION, the winner does not actually have to destroy every single anomalous artifact or entity, they must only have destroyed the majority of the artifacts or entities, and all artifacts and entities must be destroyed.8 MR. CONTAINMENT: Any player who contains more than half of the anomalies on the board (as denoted by their Orange Cards) and returns them to their containment facility becomes MR. CONTAINMENT, and wins the game. MR. FOUNDATION: Any player who contains every entity and artifact, as well as every other player, becomes MR. FOUNDATION, and wins the game. Individuals winning under the condition of MR. FOUNDATION also receive $50,000USD upon completion of the game. Can only be completed on Safe Mode difficulty or higher. MR. SURVIVOR: If a player is the last player standing, and has not met any other win conditions, that player becomes MR. SURVIVOR, and wins the game. Additionally, the game manual claims that there are many other secret victory conditions to go alongside those listed above. The existence of these secret conditions means that some games may end suddenly and without warning, when a player meets an unexpected condition.9 Rules - Close Document The structure of THE FOUNDATION allows for a variety of gameplay styles and approaches to the different goals of the game. In order to seemingly aid this effort, there are very few enumerated rules to the game. The following are the rules of the game, exactly as described in the manual: No hits below the belt. Targeting will result in a 15 yard penalty and a loss of downs. Drink your Ovaltine. Suspend your disbelief a little bit. This isn’t a game for children, so kids who play it are really cool. Leave your loyalties at the door. Buy Wondertainment products. cardback.png The back of SCP-3301 cards. Addendum 3301.3: Game Cards The following are examples of cards used within SCP-3301. While not all cards appear to carry relevant information, many appear to be references to anomalies within Foundation containment, or Foundation personnel. As previously mentioned in this document, the full scale of this breach of information security is part of an ongoing investigation. Several statistics are utilized within the card system, each corresponding to a certain attribute that players have. The statistics are listed below: ATK: Attack power. A value that determines the amount of damage a player can do to another player or an entity. Since entities cannot be contained until their health has reached 0, this is arguably the most important statistic. All players start with 6 ATK. DEF: Defense. A value that influences the amount of damage a player takes after being attacked. All players start with 6 DEF. HP: Hit Points. A value that determines how much damage a player can sustain before dying. Can be replaced with cards that increase health, such as medicines or vampiric cards. All players start with 10 HP. SPD: Speed. A value that determines which entity in an encounter can attack or defend first, and how often they can do so. All players start with 8 SPD. ACC: Accuracy. A value that determines how likely a given attack is to striking a target. All players start with 8 ACC. The game manual mentions other non-enumerated statistics that players can add to or subtract from, such as Smooth Talking, Memetic Resistance, Ethics, etc. While there are cards that may affect these stats, the only known way to gauge their level is by asking an entity with limited or full omniscience, such as A Librarian. - Green Cards greencard.png A Green Card. Card Title: Darkness Between Dimensions Subtitle: A Red Reality Type: Land Description: Spawns a machine that, after a random amount of time, will transport anything nearby into the Darkness Between Dimensions. Players in the Darkness Between Dimensions can be saved by divine grace, or with the item “Scranton’s Grappling Hook”. After a random amount of time, players will be returned to the board. They will come back... squishier. Card Title: Babel’s Spire Subtitle: The Friendly Union of Man and Beast Type: Structure Description: Spawns the Babel Spire on a square of your choosing within line of sight. Nearby animals join your side, and gain +2 attack. Those who do not are sacrificed to Babel. Aya aya aya blood blood blood. Card Title: Island Turtle Subtitle: Lazy Archipelago Type: Land Description: If you are at sea, this card spawns an Island Turtle to ferry you around. If you’re not, the turtle spawns anyway, and dies from dehydration. Card Title: City of the Gods Subtitle: Coming Soon To Your Home Town! Type: Structure Description: Spawns a haunted city on a square of your choosing within line of sight. Opponents entering City of the Gods have a high chance of being attacked by a +15 ATK / +12 DEF angry deity. Card Title: A Funny Little Statue Subtitle: ctrl+c ctrl+v Type: Trap Description: If indoors, creates an infinite maze that opponents can only exit with assistance from outside forces. If outdoors, the effect isn’t noticeable, but trust us when we say it’s really bad. Card Title: A Swedish Furniture Store Subtitle: Perfectly Normal Type: Trap Description: Spawns a friendly and welcoming department store. Players unfortunate enough to be inside the store when it opens will have to fight their way out, if they can get out at all. Bring your own instructions. - Blue Cards bluecard.png A Blue Card. Card Title: Director Tilda Moose Subtitle: Not sure how they got here. Type: Companion Description: Summons SCP Site-19 Director Moose to act as your companion. Is a literal moose. When riding Director Moose, gain +7 DEF against memes and cognitive hazards. Stats: 5 ATK / 8 DEF / 9 HP Card Title: A Sea Slug Subtitle: A Proper Gentleman Type: Companion Description: Spawns A Sea Slug to act as your companion. Wields an anti-materiel rifle. Talks a lot. Can summon a ghostly butler to do your bidding (with limitations!), but has a 10 round cool-down. Stats: 13 ATK / 2 DEF / 4 HP Card Title: A Librarian Subtitle: A Wanderer Type: Companion Description: Summons a Librarian to act as your companion. Has innate knowledge about a vast array of creatures and realms. Might be able to read your opponent’s hands, who knows. If attacked, they’ll flee back to their Library. Typical. Stats: 3 ATK / 3 DEF / 6 HP Card Title: A Very Loud Bird Subtitle: oh god make it stop Type: Companion Description: Summons some sort of awful eldritch abomination stuffed into the body of a small bird to act as your companion. Despicably loud. Can stun foes and entities, and commune with fellow anomalies. Unless otherwise protected, players who spend too much time in the presence of A Very Loud Bird will slowly lose their minds. Stats: 8 ATK / 4 DEF / 4 HP Card Title: Surf Rock Band Subtitle: Cruising The Starry Skies Type: Companion Description: Summons a ghostly Surf Rock Band to act as your companion. Provides your journey with cool evening tunes and casts a calming influence on everything you encounter. May also be able to commune with the Starfish. May also just smoke a lot of weed. Stats: 5 ATK / 5 DEF / 6 HP - Red Cards redcard.png A Red Card. Card Title: Spear of the Nonbeliever Subtitle: What’s a King to a God? Type: Weapon, Ranged Description: A massive harpoon gun designed to make mortals of gods. Can only be used on Cosmic, Divine, or Supreme Divine beings. Stats: +20 ATK vs Gods / -5 SPD / -1 DEF Card Title: Buster Sword Subtitle: A BFS Type: Weapon, Melee Description: A big sword. Requires two hands to hold. Can cleft a man in twain with a single swing. Reduces stealth. Increases upper arm gains. Stats: +8 ATK / -3 SPD Card Title: K-Mart Katana Subtitle: Only The Finest Chinesium Type: Weapon, Melee Description: A cheap sword. Low damage, low attack speed. The first choice of suburban ninjas everywhere. Minus points to attack if wearing a fedora. Stats: -5 ATK / -5 SPD / Fedora Bonus -1 ATK Card Title: Temporal Tinkering Subtitle: For When You Need A Few More Seconds Type: Ability, Temporal Description: Allows the user to wield the great and terrible cosmic power of time, in very small increments. Users may return up to 10 seconds into the past. Expires after three uses. Paradoxes not included. Card Title: A Gun That Shoots People Subtitle: “Shoots” “People” Type: Weapon, Ranged Description: A remarkably powerful .50BMG. Definitely not something you want to use yourself. Give it as a gift to an enemy, or anyone else you’d like to see spend the last few seconds of their life as a tiny, remarkably dense, screaming projectile. Expires after use. Stats: +19 ATK / +5 ACC Card Title: Intro to Memetics Subtitle: The Beginner’s Course Type: Ability, Memetic Description: Provides the user with innate knowledge of very simple anomalous memes. If used correctly, can be really annoying. If used incorrectly, can be even more annoying. Card Title: Dr. Mann’s Six-Shooter Subtitle: Ole Reliable Type: Weapon, Ranged Description: A revolver used by infamous Foundation doctor Everett Mann. Bonus to accuracy. Bonus to damage vs. undead. Bonus to lunacy. Stats: +10 ATK / +3 ACC Card Title: Intro to Unethical Business Practices, 5th Edition Subtitle: A MC&D Educational Product Type: Ability, Memetic Description: Anyone holding this book receives a +3 bonus to smooth-talking, negotiations, salesmanship, and swindling. Side effects include greasy combed-back hair and cheap suits. Card Title: The Infinity Gun10 Subtitle: An Abomination Type: Weapon, Ranged Description: A gun made of a god bound by the shredded souls of nine innocents. Instantly annihilates one being or artifact anywhere on the board, so long as the user is able to describe it. Expires after use. Stats: +∞ ATK / -50 Morality - Orange Cards orangecard.png An Orange Card. Card Title: DEER Subtitle: God From The Stars Type: Anomaly, Unknown, Supreme Divine Description: An ancient and mysterious creature that fell from the stars and broke the masquerade. Incredibly powerful. Stats: 34 ATK / 28 DEF / 40 HP Card Title: Technicolor Dream Goat Subtitle: Goat With All The Colors Of The Wind Type: Anomaly, Sentient, Animal Description: A multicolor, ethereal goat. Said to fill the dreams of its victims with incessant bleating. Impervious to physical attacks. Stats: 2 ATK / 3 DEF / 4 HP Card Title: Mr. God Subtitle: Has A Himself Complex Type: Anomaly, Sentient, Divine Description: An old man with a penchant for the dramatic. Hasn’t worn anything other than sandals for a thousand years. Needs to get off his high horse. Stats: 15 ATK / 8 DEF / 23 HP Card Title: A Bundle Of Golems Subtitle: The World’s Cutest Chemicals Type: Anomaly, Sentient, Construct Description: Little statue people made of elements. Tend to engage in shenanigans. Legend has it they unite once a year to form a powerful Anart Mecha, but this is unconfirmed. Stats: 5 ATK / 8 DEF / 5 HP Card Title: A Very Angry Star Subtitle: I Mean, Really Very Angry Type: Anomaly, Sentient, Divine Description: A furious ball of plasma and gas with a specific hatred for Planet Earth. The reason for its rage is uncertain, though it is known that Alto Clef owes it $23.50. Stats: 24 ATK / 18 DEF / 20 HP Card Title: Corrosion Man Subtitle: The Snatcher Type: Anomaly, Sentient, Humanoid Description: A ghastly former soldier turned into a living nightmare. Steals children for probably horrible reasons. Lives in an attic above the Darkness Between Dimensions. Stats: 9 ATK / 9 DEF / 9 HP Card Title: L O N G C O R G Subtitle: Stretch Doggo Type: Anomaly, Sentient, Animal Description: An immensely long corgi. Used for public transportation. A very good boy. Stats: 3 ATK / 5 DEF / 18 HP Card Title: Wretched Bovine Heart Subtitle: Beating In The Darkness Type: Anomaly, Sentient, Biological Description: A demon possessed by speed incarnate. Horrifying and unrelenting. All entities nearby lose -2 to DEF against psychological threats. Stats: 17 ATK / 5 DEF / 6 HP Card Title: The Serpent Subtitle: The Source of Knowledge Type: Anomaly, Sentient, Supreme Divine Description: Tricked Adam El Asem into eating from the Tree of Knowledge, freeing itself from its prison. Legends say the Wanderer’s Library is built on its back. Thinks it knows everything. Probably does. Stats: 10 ATK / 35 DEF / 45 HP Card Title: SCP-173 In A Sombrero Subtitle: Ay Caramba Type: Anomaly, Construct Description: A statue in a sombrero. Gave up a life of snapping necks to pursue its dream of dancing. Nearby entities may be overcome by the urge to dance. Stats: 4 ATK / 9 DEF / 8 HP - Yellow Cards yellowcard.png A Yellow Card. Card Title: A Little Insurgency Description: Your friends in the Insurgency carry out a coup on one of your rivals. To the victor goes the spoils! I’m sure they won’t take it personally. Effect: Receive all of the earnings of a random player. Card Title: Research Grant Description: You are offered a grant for your contributions to academia. Congratulations! Now hurry up and spend it before the Foundation scoops you up. Effect: Receive $300. Card Title: Lost Aztec Gold Description: You discover a bounty of gold from a ruined civilization! Enjoy your blood money! Effect: Receive $300. Card Title: Business Deal Description: You negotiate a deal between The Factory and Dr. Wondertainment, and earn big dividends for your work! Effect: Receive $400. Card Title: Mr. Money’s Jackpot Extravaganza Description: Mr. Money is about to make you Mr. Wealthy! Effect: Receive $5000. - White Cards whitecard.png A White Card. Card Title: Elixir Description: You get ahold of the Overseer’s Secret Stuff. You are healed! Effect: When used, completely heals the player of all ailments. Card Title: Safe Passageway Description: In a stroke of good luck, you discover a road untouched by danger! Effect: Allows a player to bypass a dangerous environmental hazard unharmed. Card Title: Promotion Description: Your efforts do not go unnoticed! You are promoted to Senior Junior Researcher! Effect: Player gains a permanent +2 to ATK and +3 to DEF. Card Title: Brushed By The Starfish Description: The Cosmic Starfish brushes against you with one of its Five arms. You are empowered! Effect: Player receives +10 ATK / +10 DEF / +8 SPD / +10 HP for three turns. Card Title: Angel of Mercy Description: You are resurrected! Effect: If a player is killed while holding this card, the player is instantly returned to half health. - Black Cards blackcard.png A Black Card. Card Title: Fuck This One Guy Specifically Description: Someone has a grudge! The Sun God Nergal punches you! Ouch! Effect: The player is punched by a Supreme Divine being, and dies. Card Title: Containment Breach Description: Oh no! All of your contained anomalies are loose! What a disastrous circumstance! Effect: Any contained anomalies return to the gameboard. Card Title: Friend or Foe Description: Your companion betrays you, seeking glory only for themselves! Effect: Any companions become hostile to the player. Card Title: Consolidation11 Description: A deal is signed. The Foundation dissolves! Only the Coalition remains! Effect: Removes the MR. CONTAINMENT and MR. FOUNDATION win conditions. Card Title: ████ (••/•••••/••/•) Description: Bad luck, hombre. Effect: Player is killed.12 - Purple Cards purplecard.png A Purple Card. Card Title: Mr. Moon Subtitle: Waxing and Waning Type: Wondertainment Description: The great and terrible Mr. Moon! Disrupts the tides and summons werewolves across the map! Not made of cheese! Maybe made of cheese! Stats: 19 ATK / 20 DEF / 20 HP Addendum 3301.4: Memorandum Regarding SCP-3301 From: Dr. Tilda Moose, Director, Site-19 To: 3301 Research Team CC: Ethics Committee Liaison, Director Council Liaison, Classification Committee Liaison Last night, one week since the last playthrough of SCP-3301, a small shipment of these games were discovered on a truck destined for a toy store in Wisconsin. We began a game immediately after discovering these games, and received a note through our game board thanking us for our continued playtesting. The anomalous games were promptly removed before they could be viewed by a larger audience, but this was still too close of a call. Truthfully, we don’t know how they're getting all of this information. INFOSEC teams have advised me that these were likely warning shots, something innocuous that could be easily detected and quickly removed, but a notice that additional measures may be taken if we don’t comply. After consulting with our security teams, and members of the Site Director Council, we’ve decided to do just that. In a break from our typical mantra, access restrictions to SCP-3301 have been reduced considerably, and the object has been reclassified as Safe. So far as we can tell, this is a legitimate show of good faith, with no malicious intent. For some reason, Dr. Wondertainment has provided us with something fun, and wants us to play it. In this case, we’ll do just that. Our protocol for this object does not reflect a change in our policy regarding using anomalous objects for recreational purposes. Nor does it reflect a change in our relationship with the group of interest known as Dr. Wondertainment. For all intents and purposes, this new protocol is the containment procedure for this object, and this object only. -Moose Addendum 3301.5: SCP-3301 Testing and Gameplay Logs - Close Log In keeping with proper Foundation testing protocols, all instances of SCP-3301’s active state are to be recorded for analysis and archival. The following is an example of proper test log format, and should be used in all future instances of test logging. SCP-3301 Test and Gameplay Log: Log ID: 3301|001 Participants: Dr. Andrew Richards and Agent Anna Lang, Dr. Michael St. Clair and Dr. Isaac Baker, Dr. Nicholas Quinn and Dr. Django Bridge, Agent Julian Calloway and Agent Jasper Jenkins Game Board: The Garden of Eden Winner: Dr. Nicholas Quinn and Dr. Django Bridge Victory Condition: MR. ESCHATOLOGY Runtime: 3h 14m 58s Payout: $1,750 Game Summary: Dr. Richards got out to an early start when Agent Lang managed to contain two entities within the first five turns, having drawn the card “Mr. Containment’s Vac-n-Suck” on the first turn. However, the tides began to turn when Dr. Bridge, on the direction of Dr. Quinn, opened a secret treasure chest in a cave and found the card “Sacrifice”, a red card that he then used to summon “Planet of Ten Thousand Fingers”, a supreme divine orange card. While Dr. St. Clair and Agent Calloway’s teams were fending off attacks from the first supreme divine being, Dr. Quinn drew the red card “Error in the Database", which summoned the supreme divine being “Mary Nakayama” on the 16th turn. This being immediately dispatched Agent Calloway’s team, which was already weakened by the “Planet of Ten Thousand Fingers”. However, on the 29th turn, Dr. Richards drew a purple card, Ms. Sweetie, which cast a sugary haze across the entire map. Agent Lang then spent the next three turns attacking Ms. Sweetie, attempting to contain the entity before Dr. Quinn and Dr. Bridge could summon another supreme divine being. Their efforts were disrupted by Dr. Baker, who sniped Agent Lang from a nearby hillside, and then began attacking the already damaged Ms. Sweetie. On the next turn, Dr. Quinn drew the card ”Upgrade”, which he used on an item that Dr. Bridge had recovered called “Puzzle Box”. The result was a card called “Celestial Puzzle Box”, which Dr. Quinn used to summon “A Clockwork God”, the third supreme divine being, which immediately ended the game. After the usual fireworks and musical celebration, the voice of the announcer declared that Dr. Quinn and Dr. Bridge had become MR. ESCHATOLOGY. At the conclusion of the game, Dr. Quinn and Dr. Bridge were awarded their payout, a gold bar worth exactly $1,750. Audio Recording Transcript Excerpts [BEGIN LOG] Dr. Quinn: Alright, so... let’s see. I’m going to use “Clockwork Fanaticism” on Django. Dr. St. Clair: What’s that do? Dr. Quinn: It, uh... imbues him with clockwork powers. (Pauses) I think that’s it. (To Bridge) You noticing anything different down there? Dr. Bridge: (Distantly) Yes, actually. I seem to have had my insides replaced with gears and pulleys. Oh! (Pauses) So now I seem to have something being created inside my stomach. Hang on. (Pauses) Yes, I’ve now deposited it into my hands. Dr. Quinn: Cool, I get to draw a card. (Pauses to read) So that’s called a “Puzzle Box”. It doesn’t look like it has any stats. Can it do anything? Dr. Bridge: Doesn’t, uh... doesn’t seem to do anything. Dr. Quinn: Huh. Alright. I guess we’ll just discard that later. [END LOG] [BEGIN LOG] Dr. Quinn: (Laughs) OK, so listen to this. This is called “Error in the Database”, and if we find a computer- Dr. Bridge: Which I’m standing right next to, yes. Dr. Quinn: -then I can summon a supreme divine- Agent Calloway: Oh my god this is bullshit. Agent Jenkins: What? What’s going on up there? Dr. Quinn: -called Mary Nakayama. Bite my ass, Calloway. Agent Jenkins: Hey Julian? Something going on up there? Because things are starting to get a little spooky down here. Agent Calloway: Hang on, uh... I’ve got... uh... Agent Jenkins: So are you going to— Agent Jenkins is suddenly annihilated when a spectral entity appears where he was standing. Agent Calloway: Oh goddammit. [END LOG] [BEGIN LOG] Dr. St. Clair: Take the shot, Baker! The sound of a distant gunshot. Dr. St. Clair: Hell yeah! Dr. Richards: Anna? Anna? Ah, fuck it. What is that thing, and when did you draw it? I didn’t see it when I divined you earlier. Dr. St. Clair: In the last turn! How clutch is that? Dr. Baker: Mike? Hey, Mike? Did we win? Dr. St. Clair: Nah, not yet, but you get another shot into that Mister and we will. Dr. Quinn: Is that so, Michael? Dr. St. Clair: Oh no you don’t. Don’t you try any more of your eschatology bullshit, Nicholas. Dr. Quinn: Regrettably, all I have is eschatology bullshit! Behold, I use “Upgrade” on this “Puzzle Box”, to create... (pauses) a Celestial Puzzle Box! Django, open that bad boy up! Dr. Bridge: You got it. Come on out, biggun. (The sound of grinding metal is heard in the background) Announcer’s Voice: That’s it! The game is over! Congratulations to Django Bridge and Nicholas Quinn; you have become MR. ESCHATOLOGY! Dr. St. Clair: God fucking dammit Nick, I almost had that one. Further testing logs are available here. Footnotes 1. Typically pieces for players take the shape of symbols representing various Groups of Interest or notable Persons of Interest, while pieces for the secondary players are simply small tokens of the same color as the primary player’s piece. 2. Notably, many of these anomalies appear to be direct references to anomalies within Foundation containment, or anomalies that the Foundation is otherwise aware of. The depth of this breach of information is still being investigated. 3. During one test, Researcher H. Korver drew a White Card called “Divine Assistance”, which summoned a “divine being” for his partner (Dr. Andrew White), as well as for every other player. For the next two hours, the divine beings engaged in combat with each other while the game pieces attempted to collect as many yellow cards as they could. 4. Only six Wondertainment cards have been drawn in more than fifty iterations of the game tested thus far 5. Such as one game of “Echoes of the Mariana”, which saw the inclusion of Mr. Fish as an enormous, predatory shark. 6. Once equipment has been added, the equipment cannot be changed until the beginning of the next turn, unless otherwise affected by another player. 7. Notably, the typical voice that announces the players’ victory at the end of the game is replaced with a different, more aggressive voice, which has not yet been identified. 8. This win condition does not match its description in the manual, and whether this is accidental or not is unknown. 9. This occurrence has only happened once in testing, when Agent Staski and Agent Polliver won the game after becoming “MR. LAMENT”, with victory conditions of “Any player who is capable of killing another player only by saying hurtful things to them becomes MR. LAMENT, and wins the game.” In this case, Agent Staski made a rude comment about Agent Parker’s mother, which resulted in Agent Parker slipping as he charged Agent Staski and falling into a ravine. 10. While an image of this card is visible within the game manual, the card has not yet been seen during gameplay testing. 11. During a testing session, Dr. Richard McMillan used his turn after another player had played “Consolidation” to ask his companion, The Librarian, what the effect of the card was, as it was not readily apparent. In response, The Librarian said, “MR. CONTAINMENT and MR. FOUNDATION are dead, it seems. This echoes of a situation from somewhere similar, but very far away. I sense that MR. THRESHER may have taken their place.” When questioned further, The Librarian was unsure how to respond and appeared noticeably uncomfortable. 12. While the ████ card does summon an in-game version of ••/•••••/••/•, the effect does not seem to permeate the barrier of the spatial anomaly, as the real-world ••/•••••/••/• does not appear, despite the necessary triggering factors being present.
User prompt
Please fix the bug: 'Timeout.tick error: selectedGameMode is not defined' in or related to this line: 'if (selectedGameMode === gameModes.chaos) {' Line Number: 1248
User prompt
make the game a team vs team format
User prompt
add: Setup - Close Document SCP-3301 is played between 2 to 8 teams of two players. Each primary player chooses a secondary player, to act as their representative on the game board. The primary players are all selected when each set of players places their game pieces1 on the board. The board contained within SCP-3301 varies depending on which version of the “game” is being played, and is random. Gameplay is similar between each board, though the setting is different (i.e. The Land of the Unclean, Echoes of the Mariana, Bigfoot’s Jungle, The Cosmic Starfish, etc.), and different hostile entities appear as opponents on different boards. Testing has revealed at least twenty-three different game boards, though there are possibly more. Once the game board is unfolded, and the silver card box placed in the middle of the board in the appropriate space, the surrounding area (a space roughly 300m in diameter) will undergo dramatic anomalous spatial changes. Observers will see the space appear to fall away, as if the viewpoint of observers outside of the area of effect has become a bird’s eye view of a space much larger than the affected area. This observed space will mimic the current game board, only on a much larger scale and typically built into an arena setting. Within the affected space, the primary players will find themselves seated around a flat, crystalline surface suspended above the aforementioned game board arena, while their game piece representatives will be at the starting positions on the game board below. The start of the game is typically accompanied by music and fireworks, and a voice announcing the beginning of a new game. Once the game has begun, nothing can be passed through the spatial distortion surrounding the game arena. Secondary players who are killed or die in-game will appear outside of the distortion shortly after their death, unharmed. Primary players will remain within the anomaly for the duration of the game.
User prompt
add Introduction The following is an introduction copied directly out of “THE FOUNDATION” gameplay handbook. The handbook is a leather-bound pamphlet with embossed silver print displaying the name of the game, the production studio, and the words “50TH ANNIVERSARY EDITION”. THE FOUNDATION A GAME BY CRYOGEN STUDIOS A DIVISION OF DR. WONDERTAINMENT Welcome, weary researcher, to THE FOUNDATION! A board game only for the strong willed and mighty of heart. But beware! For danger lurks around every corner, and foul things are creeping in the night. Do you have what it takes to stand betwixt humanity and the darkness? Or will you too be lost to the chaos eternal? Only time will tell! Become Mr. Collector, or maybe Mr. Containment! The choice is yours!
User prompt
cards have random backgrounds
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1", { highScore: 0, playerLevel: 1, containedAnomalies: 0 }); /**** * Classes ****/ var Button = Container.expand(function () { var self = Container.call(this); self.background = self.attachAsset('button', { anchorX: 0.5, anchorY: 0.5 }); self.text = new Text2('Button', { size: 24, fill: 0xFFFFFF }); self.text.anchor.set(0.5, 0.5); self.addChild(self.text); self.setText = function (text) { self.text.setText(text); }; self.setCallback = function (callback) { self.callback = callback; }; self.down = function (x, y, obj) { tween(self, { scaleX: 0.95, scaleY: 0.95 }, { duration: 100, easing: tween.easeOut }); }; self.up = function (x, y, obj) { tween(self, { scaleX: 1, scaleY: 1 }, { duration: 100, easing: tween.easeOut }); if (self.callback) { self.callback(); } }; return self; }); var Card = Container.expand(function () { var self = Container.call(this); // Card properties self.cardType = 'none'; self.cardName = ''; self.cardDescription = ''; self.power = 0; self.cost = 0; self.revealed = false; // Card visuals self.back = self.attachAsset('cardBack', { anchorX: 0.5, anchorY: 0.5 }); var cardBackgrounds = ['cardBack', 'cardFront', 'board', 'button']; var randomBackground = cardBackgrounds[Math.floor(Math.random() * cardBackgrounds.length)]; self.front = self.attachAsset(self.cardName.replace(/\s+/g, '').toLowerCase(), { anchorX: 0.5, anchorY: 0.5, alpha: 0 }); self.nameText = new Text2('', { size: 20, fill: 0xFF0000 }); self.nameText.anchor.set(0.5, 0); self.nameText.y = -70; self.addChild(self.nameText); self.descriptionText = new Text2('', { size: 16, fill: 0xFF0000 }); self.descriptionText.anchor.set(0.5, 0); self.descriptionText.y = 0; self.descriptionText.alpha = 0; self.addChild(self.descriptionText); self.powerText = new Text2('', { size: 24, fill: 0xFF0000 }); self.powerText.anchor.set(0.5, 0.5); self.powerText.x = 50; self.powerText.y = 70; self.powerText.alpha = 0; self.addChild(self.powerText); self.costText = new Text2('', { size: 24, fill: 0xFF0000 }); self.costText.anchor.set(0.5, 0.5); self.costText.x = -50; self.costText.y = 70; self.costText.alpha = 0; self.addChild(self.costText); // Initialize a card with data self.init = function (data) { self.cardType = data.type; self.cardName = data.name || 'SCP-' + (Math.floor(Math.random() * 899) + 100); self.cardDescription = data.description || 'A mysterious SCP with unknown effects.'; self.power = data.power || Math.floor(Math.random() * 50) + 10; self.cost = data.cost || Math.floor(Math.random() * 30) + 10; self.nameText.setText(self.cardName); self.descriptionText.setText(self.cardDescription); self.powerText.setText(self.power.toString()); self.costText.setText(self.cost.toString()); }; // Flip the card to reveal front self.reveal = function () { if (!self.revealed) { tween(self.back, { alpha: 0 }, { duration: 300, easing: tween.easeInOut }); tween(self.front, { alpha: 1 }, { duration: 300, easing: tween.easeInOut }); tween(self.descriptionText, { alpha: 1 }, { duration: 300, easing: tween.easeInOut }); tween(self.powerText, { alpha: 1 }, { duration: 300, easing: tween.easeInOut }); tween(self.costText, { alpha: 1 }, { duration: 300, easing: tween.easeInOut }); self.revealed = true; } }; // Flip card back self.hide = function () { if (self.revealed) { tween(self.back, { alpha: 1 }, { duration: 300, easing: tween.easeInOut }); tween(self.front, { alpha: 0 }, { duration: 300, easing: tween.easeInOut }); tween(self.descriptionText, { alpha: 0 }, { duration: 300, easing: tween.easeInOut }); tween(self.powerText, { alpha: 0 }, { duration: 300, easing: tween.easeInOut }); tween(self.costText, { alpha: 0 }, { duration: 300, easing: tween.easeInOut }); self.revealed = false; } }; // Card interaction events self.down = function (x, y, obj) { tween(self, { scaleX: 1.1, scaleY: 1.1 }, { duration: 100, easing: tween.easeOut }); self.dragging = true; self.dragOffsetX = x - self.x; self.dragOffsetY = y - self.y; }; self.move = function (x, y, obj) { if (self.dragging) { self.x = x - self.dragOffsetX; self.y = y - self.dragOffsetY; } }; self.up = function (x, y, obj) { tween(self, { scaleX: 1, scaleY: 1 }, { duration: 100, easing: tween.easeOut }); self.dragging = false; // Check for double-click if (self.lastClickTime && Date.now() - self.lastClickTime < 300) { // Trigger card selection in the game if (typeof cardSelected === 'function') { cardSelected(self); } } self.lastClickTime = Date.now(); if (!self.revealed) { self.reveal(); LK.getSound('cardDraw').play(); } // Show options for the card showCardOptions(self); }; // Function to show options for the card function showCardOptions(card) { // Example options: Use, Discard var options = ['Use', 'Discard']; options.forEach(function (option, index) { var optionText = new Text2(option, { size: 20, fill: 0xFFFFFF }); optionText.anchor.set(0.5, 0.5); optionText.x = card.x; optionText.y = card.y + 50 + index * 30; game.addChild(optionText); optionText.down = function () { if (option === 'Use') { cardSelected(card); } else if (option === 'Discard') { discardCard(card); } optionText.destroy(); }; }); } // Function to discard a card function discardCard(card) { var index = playerHand.indexOf(card); if (index !== -1) { playerHand.splice(index, 1); card.destroy(); } } return self; }); var Entity = Container.expand(function () { var self = Container.call(this); // Entity properties self.entityType = 'none'; self.health = 100; self.maxHealth = 100; self.energy = 100; self.maxEnergy = 100; self.power = 10; self.moveRange = 3; self.boardX = 0; self.boardY = 0; self.isMoving = false; self.isPlayer = false; // Entity visuals self.graphic = null; self.healthBarBg = self.attachAsset('barBackground', { anchorX: 0.5, anchorY: 0.5, y: -45 }); self.healthBar = self.attachAsset('healthBar', { anchorX: 0, anchorY: 0.5, x: -30, y: -45 }); self.energyBarBg = self.attachAsset('barBackground', { anchorX: 0.5, anchorY: 0.5, y: -35 }); self.energyBar = self.attachAsset('energyBar', { anchorX: 0, anchorY: 0.5, x: -30, y: -35 }); self.nameText = new Text2('', { size: 16, fill: 0xFFFFFF }); self.nameText.anchor.set(0.5, 1); self.nameText.y = -50; self.addChild(self.nameText); // Initialize entity with data self.init = function (data, isPlayerEntity) { self.entityType = data.type; self.health = data.health || 100; self.maxHealth = data.maxHealth || 100; self.energy = data.energy || 100; self.maxEnergy = data.maxEnergy || 100; self.power = data.power || 10; self.moveRange = data.moveRange || 3; self.isPlayer = isPlayerEntity || false; // Set up appropriate graphic based on type if (self.isPlayer) { self.graphic = self.attachAsset('player', { anchorX: 0.5, anchorY: 0.5 }); } else if (self.entityType === 'opponent') { self.graphic = self.attachAsset('opponent', { anchorX: 0.5, anchorY: 0.5 }); } else if (self.entityType === 'anomaly') { self.graphic = self.attachAsset('anomaly', { anchorX: 0.5, anchorY: 0.5 }); } self.nameText.setText(data.name || self.entityType); self.updateBars(); }; // Update health and energy bars self.updateBars = function () { var healthPercent = self.health / self.maxHealth; var energyPercent = self.energy / self.maxEnergy; self.healthBar.width = 60 * healthPercent; self.energyBar.width = 60 * energyPercent; }; // Take damage self.takeDamage = function (amount) { self.health -= amount; if (self.health <= 0) { self.health = 0; self.die(); } self.updateBars(); LK.effects.flashObject(self, 0xff0000, 300); }; // Use energy self.useEnergy = function (amount) { if (self.energy >= amount) { self.energy -= amount; self.updateBars(); return true; } return false; }; // Restore health self.heal = function (amount) { self.health += amount; if (self.health > self.maxHealth) { self.health = self.maxHealth; } self.updateBars(); LK.effects.flashObject(self, 0x00ff00, 300); }; // Restore energy self.restoreEnergy = function (amount) { self.energy += amount; if (self.energy > self.maxEnergy) { self.energy = self.maxEnergy; } self.updateBars(); LK.effects.flashObject(self, 0x0088ff, 300); }; // Move to a board position self.moveToPosition = function (boardX, boardY) { if (self.isMoving) { return; } self.isMoving = true; self.boardX = boardX; self.boardY = boardY; var targetX = BOARD_OFFSET_X + boardX * TILE_SIZE + TILE_SIZE / 2; var targetY = BOARD_OFFSET_Y + boardY * TILE_SIZE + TILE_SIZE / 2; tween(self, { x: targetX, y: targetY }, { duration: 500, easing: tween.easeInOut, onFinish: function onFinish() { self.isMoving = false; LK.getSound('playerMove').play(); // Check for anomaly at this position checkForAnomalyAtPosition(boardX, boardY); } }); }; // Attack another entity self.attack = function (target) { if (!target) { return; } if (self.useEnergy(20)) { LK.getSound('playerAttack').play(); // Animation var originalX = self.x; var originalY = self.y; var targetX = target.x; var targetY = target.y; // Move towards target tween(self, { x: originalX + (targetX - originalX) * 0.7, y: originalY + (targetY - originalY) * 0.7 }, { duration: 200, easing: tween.easeIn, onFinish: function onFinish() { // Apply damage target.takeDamage(self.power); // Move back tween(self, { x: originalX, y: originalY }, { duration: 300, easing: tween.easeOut }); } }); } }; // Die function self.die = function () { tween(self, { alpha: 0, scaleX: 0.5, scaleY: 0.5 }, { duration: 500, easing: tween.easeIn, onFinish: function onFinish() { self.destroy(); if (self.entityType === 'anomaly') { containAnomaly(self); } // Check if game is over checkGameState(); } }); }; // Entity interaction events self.down = function (x, y, obj) { if (gameState !== GAME_STATE.PLAYER_TURN) { return; } if (self.isPlayer) { // Select the player selectEntity(self); } else if (selectedEntity && selectedEntity.isPlayer) { // If player is selected and this is another entity, try to attack var dx = Math.abs(selectedEntity.boardX - self.boardX); var dy = Math.abs(selectedEntity.boardY - self.boardY); if (dx <= 1 && dy <= 1) { selectedEntity.attack(self); endPlayerTurn(); } } }; return self; }); var Highlight = Container.expand(function () { var self = Container.call(this); self.graphic = self.attachAsset('highlight', { anchorX: 0.5, anchorY: 0.5, alpha: 0.3 }); self.boardX = 0; self.boardY = 0; self.setPosition = function (bx, by) { self.boardX = bx; self.boardY = by; self.x = BOARD_OFFSET_X + bx * TILE_SIZE + TILE_SIZE / 2; self.y = BOARD_OFFSET_Y + by * TILE_SIZE + TILE_SIZE / 2; }; self.down = function (x, y, obj) { if (gameState !== GAME_STATE.PLAYER_TURN || !selectedEntity || !selectedEntity.isPlayer) { return; } // Calculate the distance between selected entity and this highlight var dx = Math.abs(selectedEntity.boardX - self.boardX); var dy = Math.abs(selectedEntity.boardY - self.boardY); var distance = Math.max(dx, dy); // Check if we can move there if (distance <= selectedEntity.moveRange) { // Check if the destination is empty if (isTileEmpty(self.boardX, self.boardY)) { selectedEntity.moveToPosition(self.boardX, self.boardY); clearHighlights(); endPlayerTurn(); } } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000, fullscreen: true // Enable fullscreen mode }); /**** * Game Code ****/ // Special Containment Procedures var containmentProceduresText = new Text2("Special Containment Procedures: SCP-3301 is to be stored within a standard small containment locker at Site-19 when not being used for testing. Testing is only to be authorized by the SCP-3301 head researcher, currently Dr. Benjamin Cole. Testing may only be carried out at the Site-19 E Wing Storage Warehouse, which has been renovated specifically for this purpose.\n\nIt is a requirement that all staff members assigned to SCP-3301 must be versed in the rules and protocols of the game. As such, a detailed explanation is available in Addendum 3301.2.\n\nSCP-3301 is a Class IX information security hazard, and its full repercussions are being studied by the Foundation Information Security Department.\n\nUpdated Containment Procedures: Per the special memorandum detailed in Addendum 3301.4, testing of SCP-3301 has been made available to all qualified personnel, and is available as an approved extracurricular activity in the Foundation Employee Benefit Program.\n\nPersonnel are required to submit detailed testing logs for each 3301 Activation Period. Full log is available here.", { size: 24, fill: 0xFFFFFF, align: 'center', wordWrap: true, wordWrapWidth: 1800 }); containmentProceduresText.anchor.set(0.5, 0.5); containmentProceduresText.x = 2048 / 2; containmentProceduresText.y = 2732 / 2 + 600; // Position below the setup text LK.gui.center.addChild(containmentProceduresText); // Introduction text var Team = function Team(name, isPlayerTeam) { this.name = name; this.entities = []; this.isPlayerTeam = isPlayerTeam; }; Team.prototype.addEntity = function (entity) { this.entities.push(entity); }; Team.prototype.removeEntity = function (entity) { var index = this.entities.indexOf(entity); if (index !== -1) { this.entities.splice(index, 1); } }; Team.prototype.isDefeated = function () { return this.entities.length === 0; }; var setupText = new Text2("Setup\n\nClose Document\n\nSCP-3301 is played between 2 to 8 teams of two players. Each primary player chooses a secondary player, to act as their representative on the game board. The primary players are all selected when each set of players places their game pieces on the board.\n\nThe board contained within SCP-3301 varies depending on which version of the “game” is being played, and is random. Gameplay is similar between each board, though the setting is different (i.e. The Land of the Unclean, Echoes of the Mariana, Bigfoot’s Jungle, The Cosmic Starfish, etc.), and different hostile entities appear as opponents on different boards. Testing has revealed at least twenty-three different game boards, though there are possibly more.\n\nOnce the game board is unfolded, and the silver card box placed in the middle of the board in the appropriate space, the surrounding area (a space roughly 300m in diameter) will undergo dramatic anomalous spatial changes. Observers will see the space appear to fall away, as if the viewpoint of observers outside of the area of effect has become a bird’s eye view of a space much larger than the affected area. This observed space will mimic the current game board, only on a much larger scale and typically built into an arena setting.\n\nWithin the affected space, the primary players will find themselves seated around a flat, crystalline surface suspended above the aforementioned game board arena, while their game piece representatives will be at the starting positions on the game board below. The start of the game is typically accompanied by music and fireworks, and a voice announcing the beginning of a new game. Once the game has begun, nothing can be passed through the spatial distortion surrounding the game arena. Secondary players who are killed or die in-game will appear outside of the distortion shortly after their death, unharmed. Primary players will remain within the anomaly for the duration of the game.", { size: 24, fill: 0xFFFFFF, align: 'center', wordWrap: true, wordWrapWidth: 1800 }); setupText.anchor.set(0.5, 0.5); setupText.x = 2048 / 2; setupText.y = 2732 / 2 + 300; // Position below the introduction text LK.gui.center.addChild(setupText); var introductionText = new Text2("THE FOUNDATION\n\nA GAME BY CRYOGEN STUDIOS\nA DIVISION OF DR. WONDERTAINMENT\n\nWelcome, weary researcher, to THE FOUNDATION! A board game only for the strong willed and mighty of heart. But beware! For danger lurks around every corner, and foul things are creeping in the night. Do you have what it takes to stand betwixt humanity and the darkness? Or will you too be lost to the chaos eternal? Only time will tell! Become Mr. Collector, or maybe Mr. Containment! The choice is yours!", { size: 30, fill: 0xFFFFFF, align: 'center', wordWrap: true, wordWrapWidth: 1800 }); introductionText.anchor.set(0.5, 0.5); introductionText.x = 2048 / 2; introductionText.y = 2732 / 2; LK.gui.center.addChild(introductionText); function transportEntitiesToDarkness(machine) { var nearbyEntities = []; // Find entities near the machine for (var i = 0; i < playerEntities.length; i++) { if (Math.abs(playerEntities[i].boardX - machine.boardX) <= 1 && Math.abs(playerEntities[i].boardY - machine.boardY) <= 1) { nearbyEntities.push(playerEntities[i]); } } for (var i = 0; i < opponentEntities.length; i++) { if (Math.abs(opponentEntities[i].boardX - machine.boardX) <= 1 && Math.abs(opponentEntities[i].boardY - machine.boardY) <= 1) { nearbyEntities.push(opponentEntities[i]); } } // Transport entities to the Darkness Between Dimensions for (var i = 0; i < nearbyEntities.length; i++) { (function (entity) { entity.alpha = 0; // Make entity invisible LK.setTimeout(function () { entity.alpha = 1; // Return entity to the board entity.health = Math.max(1, entity.health - 10); // Make them "squishier" entity.updateBars(); }, Math.random() * 5000 + 2000); // Random return time between 2 to 7 seconds })(nearbyEntities[i]); } } // Game constants function spawnSupremeDivineBeings() { for (var i = 0; i < 2; i++) { var divineBeing = new Entity(); divineBeing.init({ type: 'divine', name: 'Supreme Divine ' + (i + 1), health: 200, maxHealth: 200, energy: 150, maxEnergy: 150, power: 50, moveRange: 4 }); // Find a random empty position for the divine being var randomX, randomY; do { randomX = Math.floor(Math.random() * BOARD_SIZE); randomY = Math.floor(Math.random() * BOARD_SIZE); } while (!isTileEmpty(randomX, randomY)); divineBeing.boardX = randomX; divineBeing.boardY = randomY; divineBeing.x = BOARD_OFFSET_X + divineBeing.boardX * TILE_SIZE + TILE_SIZE / 2; divineBeing.y = BOARD_OFFSET_Y + divineBeing.boardY * TILE_SIZE + TILE_SIZE / 2; game.addChild(divineBeing); opponentEntities.push(divineBeing); } } var BOARD_SIZE = 8; var TILE_SIZE = 120; var BOARD_OFFSET_X = (2048 - BOARD_SIZE * TILE_SIZE) / 2; var BOARD_OFFSET_Y = (2732 - BOARD_SIZE * TILE_SIZE) / 2 - 100; var GAME_STATE = { SETUP: 0, PLAYER_TURN: 1, OPPONENT_TURN: 2, GAME_OVER: 3 }; // Game mode options var gameModes = { chaos: { description: "Chaos Mode: Random anomalies appear every turn, and player entities have increased power.", init: function init() { initPlayerTeam(); initOpponents(); initAnomalies(); increasePlayerPower(); } }, standard: { description: "Standard game mode with normal rules.", init: function init() { initPlayerTeam(); initOpponents(); initAnomalies(); } }, apollyon: { description: "Apollyon Mode: Two random, hostile supreme divine beings appear on the map after the fourth turn.", init: function init() { initPlayerTeam(); initOpponents(); initAnomalies(); // Additional setup for Apollyon Mode spawnSupremeDivineBeings(); } } }; // Game variables var gameBoard = []; var gameState = GAME_STATE.SETUP; var playerEntities = []; var opponentEntities = []; var anomalies = []; var selectedEntity = null; var highlights = []; var cards = []; var score = 0; var turnCounter = 0; var playerHand = []; var cardsInDeck = 20; // Game board and UI var boardGraphic = game.addChild(LK.getAsset('board', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: BOARD_OFFSET_Y + BOARD_SIZE * TILE_SIZE / 2 })); boardGraphic.width = BOARD_SIZE * TILE_SIZE; boardGraphic.height = BOARD_SIZE * TILE_SIZE; // Score text var scoreTxt = new Text2('Score: 0', { size: 50, fill: 0xFF0000 }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); scoreTxt.y = 20; // Turn indicator var turnTxt = new Text2('Player Turn', { size: 40, fill: 0xFF0000 }); turnTxt.anchor.set(0.5, 0); LK.gui.top.addChild(turnTxt); turnTxt.y = 80; // Draw card button var drawCardBtn = new Button(); drawCardBtn.setText('Draw Card (' + cardsInDeck + ')'); drawCardBtn.x = 2048 - 150; drawCardBtn.y = 2732 - 100; game.addChild(drawCardBtn); // Add card deck icon var cardDeckIcon = LK.getAsset('cardBack', { anchorX: 0.5, anchorY: 0.5, x: 2048 - 150, y: 2732 - 200 }); game.addChild(cardDeckIcon); drawCardBtn.setCallback(function () { if (gameState === GAME_STATE.PLAYER_TURN && playerHand.length < 5 && cardsInDeck > 0) { drawCard(); } }); // End turn button var endTurnBtn = new Button(); endTurnBtn.setText('End Turn'); endTurnBtn.x = 150; endTurnBtn.y = 2732 - 100; game.addChild(endTurnBtn); endTurnBtn.setCallback(function () { if (gameState === GAME_STATE.PLAYER_TURN) { endPlayerTurn(); } }); // Card deck initialization var cardTypes = [{ type: 'ability', name: 'psychic shield', description: 'Increase defense for 2 turns', power: 15, cost: 25 }, { type: 'weapon', name: 'anomaly neutralizer', description: 'Deal extra damage to anomalies', power: 30, cost: 40 }, { type: 'equipment', name: 'energy booster', description: 'Restore energy', power: 50, cost: 15 }, { type: 'ability', name: 'containment field', description: 'Trap anomalies for easy capture', power: 25, cost: 35 }, { type: 'weapon', name: 'tactical rifle', description: 'Medium range attack', power: 20, cost: 30 }, { type: 'land', name: 'island turtle', description: 'If you are at sea, this card spawns an Island Turtle to ferry you around. If you’re not, the turtle spawns anyway, and dies from dehydration.', power: 0, cost: 0 }, { type: 'land', name: 'darkness between dimensions', description: 'Spawns a machine that, after a random amount of time, will transport anything nearby into the Darkness Between Dimensions. Players in the Darkness Between Dimensions can be saved by divine grace, or with the item “Scranton’s Grappling Hook”. After a random amount of time, players will be returned to the board. They will come back… squishier.', power: 0, cost: 0 }, { type: 'companion', name: 'scp companion', description: 'A loyal SCP companion with unique abilities.', power: Math.floor(Math.random() * 20) + 5, cost: Math.floor(Math.random() * 20) + 5 }, { type: 'scp', name: 'random scp', description: 'A random SCP with unpredictable effects.', power: Math.floor(Math.random() * 50) + 10, cost: Math.floor(Math.random() * 30) + 10 }, { type: 'director', name: 'director tilda moose', description: 'A strategic leader with the ability to boost team morale and efficiency.', power: 40, cost: 50 }]; // Initialize game board function initBoard() { gameBoard = []; for (var y = 0; y < BOARD_SIZE; y++) { gameBoard[y] = []; for (var x = 0; x < BOARD_SIZE; x++) { // Randomly assign a type to each tile var types = ['empty', 'forest', 'water', 'mountain']; var randomType = types[Math.floor(Math.random() * types.length)]; gameBoard[y][x] = { entities: [], type: randomType }; } } } // Check if a tile is empty function isTileEmpty(x, y) { if (x < 0 || x >= BOARD_SIZE || y < 0 || y >= BOARD_SIZE) { return false; } // Check for any entities on this tile for (var i = 0; i < playerEntities.length; i++) { if (playerEntities[i].boardX === x && playerEntities[i].boardY === y) { return false; } } for (var i = 0; i < opponentEntities.length; i++) { if (opponentEntities[i].boardX === x && opponentEntities[i].boardY === y) { return false; } } for (var i = 0; i < anomalies.length; i++) { if (anomalies[i].boardX === x && anomalies[i].boardY === y) { return false; } } return true; } // Initialize player team function initPlayerTeam() { for (var i = 0; i < 2; i++) { var player = new Entity(); player.init({ type: 'player', name: 'SCP Agent ' + (i + 1), health: 150, maxHealth: 150, energy: 100, maxEnergy: 100, power: 25, moveRange: 3 }, true); player.boardX = i; player.boardY = 0; player.x = BOARD_OFFSET_X + player.boardX * TILE_SIZE + TILE_SIZE / 2; player.y = BOARD_OFFSET_Y + player.boardY * TILE_SIZE + TILE_SIZE / 2; game.addChild(player); playerTeam.addEntity(player); } } // Initialize opponent team function initOpponents() { for (var i = 0; i < 2; i++) { var opponent = new Entity(); opponent.init({ type: 'opponent', name: 'Chaos Agent ' + (i + 1), health: 120, maxHealth: 120, energy: 100, maxEnergy: 100, power: 20, moveRange: 2 }); opponent.boardX = BOARD_SIZE - 1 - i; opponent.boardY = BOARD_SIZE - 1; opponent.x = BOARD_OFFSET_X + opponent.boardX * TILE_SIZE + TILE_SIZE / 2; opponent.y = BOARD_OFFSET_Y + opponent.boardY * TILE_SIZE + TILE_SIZE / 2; game.addChild(opponent); opponentTeam.addEntity(opponent); } } // Initialize anomalies function initAnomalies() { // Create 4 random SCP entities for (var i = 0; i < 4; i++) { var scpEntity = new Entity(); var scpType = ['safe', 'euclid', 'keter', 'thaumiel'][Math.floor(Math.random() * 4)]; scpEntity.init({ type: scpType, name: 'SCP-' + (Math.floor(Math.random() * 899) + 100), health: Math.floor(Math.random() * 100) + 50, maxHealth: Math.floor(Math.random() * 100) + 50, energy: Math.floor(Math.random() * 50) + 25, maxEnergy: Math.floor(Math.random() * 50) + 25, power: Math.floor(Math.random() * 20) + 10, moveRange: Math.floor(Math.random() * 3) + 1 }); // Find a random empty position for the SCP entity var randomX, randomY; do { randomX = Math.floor(Math.random() * BOARD_SIZE); randomY = Math.floor(Math.random() * BOARD_SIZE); } while (!isTileEmpty(randomX, randomY)); scpEntity.boardX = randomX; scpEntity.boardY = randomY; scpEntity.x = BOARD_OFFSET_X + scpEntity.boardX * TILE_SIZE + TILE_SIZE / 2; scpEntity.y = BOARD_OFFSET_Y + scpEntity.boardY * TILE_SIZE + TILE_SIZE / 2; game.addChild(scpEntity); anomalies.push(scpEntity); } } // Show movement highlights function showMovementHighlights() { if (!selectedEntity) { return; } clearHighlights(); var range = selectedEntity.moveRange; for (var y = 0; y < BOARD_SIZE; y++) { for (var x = 0; x < BOARD_SIZE; x++) { var dx = Math.abs(selectedEntity.boardX - x); var dy = Math.abs(selectedEntity.boardY - y); var dist = Math.max(dx, dy); if (dist <= range) { var highlight = new Highlight(); highlight.setPosition(x, y); game.addChild(highlight); highlights.push(highlight); } } } } // Clear highlights function clearHighlights() { for (var i = 0; i < highlights.length; i++) { highlights[i].destroy(); } highlights = []; } // Select an entity function selectEntity(entity) { // Deselect previous entity if (selectedEntity) { tween(selectedEntity, { scaleX: 1, scaleY: 1 }, { duration: 100, easing: tween.easeOut }); } // Select new entity selectedEntity = entity; if (selectedEntity) { tween(selectedEntity, { scaleX: 1.1, scaleY: 1.1 }, { duration: 100, easing: tween.easeOut }); showMovementHighlights(); } } // Draw a card function drawCard() { if (playerHand.length >= 5 || cardsInDeck <= 0) { return; } cardsInDeck--; drawCardBtn.setText('Draw Card (' + cardsInDeck + ')'); var cardType = cardTypes[Math.floor(Math.random() * cardTypes.length)]; var card = new Card(); card.init(cardType); card.x = 2048 / 2; card.y = 2732 - 150; // Position cards in hand var cardSpacing = 170; var handWidth = (playerHand.length + 1) * cardSpacing; var startX = (2048 - handWidth) / 2 + cardSpacing / 2; card.x = startX + playerHand.length * cardSpacing; game.addChild(card); playerHand.push(card); LK.getSound('cardDraw').play(); } // Use a card function cardSelected(card) { if (gameState !== GAME_STATE.PLAYER_TURN || !selectedEntity || !selectedEntity.isPlayer) { return; } // Apply card effect if (card.cardType === 'ability') { selectedEntity.restoreEnergy(card.power); } else if (card.cardType === 'weapon') { selectedEntity.power += card.power; // Temporary power boost LK.setTimeout(function () { selectedEntity.power -= card.power; }, 5000); } else if (card.cardType === 'equipment') { selectedEntity.heal(card.power); } else if (card.cardType === 'scp') { containAnomaly(selectedEntity); } else if (card.cardType === 'land') { if (card.cardName === 'Island Turtle') { // Check if player is at sea var isAtSea = selectedEntity.boardY > 0; // Example condition for being at sea var turtle = new Entity(); turtle.init({ type: 'turtle', name: 'Island Turtle', health: 50, maxHealth: 50, energy: 0, maxEnergy: 0, power: 0, moveRange: 0 }); turtle.boardX = selectedEntity.boardX; turtle.boardY = selectedEntity.boardY; turtle.x = BOARD_OFFSET_X + turtle.boardX * TILE_SIZE + TILE_SIZE / 2; turtle.y = BOARD_OFFSET_Y + turtle.boardY * TILE_SIZE + TILE_SIZE / 2; game.addChild(turtle); if (!isAtSea) { // Turtle dies from dehydration LK.setTimeout(function () { turtle.die(); }, 2000); // Turtle dies after 2 seconds } } else if (card.cardName === 'Darkness Between Dimensions') { // Move card to the board var boardX = Math.floor(selectedEntity.x / TILE_SIZE); var boardY = Math.floor(selectedEntity.y / TILE_SIZE); if (isTileEmpty(boardX, boardY)) { selectedEntity.moveToPosition(boardX, boardY); // Spawn a machine that transports nearby entities to the Darkness Between Dimensions var machine = new Entity(); machine.init({ type: 'machine', name: 'Dimensional Transporter', health: 100, maxHealth: 100, energy: 0, maxEnergy: 0, power: 0, moveRange: 0 }); machine.boardX = boardX; machine.boardY = boardY; machine.x = BOARD_OFFSET_X + machine.boardX * TILE_SIZE + TILE_SIZE / 2; machine.y = BOARD_OFFSET_Y + machine.boardY * TILE_SIZE + TILE_SIZE / 2; game.addChild(machine); // Transport entities after a random time LK.setTimeout(function () { transportEntitiesToDarkness(machine); }, Math.random() * 5000 + 2000); // Random time between 2 to 7 seconds } } } // Remove card from hand var index = playerHand.indexOf(card); if (index !== -1) { playerHand.splice(index, 1); card.destroy(); // Reorganize hand var cardSpacing = 170; var handWidth = playerHand.length * cardSpacing; var startX = (2048 - handWidth) / 2 + cardSpacing / 2; for (var i = 0; i < playerHand.length; i++) { tween(playerHand[i], { x: startX + i * cardSpacing }, { duration: 300, easing: tween.easeInOut }); } } } // Check for anomaly at position function checkForAnomalyAtPosition(x, y) { for (var i = 0; i < anomalies.length; i++) { if (anomalies[i].boardX === x && anomalies[i].boardY === y) { // Initiate containment var anomaly = anomalies[i]; // Lower health to make containment easier for demo anomaly.takeDamage(40); if (anomaly.health <= 0) { containAnomaly(anomaly); } } } } // Contain an anomaly function containAnomaly(anomaly) { LK.getSound('anomalyContain').play(); var index = anomalies.indexOf(anomaly); if (index !== -1) { anomalies.splice(index, 1); opponentTeam.removeEntity(anomaly); // Increase score score += 100; scoreTxt.setText('Score: ' + score); // Update stored anomaly count storage.containedAnomalies = (storage.containedAnomalies || 0) + 1; // Check if all anomalies are contained if (anomalies.length === 0) { // Win condition LK.setScore(score); if (score > storage.highScore) { storage.highScore = score; } LK.showYouWin(); } } } // End player turn function endPlayerTurn() { if (gameState !== GAME_STATE.PLAYER_TURN) { return; } gameState = GAME_STATE.OPPONENT_TURN; turnTxt.setText('Opponent Turn'); clearHighlights(); selectEntity(null); // Opponent turn timer LK.setTimeout(executeOpponentTurn, 1000); } // Execute opponent turn function executeOpponentTurn() { // Process each opponent for (var i = 0; i < opponentEntities.length; i++) { var opponent = opponentEntities[i]; // Find nearest target (player or anomaly) var target = null; var minDist = 999; // Check player entities for (var j = 0; j < playerEntities.length; j++) { var dx = Math.abs(opponent.boardX - playerEntities[j].boardX); var dy = Math.abs(opponent.boardY - playerEntities[j].boardY); var dist = dx + dy; if (dist < minDist) { minDist = dist; target = playerEntities[j]; } } // Take action based on distance if (target) { if (minDist <= 1) { // Attack if adjacent LK.setTimeout(function (attacker, defender) { return function () { attacker.attack(defender); }; }(opponent, target), 500 * i); } else { // Move toward target var moveX = opponent.boardX; var moveY = opponent.boardY; if (target.boardX > opponent.boardX) { moveX++; } else if (target.boardX < opponent.boardX) { moveX--; } if (target.boardY > opponent.boardY) { moveY++; } else if (target.boardY < opponent.boardY) { moveY--; } // Check if the tile is empty if (isTileEmpty(moveX, moveY)) { LK.setTimeout(function (entity, x, y) { return function () { entity.moveToPosition(x, y); }; }(opponent, moveX, moveY), 500 * i); } } } } // Process each anomaly (simple random movement) for (var i = 0; i < anomalies.length; i++) { var anomaly = anomalies[i]; // Random movement var directions = [{ x: 1, y: 0 }, { x: -1, y: 0 }, { x: 0, y: 1 }, { x: 0, y: -1 }]; var validMoves = []; for (var j = 0; j < directions.length; j++) { var moveX = anomaly.boardX + directions[j].x; var moveY = anomaly.boardY + directions[j].y; if (moveX >= 0 && moveX < BOARD_SIZE && moveY >= 0 && moveY < BOARD_SIZE && isTileEmpty(moveX, moveY)) { validMoves.push({ x: moveX, y: moveY }); } } if (validMoves.length > 0) { var randomMove = validMoves[Math.floor(Math.random() * validMoves.length)]; LK.setTimeout(function (entity, x, y) { return function () { entity.moveToPosition(x, y); }; }(anomaly, randomMove.x, randomMove.y), 1000 + 300 * i); } } // End opponent turn after all moves LK.setTimeout(startPlayerTurn, 2000); } // Start player turn function startPlayerTurn() { gameState = GAME_STATE.PLAYER_TURN; turnTxt.setText('Player Turn'); turnCounter++; if (turnCounter === 4) { spawnSupremeDivineBeings(); } // Spawn a random anomaly each turn in Chaos mode if (selectedGameMode === gameModes.chaos) { var newAnomaly = new Entity(); var anomalyType = ['safe', 'euclid', 'keter', 'thaumiel'][Math.floor(Math.random() * 4)]; newAnomaly.init({ type: anomalyType, name: 'SCP-' + (Math.floor(Math.random() * 899) + 100), health: Math.floor(Math.random() * 100) + 50, maxHealth: Math.floor(Math.random() * 100) + 50, energy: Math.floor(Math.random() * 50) + 25, maxEnergy: Math.floor(Math.random() * 50) + 25, power: Math.floor(Math.random() * 20) + 10, moveRange: Math.floor(Math.random() * 3) + 1 }); var randomX, randomY; do { randomX = Math.floor(Math.random() * BOARD_SIZE); randomY = Math.floor(Math.random() * BOARD_SIZE); } while (!isTileEmpty(randomX, randomY)); newAnomaly.boardX = randomX; newAnomaly.boardY = randomY; newAnomaly.x = BOARD_OFFSET_X + newAnomaly.boardX * TILE_SIZE + TILE_SIZE / 2; newAnomaly.y = BOARD_OFFSET_Y + newAnomaly.boardY * TILE_SIZE + TILE_SIZE / 2; game.addChild(newAnomaly); anomalies.push(newAnomaly); } // Restore energy for player entities for (var i = 0; i < playerEntities.length; i++) { playerEntities[i].restoreEnergy(20); } // Check game state checkGameState(); } // Check game state function checkGameState() { // Check if player is defeated if (playerTeam.isDefeated()) { LK.setScore(score); LK.showGameOver(); return; } if (opponentTeam.isDefeated()) { score += 500; scoreTxt.setText('Score: ' + score); LK.setScore(score); if (score > storage.highScore) { storage.highScore = score; } LK.showYouWin(); return; } // Check if maximum turns reached if (turnCounter >= 30) { LK.setScore(score); if (score > storage.highScore) { storage.highScore = score; } LK.showGameOver(); return; } } // Increase player power for Chaos mode function increasePlayerPower() { for (var i = 0; i < playerEntities.length; i++) { playerEntities[i].power += 10; // Increase power by 10 } } // Initialize game function initGame() { // Clear everything clearHighlights(); playerTeam = new Team("Player Team", true); opponentTeam = new Team("Opponent Team", false); for (var i = 0; i < playerTeam.entities.length; i++) { playerTeam.entities[i].destroy(); } playerTeam.entities = []; for (var i = 0; i < opponentTeam.entities.length; i++) { opponentTeam.entities[i].destroy(); } opponentTeam.entities = []; for (var i = 0; i < anomalies.length; i++) { anomalies[i].destroy(); } anomalies = []; for (var i = 0; i < playerHand.length; i++) { playerHand[i].destroy(); } playerHand = []; // Setup variables score = 0; scoreTxt.setText('Score: ' + score); turnCounter = 0; gameState = GAME_STATE.SETUP; selectedEntity = null; cardsInDeck = 20; drawCardBtn.setText('Draw Card (' + cardsInDeck + ')'); // Initialize game elements initBoard(); // Function to change the game mode function changeGameMode(mode) { if (gameModes[mode]) { selectedGameMode = gameModes[mode]; selectedGameMode.init(); } else { console.error("Invalid game mode selected"); } } // Define selectedGameMode in the global scope var selectedGameMode; // Select a random game mode var gameModeKeys = Object.keys(gameModes); var randomModeKey = gameModeKeys[Math.floor(Math.random() * gameModeKeys.length)]; selectedGameMode = gameModes[randomModeKey]; selectedGameMode.init(); // Start game gameState = GAME_STATE.PLAYER_TURN; turnTxt.setText('Player Turn'); // Draw initial cards for (var i = 0; i < 3; i++) { drawCard(); } // Play background music LK.playMusic('bgmusic', { loop: true }); } // Game navigation game.down = function (x, y, obj) { // Empty handler for board clicks not handled by entities }; game.move = function (x, y, obj) { // Empty handler for mouse movement }; // Main game loop game.update = function () { // Initialize game if we're in setup if (gameState === GAME_STATE.SETUP) { initGame(); } }; // Start the game initGame();
===================================================================
--- original.js
+++ change.js
@@ -67,9 +67,9 @@
anchorY: 0.5
});
var cardBackgrounds = ['cardBack', 'cardFront', 'board', 'button'];
var randomBackground = cardBackgrounds[Math.floor(Math.random() * cardBackgrounds.length)];
- self.front = self.attachAsset(self.cardName.toLowerCase(), {
+ self.front = self.attachAsset(self.cardName.replace(/\s+/g, '').toLowerCase(), {
anchorX: 0.5,
anchorY: 0.5,
alpha: 0
});
Healthbar. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Player. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Opponent. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
EnergyBar. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Board. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Anomaly. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Button. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
animal. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
SCP. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
SCP card. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
anomalyneutralizer card. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
containmentfield card. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
cardFront. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
barBackground. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
darknessbetweendimensions. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
manual. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
moneyCounterDisplay. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Wondertainment product. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
EndTurnButton. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
randomscp. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Attack. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Containment. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
White Card called “Panacea” which was used to heal. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
modified Colt AR-15. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
giant flaming angel's sword. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
hidden golden anomaly. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Orangutan. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows