Artifact

D&D Artifact. Creator

In the depths of ancient ruins and forgotten tombs, legendary artifacts lie waiting to be discovered. With the Artifact Generator on ChatDnD, you can randomly generate unique and powerful artifacts for your next adventure. Choose from a wide range of categories and let fate decide your fate. Will you find a weapon of incredible power, a relic of the gods, or an ancient tome of forbidden knowledge? The possibilities are endless with ChatDnD’s Artifact Generator.

`); iframeDoc.close(); iframe.contentWindow.focus(); iframe.contentWindow.print(); setTimeout(() => document.body.removeChild(iframe), 1000); });shareBtn.addEventListener('click', async () => { const text = document.getElementById('npc-container').innerText;if (navigator.share) { try { await navigator.share({ title: 'NPC Details', text: text }); console.log('NPC shared successfully.'); } catch (err) { console.error('Share failed:', err); alert('Failed to share. Please try again.'); } } else { try { await navigator.clipboard.writeText(text); alert('NPC details copied to clipboard.'); } catch (err) { console.error('Clipboard copy failed:', err); alert('Failed to copy. Please try again.'); } } });let isFavorite = false; favoriteBtn.addEventListener('click', () => { isFavorite = !isFavorite; favoriteBtn.textContent = isFavorite ? '⭐ Favorited' : '⭐ Favorite'; favoriteBtn.style.backgroundColor = isFavorite ? '#f0ad4e' : ''; });window.onclick = (event) => { if (event.target === modal) modal.style.display = 'none'; };document.addEventListener('keydown', (e) => { if (e.key === 'Escape') modal.style.display = 'none'; }); }