User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'count')' in or related to this line: 'storage.collection[self.id].count++;' Line Number: 216 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Error: Invalid value. Only literals or 1-level deep objects/arrays containing literals are allowed.' in or related to this line: 'storage.collection[self.id] = {};' Line Number: 211
User prompt
Please fix the bug: 'Error: Invalid value. Only literals or 1-level deep objects/arrays containing literals are allowed.' in or related to this line: 'storage.collection[self.id] = {' Line Number: 211
User prompt
Please fix the bug: 'TypeError: storage.set is not a function' in or related to this line: 'storage.set("collection." + self.id + ".rarity", self.rarity);' Line Number: 211
User prompt
Please fix the bug: 'Error: Invalid value. Only literals or 1-level deep objects/arrays containing literals are allowed.' in or related to this line: 'storage.collection[self.id] = {};' Line Number: 211
User prompt
Please fix the bug: 'Error: Invalid value. Only literals or 1-level deep objects/arrays containing literals are allowed.' in or related to this line: 'storage.collection[self.id] = cardData;' Line Number: 217
User prompt
Please fix the bug: 'Error: Invalid value. Only literals or 1-level deep objects/arrays containing literals are allowed.' in or related to this line: 'storage.collection[self.id] = {' Line Number: 210 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
Code edit (1 edits merged)
Please save this source code
User prompt
Animalmon: Pocket Menagerie
Initial prompt
Animalmon: Trading cards; a game where you open packs to gain all of the animalmons! They are sorted in rarities: Common, Uncommon, Rare, Unique, Epic, Legendary and Exotic. There are also 5 types of packs: common pack, Big pack, Rare pack, Magic pack and Legendary pack
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1", {
collection: {},
stats: {
totalCards: 0,
common: 0,
uncommon: 0,
rare: 0,
unique: 0,
epic: 0,
legendary: 0,
exotic: 0
}
});
/****
* Classes
****/
var Button = Container.expand(function (text, width, height, color) {
var self = Container.call(this);
var background = self.attachAsset('cardButton', {
anchorX: 0.5,
anchorY: 0.5,
width: width || 300,
height: height || 100
});
var label = new Text2(text, {
size: 40,
fill: 0xFFFFFF
});
label.anchor.set(0.5, 0.5);
self.addChild(label);
self.down = function () {
tween(self.scale, {
x: 0.95,
y: 0.95
}, {
duration: 100
});
};
self.up = function () {
tween(self.scale, {
x: 1,
y: 1
}, {
duration: 100
});
};
return self;
});
var Card = Container.expand(function (rarity, id, name, type) {
var self = Container.call(this);
self.rarity = rarity;
self.id = id;
self.name = name;
self.type = type;
self.revealed = false;
// Card back initially shown
var cardBack = self.attachAsset('cardBack', {
anchorX: 0.5,
anchorY: 0.5
});
// The actual card (initially hidden)
var cardFront;
switch (rarity) {
case 'common':
cardFront = self.attachAsset('commonCard', {
anchorX: 0.5,
anchorY: 0.5,
visible: false
});
break;
case 'uncommon':
cardFront = self.attachAsset('uncommonCard', {
anchorX: 0.5,
anchorY: 0.5,
visible: false
});
break;
case 'rare':
cardFront = self.attachAsset('rareCard', {
anchorX: 0.5,
anchorY: 0.5,
visible: false
});
break;
case 'unique':
cardFront = self.attachAsset('uniqueCard', {
anchorX: 0.5,
anchorY: 0.5,
visible: false
});
break;
case 'epic':
cardFront = self.attachAsset('epicCard', {
anchorX: 0.5,
anchorY: 0.5,
visible: false
});
break;
case 'legendary':
cardFront = self.attachAsset('legendaryCard', {
anchorX: 0.5,
anchorY: 0.5,
visible: false
});
break;
case 'exotic':
cardFront = self.attachAsset('exoticCard', {
anchorX: 0.5,
anchorY: 0.5,
visible: false
});
break;
}
// Card icon
var icon = self.attachAsset('cardIcon', {
anchorX: 0.5,
anchorY: 0.5,
y: -150,
visible: false
});
// Card text
var nameText = new Text2(name, {
size: 50,
fill: 0xFFFFFF
});
nameText.anchor.set(0.5, 0);
nameText.y = 50;
nameText.visible = false;
self.addChild(nameText);
var typeText = new Text2(type, {
size: 40,
fill: 0xFFFFFF
});
typeText.anchor.set(0.5, 0);
typeText.y = 120;
typeText.visible = false;
self.addChild(typeText);
var rarityText = new Text2(rarity.toUpperCase(), {
size: 35,
fill: 0xFFFFFF
});
rarityText.anchor.set(0.5, 1);
rarityText.y = 300;
rarityText.visible = false;
self.addChild(rarityText);
// Reveal the card
self.reveal = function () {
if (self.revealed) return;
self.revealed = true;
LK.getSound('cardFlip').play();
// Play special sounds for rare cards
if (rarity === 'epic' || rarity === 'legendary' || rarity === 'exotic') {
LK.getSound('epicDrop').play();
} else if (rarity === 'rare' || rarity === 'unique') {
LK.getSound('rareDrop').play();
}
// Flip animation
tween(cardBack.scale, {
x: 0
}, {
duration: 200,
onFinish: function onFinish() {
cardBack.visible = false;
cardFront.visible = true;
icon.visible = true;
nameText.visible = true;
typeText.visible = true;
rarityText.visible = true;
tween(cardFront.scale, {
x: 1
}, {
duration: 200,
easing: tween.easeOut,
onFinish: function onFinish() {
// Add card to collection
if (!storage.collection[self.id]) {
// Initialize collection entry with primitive values separately
storage.collection[self.id] = {};
storage.collection[self.id].rarity = self.rarity;
storage.collection[self.id].name = self.name;
storage.collection[self.id].type = self.type;
storage.collection[self.id].count = 0;
}
storage.collection[self.id].count++;
storage.stats.totalCards++;
storage.stats[self.rarity]++;
}
});
cardFront.scale.x = 0;
}
});
};
self.down = function () {
self.reveal();
};
return self;
});
var Pack = Container.expand(function (type) {
var self = Container.call(this);
self.type = type;
self.opened = false;
// Pack artwork based on type
var packArt;
switch (type) {
case 'common':
packArt = self.attachAsset('packCommon', {
anchorX: 0.5,
anchorY: 0.5
});
break;
case 'big':
packArt = self.attachAsset('packBig', {
anchorX: 0.5,
anchorY: 0.5
});
break;
case 'rare':
packArt = self.attachAsset('packRare', {
anchorX: 0.5,
anchorY: 0.5
});
break;
case 'magic':
packArt = self.attachAsset('packMagic', {
anchorX: 0.5,
anchorY: 0.5
});
break;
case 'legendary':
packArt = self.attachAsset('packLegendary', {
anchorX: 0.5,
anchorY: 0.5
});
break;
}
// Pack type text
var typeText = new Text2(type.toUpperCase() + " PACK", {
size: 40,
fill: 0xFFFFFF
});
typeText.anchor.set(0.5, 0.5);
self.addChild(typeText);
self.down = function () {
if (!currentlyOpeningPack && !self.opened) {
self.openPack();
}
};
self.openPack = function () {
if (self.opened || currentlyOpeningPack) return;
currentlyOpeningPack = true;
LK.getSound('packOpen').play();
// Hide all packs
for (var i = 0; i < packDisplays.length; i++) {
if (packDisplays[i] !== self) {
tween(packDisplays[i], {
alpha: 0
}, {
duration: 300
});
}
}
// Move to center and fade out
tween(self, {
y: 2732 / 2 - 200,
scale: 1.5
}, {
duration: 500,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(self, {
alpha: 0
}, {
duration: 300,
onFinish: function onFinish() {
self.visible = false;
// Generate cards based on pack type
var cards = generateCardsFromPack(self.type);
// Display cards
for (var i = 0; i < cards.length; i++) {
var card = cards[i];
card.x = 2048 / 2 + (i - (cards.length - 1) / 2) * 550;
card.y = 2732 / 2;
card.scale.set(0.7);
game.addChild(card);
displayedCards.push(card);
// Animate card entry
card.y = 2732 + 400;
tween(card, {
y: 2732 / 2
}, {
duration: 500,
easing: tween.easeOut
});
}
// Show return button
showReturnButton();
}
});
}
});
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x1a1a2e
});
/****
* Game Code
****/
// Game state variables
var currentScreen = 'home'; // 'home', 'packs', 'collection'
var currentlyOpeningPack = false;
var packDisplays = [];
var displayedCards = [];
var screenElements = [];
// Game constants
var CARD_DATABASE = [
// Common cards (id, name, type)
{
id: 'c1',
rarity: 'common',
name: 'Mousling',
type: 'Rodent'
}, {
id: 'c2',
rarity: 'common',
name: 'Sparrowling',
type: 'Avian'
}, {
id: 'c3',
rarity: 'common',
name: 'Tadpoleon',
type: 'Amphibian'
}, {
id: 'c4',
rarity: 'common',
name: 'Antoid',
type: 'Insect'
}, {
id: 'c5',
rarity: 'common',
name: 'Minnowfin',
type: 'Aquatic'
}, {
id: 'c6',
rarity: 'common',
name: 'Rabbiter',
type: 'Mammal'
}, {
id: 'c7',
rarity: 'common',
name: 'Squirrelnut',
type: 'Rodent'
}, {
id: 'c8',
rarity: 'common',
name: 'Pigster',
type: 'Mammal'
},
// Uncommon cards
{
id: 'u1',
rarity: 'uncommon',
name: 'Foxferno',
type: 'Mammal'
}, {
id: 'u2',
rarity: 'uncommon',
name: 'Owlsight',
type: 'Avian'
}, {
id: 'u3',
rarity: 'uncommon',
name: 'Frogazoid',
type: 'Amphibian'
}, {
id: 'u4',
rarity: 'uncommon',
name: 'Snakevine',
type: 'Reptile'
}, {
id: 'u5',
rarity: 'uncommon',
name: 'Beetledome',
type: 'Insect'
},
// Rare cards
{
id: 'r1',
rarity: 'rare',
name: 'Wolfshade',
type: 'Mammal'
}, {
id: 'r2',
rarity: 'rare',
name: 'Eaglestorm',
type: 'Avian'
}, {
id: 'r3',
rarity: 'rare',
name: 'Sharkfin',
type: 'Aquatic'
},
// Unique cards
{
id: 'q1',
rarity: 'unique',
name: 'Bearquake',
type: 'Mammal'
}, {
id: 'q2',
rarity: 'unique',
name: 'Tigerpulse',
type: 'Feline'
},
// Epic cards
{
id: 'e1',
rarity: 'epic',
name: 'Gorillaxe',
type: 'Primate'
}, {
id: 'e2',
rarity: 'epic',
name: 'Crocostone',
type: 'Reptile'
},
// Legendary cards
{
id: 'l1',
rarity: 'legendary',
name: 'Dragonate',
type: 'Mythic'
}, {
id: 'l2',
rarity: 'legendary',
name: 'Phoenixflare',
type: 'Mythic'
},
// Exotic card
{
id: 'x1',
rarity: 'exotic',
name: 'Unicornova',
type: 'Mythic'
}];
// Play background music
LK.playMusic('bgMusic');
// Initialize stats text
var statsText = new Text2("Collection: 0 cards", {
size: 50,
fill: 0xFFFFFF
});
statsText.anchor.set(0.5, 0);
statsText.y = 100;
LK.gui.top.addChild(statsText);
updateStatsDisplay();
// Setup the home screen
showHomeScreen();
// Show home screen with main menu
function showHomeScreen() {
clearScreen();
currentScreen = 'home';
var title = new Text2("ANIMALMON", {
size: 120,
fill: 0xFFFFFF
});
title.anchor.set(0.5, 0);
title.x = 2048 / 2;
title.y = 300;
game.addChild(title);
screenElements.push(title);
var subtitle = new Text2("Pocket Menagerie", {
size: 80,
fill: 0xFFFFFF
});
subtitle.anchor.set(0.5, 0);
subtitle.x = 2048 / 2;
subtitle.y = 450;
game.addChild(subtitle);
screenElements.push(subtitle);
var packButton = new Button("OPEN PACKS", 400, 120);
packButton.x = 2048 / 2;
packButton.y = 1200;
game.addChild(packButton);
screenElements.push(packButton);
packButton.down = function () {
tween(packButton.scale, {
x: 0.95,
y: 0.95
}, {
duration: 100
});
};
packButton.up = function () {
tween(packButton.scale, {
x: 1,
y: 1
}, {
duration: 100,
onFinish: function onFinish() {
showPacksScreen();
}
});
};
var collectionButton = new Button("COLLECTION", 400, 120);
collectionButton.x = 2048 / 2;
collectionButton.y = 1400;
game.addChild(collectionButton);
screenElements.push(collectionButton);
collectionButton.down = function () {
tween(collectionButton.scale, {
x: 0.95,
y: 0.95
}, {
duration: 100
});
};
collectionButton.up = function () {
tween(collectionButton.scale, {
x: 1,
y: 1
}, {
duration: 100,
onFinish: function onFinish() {
showCollectionScreen();
}
});
};
updateStatsDisplay();
}
// Show packs selection screen
function showPacksScreen() {
clearScreen();
currentScreen = 'packs';
var title = new Text2("SELECT A PACK", {
size: 80,
fill: 0xFFFFFF
});
title.anchor.set(0.5, 0);
title.x = 2048 / 2;
title.y = 200;
game.addChild(title);
screenElements.push(title);
// Common Pack
var commonPack = new Pack('common');
commonPack.x = 2048 / 2 - 700;
commonPack.y = 800;
game.addChild(commonPack);
packDisplays.push(commonPack);
screenElements.push(commonPack);
var commonText = new Text2("3 Cards\n1-2 Common\n1 Chance for Uncommon", {
size: 30,
fill: 0xFFFFFF
});
commonText.anchor.set(0.5, 0);
commonText.x = commonPack.x;
commonText.y = commonPack.y + 250;
game.addChild(commonText);
screenElements.push(commonText);
// Big Pack
var bigPack = new Pack('big');
bigPack.x = 2048 / 2 - 350;
bigPack.y = 800;
game.addChild(bigPack);
packDisplays.push(bigPack);
screenElements.push(bigPack);
var bigText = new Text2("4 Cards\n2-3 Common\n1-2 Uncommon\nSmall Chance for Rare", {
size: 30,
fill: 0xFFFFFF
});
bigText.anchor.set(0.5, 0);
bigText.x = bigPack.x;
bigText.y = bigPack.y + 250;
game.addChild(bigText);
screenElements.push(bigText);
// Rare Pack
var rarePack = new Pack('rare');
rarePack.x = 2048 / 2;
rarePack.y = 800;
game.addChild(rarePack);
packDisplays.push(rarePack);
screenElements.push(rarePack);
var rareText = new Text2("4 Cards\n1-2 Uncommon\n1-2 Rare\nChance for Unique", {
size: 30,
fill: 0xFFFFFF
});
rareText.anchor.set(0.5, 0);
rareText.x = rarePack.x;
rareText.y = rarePack.y + 250;
game.addChild(rareText);
screenElements.push(rareText);
// Magic Pack
var magicPack = new Pack('magic');
magicPack.x = 2048 / 2 + 350;
magicPack.y = 800;
game.addChild(magicPack);
packDisplays.push(magicPack);
screenElements.push(magicPack);
var magicText = new Text2("5 Cards\n1-2 Rare\n1-2 Unique\nChance for Epic", {
size: 30,
fill: 0xFFFFFF
});
magicText.anchor.set(0.5, 0);
magicText.x = magicPack.x;
magicText.y = magicPack.y + 250;
game.addChild(magicText);
screenElements.push(magicText);
// Legendary Pack
var legendaryPack = new Pack('legendary');
legendaryPack.x = 2048 / 2 + 700;
legendaryPack.y = 800;
game.addChild(legendaryPack);
packDisplays.push(legendaryPack);
screenElements.push(legendaryPack);
var legendaryText = new Text2("5 Cards\n1-2 Unique\n1-2 Epic\nChance for Legendary\nRare Chance for Exotic", {
size: 30,
fill: 0xFFFFFF
});
legendaryText.anchor.set(0.5, 0);
legendaryText.x = legendaryPack.x;
legendaryText.y = legendaryPack.y + 250;
game.addChild(legendaryText);
screenElements.push(legendaryText);
// Back button
var backButton = new Button("BACK", 200, 80);
backButton.x = 200;
backButton.y = 200;
game.addChild(backButton);
screenElements.push(backButton);
backButton.down = function () {
tween(backButton.scale, {
x: 0.95,
y: 0.95
}, {
duration: 100
});
};
backButton.up = function () {
tween(backButton.scale, {
x: 1,
y: 1
}, {
duration: 100,
onFinish: function onFinish() {
showHomeScreen();
}
});
};
}
// Show return button after opening pack
function showReturnButton() {
var returnButton = new Button("RETURN", 300, 100);
returnButton.x = 2048 / 2;
returnButton.y = 2732 - 200;
game.addChild(returnButton);
screenElements.push(returnButton);
returnButton.down = function () {
tween(returnButton.scale, {
x: 0.95,
y: 0.95
}, {
duration: 100
});
};
returnButton.up = function () {
tween(returnButton.scale, {
x: 1,
y: 1
}, {
duration: 100,
onFinish: function onFinish() {
// Clear displayed cards
for (var i = 0; i < displayedCards.length; i++) {
displayedCards[i].destroy();
}
displayedCards = [];
// Return to packs screen
currentlyOpeningPack = false;
showPacksScreen();
updateStatsDisplay();
}
});
};
}
// Show collection screen
function showCollectionScreen() {
clearScreen();
currentScreen = 'collection';
var title = new Text2("YOUR COLLECTION", {
size: 80,
fill: 0xFFFFFF
});
title.anchor.set(0.5, 0);
title.x = 2048 / 2;
title.y = 200;
game.addChild(title);
screenElements.push(title);
// Collection stats
var collectionStats = new Text2("Total Cards: " + storage.stats.totalCards + "\n\n" + "Common: " + storage.stats.common + "\n" + "Uncommon: " + storage.stats.uncommon + "\n" + "Rare: " + storage.stats.rare + "\n" + "Unique: " + storage.stats.unique + "\n" + "Epic: " + storage.stats.epic + "\n" + "Legendary: " + storage.stats.legendary + "\n" + "Exotic: " + storage.stats.exotic, {
size: 50,
fill: 0xFFFFFF
});
collectionStats.anchor.set(0.5, 0);
collectionStats.x = 2048 / 2;
collectionStats.y = 400;
game.addChild(collectionStats);
screenElements.push(collectionStats);
// Display recently acquired cards (up to 3)
var recentText = new Text2("RECENT ACQUISITIONS:", {
size: 50,
fill: 0xFFFFFF
});
recentText.anchor.set(0.5, 0);
recentText.x = 2048 / 2;
recentText.y = 1000;
game.addChild(recentText);
screenElements.push(recentText);
// Get recent cards
var cardIds = Object.keys(storage.collection);
var recentCards = [];
// Sort by count (higher count means they were collected more recently)
cardIds.sort(function (a, b) {
return storage.collection[b].count - storage.collection[a].count;
});
// Display up to 3 recent cards
var displayCount = Math.min(3, cardIds.length);
for (var i = 0; i < displayCount; i++) {
var cardInfo = storage.collection[cardIds[i]];
var card = new Card(cardInfo.rarity, cardIds[i], cardInfo.name, cardInfo.type);
card.x = 2048 / 2 + (i - (displayCount - 1) / 2) * 550;
card.y = 1400;
card.scale.set(0.6);
card.reveal(); // Already revealed
game.addChild(card);
screenElements.push(card);
}
// Back button
var backButton = new Button("BACK", 200, 80);
backButton.x = 200;
backButton.y = 200;
game.addChild(backButton);
screenElements.push(backButton);
backButton.down = function () {
tween(backButton.scale, {
x: 0.95,
y: 0.95
}, {
duration: 100
});
};
backButton.up = function () {
tween(backButton.scale, {
x: 1,
y: 1
}, {
duration: 100,
onFinish: function onFinish() {
showHomeScreen();
}
});
};
}
// Generate cards based on pack type
function generateCardsFromPack(packType) {
var cards = [];
var rarityPool = [];
switch (packType) {
case 'common':
// 3 cards: 1-2 Common, chance for Uncommon
for (var i = 0; i < 3; i++) {
if (i < 2) {
rarityPool.push('common');
} else {
rarityPool.push(Math.random() < 0.3 ? 'uncommon' : 'common');
}
}
break;
case 'big':
// 4 cards: 2-3 Common, 1-2 Uncommon, small chance for Rare
for (var i = 0; i < 4; i++) {
if (i < 2) {
rarityPool.push('common');
} else if (i == 2) {
rarityPool.push(Math.random() < 0.7 ? 'uncommon' : 'common');
} else {
var roll = Math.random();
if (roll < 0.1) {
rarityPool.push('rare');
} else if (roll < 0.6) {
rarityPool.push('uncommon');
} else {
rarityPool.push('common');
}
}
}
break;
case 'rare':
// 4 cards: 1-2 Uncommon, 1-2 Rare, chance for Unique
for (var i = 0; i < 4; i++) {
if (i < 1) {
rarityPool.push('uncommon');
} else if (i < 3) {
rarityPool.push(Math.random() < 0.6 ? 'rare' : 'uncommon');
} else {
var roll = Math.random();
if (roll < 0.15) {
rarityPool.push('unique');
} else if (roll < 0.6) {
rarityPool.push('rare');
} else {
rarityPool.push('uncommon');
}
}
}
break;
case 'magic':
// 5 cards: 1-2 Rare, 1-2 Unique, chance for Epic
for (var i = 0; i < 5; i++) {
if (i < 1) {
rarityPool.push('rare');
} else if (i < 3) {
rarityPool.push(Math.random() < 0.6 ? 'unique' : 'rare');
} else if (i < 4) {
rarityPool.push(Math.random() < 0.7 ? 'unique' : 'rare');
} else {
var roll = Math.random();
if (roll < 0.2) {
rarityPool.push('epic');
} else if (roll < 0.6) {
rarityPool.push('unique');
} else {
rarityPool.push('rare');
}
}
}
break;
case 'legendary':
// 5 cards: 1-2 Unique, 1-2 Epic, chance for Legendary, rare chance for Exotic
for (var i = 0; i < 5; i++) {
if (i < 1) {
rarityPool.push('unique');
} else if (i < 3) {
rarityPool.push(Math.random() < 0.6 ? 'epic' : 'unique');
} else if (i < 4) {
var roll = Math.random();
if (roll < 0.2) {
rarityPool.push('legendary');
} else if (roll < 0.6) {
rarityPool.push('epic');
} else {
rarityPool.push('unique');
}
} else {
var roll = Math.random();
if (roll < 0.02) {
rarityPool.push('exotic');
} else if (roll < 0.15) {
rarityPool.push('legendary');
} else if (roll < 0.5) {
rarityPool.push('epic');
} else {
rarityPool.push('unique');
}
}
}
break;
}
// Create cards based on rarity pool
for (var i = 0; i < rarityPool.length; i++) {
var rarity = rarityPool[i];
var possibleCards = CARD_DATABASE.filter(function (card) {
return card.rarity === rarity;
});
if (possibleCards.length > 0) {
var selectedCard = possibleCards[Math.floor(Math.random() * possibleCards.length)];
cards.push(new Card(selectedCard.rarity, selectedCard.id, selectedCard.name, selectedCard.type));
}
}
return cards;
}
// Clear current screen elements
function clearScreen() {
for (var i = 0; i < screenElements.length; i++) {
screenElements[i].destroy();
}
screenElements = [];
packDisplays = [];
}
// Update stats display
function updateStatsDisplay() {
var totalCards = storage.stats.totalCards || 0;
statsText.setText("Collection: " + totalCards + " cards");
}
// Update function called by the game engine
game.update = function () {
// Game logic updates (if needed)
};
// Event handling
game.move = function (x, y, obj) {
// Mouse/touch move handling
};
game.down = function (x, y, obj) {
// Mouse/touch down handling
};
game.up = function (x, y, obj) {
// Mouse/touch up handling
}; ===================================================================
--- original.js
+++ change.js
@@ -178,15 +178,14 @@
easing: tween.easeOut,
onFinish: function onFinish() {
// Add card to collection
if (!storage.collection[self.id]) {
- // Initialize collection entry with primitive values
- storage.collection[self.id] = {
- rarity: self.rarity,
- name: self.name,
- type: self.type,
- count: 0
- };
+ // Initialize collection entry with primitive values separately
+ storage.collection[self.id] = {};
+ storage.collection[self.id].rarity = self.rarity;
+ storage.collection[self.id].name = self.name;
+ storage.collection[self.id].type = self.type;
+ storage.collection[self.id].count = 0;
}
storage.collection[self.id].count++;
storage.stats.totalCards++;
storage.stats[self.rarity]++;
Light gray card packet with a hare in the center. In-Game asset. 2d. High contrast. No shadows
Green card packet with a Salamander in the center. In-Game asset. 2d. High contrast. No shadows
Orange card packet with a Rhino in the center. In-Game asset. 2d. High contrast. No shadows
Purple card packet with a Crocodile in the center. In-Game asset. 2d. High contrast. No shadows
Dark red card packet with a Whale in the center. In-Game asset. 2d. High contrast. No shadows
Rabbit. In-Game asset. 2d. High contrast. No shadows
Orange salamander. In-Game asset. 2d. High contrast. No shadows
Ant. In-Game asset. 2d. High contrast. No shadows
Pidgeon. In-Game asset. 2d. High contrast. No shadows
Pig. In-Game asset. 2d. High contrast. No shadows
Frog. In-Game asset. 2d. High contrast. No shadows
Rat. In-Game asset. 2d. High contrast. No shadows
Squirrel. In-Game asset. 2d. High contrast. No shadows
Salmon. In-Game asset. 2d. High contrast. No shadows
Fox. In-Game asset. 2d. High contrast. No shadows
Owl. In-Game asset. 2d. High contrast. No shadows
Silverback gorilla. In-Game asset. 2d. High contrast. No shadows
Ostrich. In-Game asset. 2d. High contrast. No shadows
Wolf. In-Game asset. 2d. High contrast. No shadows
Bear. In-Game asset. 2d. High contrast. No shadows
Hammerhead shark. In-Game asset. 2d. High contrast. No shadows
Lion. In-Game asset. 2d. High contrast. No shadows
Aggressive hippo. In-Game asset. 2d. High contrast. No shadows
Sperm whale. In-Game asset. 2d. High contrast. No shadows
Crocodile. In-Game asset. 2d. High contrast. No shadows
Lizard. In-Game asset. 2d. High contrast. No shadows
Dung beetle. In-Game asset. 2d. High contrast. No shadows
Duck. In-Game asset. 2d. High contrast. No shadows
Ankylosaurus. In-Game asset. 2d. High contrast. No shadows
Diplodocus. In-Game asset. 2d. High contrast. No shadows
Parasaur. In-Game asset. 2d. High contrast. No shadows
Pterodactyl. In-Game asset. 2d. High contrast. No shadows
A Yellow card pack with a T-TEX in the center
Spinosaurus. In-Game asset. 2d. High contrast. No shadows
Stegosaurus. In-Game asset. 2d. High contrast. No shadows
T-REX. In-Game asset. 2d. High contrast. No shadows
Triceratops. In-Game asset. 2d. High contrast. No shadows
Raptor. In-Game asset. 2d. High contrast. No shadows
White card packet with a "?" Sign in the middle. In-Game asset. 2d. High contrast. No shadows
Cat. In-Game asset. 2d. High contrast. No shadows
Cheetah. In-Game asset. 2d. High contrast. No shadows
Penguin. In-Game asset. 2d. High contrast. No shadows
Cobra. In-Game asset. 2d. High contrast. No shadows
Snake. In-Game asset. 2d. High contrast. No shadows
Rhino. In-Game asset. 2d. High contrast. No shadows
Card packet made out of stone with a Tribal drawing of people Hunting a wolly Mammoth. In-Game asset. 2d. High contrast. No shadows
Mammoth. In-Game asset. 2d. High contrast. No shadows
Dodo. In-Game asset. 2d. High contrast. No shadows
Megalodon. In-Game asset. 2d. High contrast. No shadows
Sabertooth tiger. In-Game asset. 2d. High contrast. No shadows
Wooly Rhino. In-Game asset. 2d. High contrast. No shadows
Giant bat. In-Game asset. 2d. High contrast. No shadows
Moose. In-Game asset. 2d. High contrast. No shadows
Wasp. In-Game asset. 2d. High contrast. No shadows
Seal. In-Game asset. 2d. High contrast. No shadows
Eagle. In-Game asset. 2d. High contrast. No shadows
Make the outlines on my character a dark black
Elephant. In-Game asset. 2d. High contrast. No shadows
Gem. In-Game asset. 2d. High contrast. No shadows
Remove the background
Remove the background
RE.MO.VE. THE. BACKGROUND!
Remove the background
Remove the baccground
Remove the background
Remov the bagroud