From 1d02cba9556d21fa94850dade3b55a0aacae06bf Mon Sep 17 00:00:00 2001 From: onsetsu Date: Thu, 19 Sep 2024 12:35:52 +0200 Subject: [PATCH 1/3] italic styling SQUASHED: AUTO-COMMIT-src-components-widgets-ubg-card.js, --- src/components/widgets/ubg-card.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/components/widgets/ubg-card.js b/src/components/widgets/ubg-card.js index 7818c5b9a..58bc19f86 100644 --- a/src/components/widgets/ubg-card.js +++ b/src/components/widgets/ubg-card.js @@ -611,6 +611,9 @@ ${SVG.elementSymbol(others[2], lively.pt(12.5, 8.5), 1.5)}`, lively.rect(0, 0, 1 printedRules = printedRules.replace(/!!(.*?)!!/gmi, function replacer(match, content) { return `${content}`; }); + printedRules = printedRules.replace(/\*(.*?)\*/gmi, (match, content) => { + return this.italic(content); + }); printedRules = this.parseEffectsAndLists(printedRules); @@ -717,11 +720,11 @@ ${SVG.elementSymbol(others[2], lively.pt(12.5, 8.5), 1.5)}`, lively.rect(0, 0, 1 }) } + static italic(text) { + return `${text}` + } + static renderReminderText(printedRules, cardEditor, cardDesc) { - function italic(text) { - return `${text}` - } - return printedRules.replace(/\bremind(?:er)?(\w+(?:\-(\w|\(|\))*)*)\b/gmi, (match, myMatch, offset, string, groups) => { const keywords = { actionquest: () => { @@ -853,15 +856,15 @@ ${SVG.elementSymbol(others[2], lively.pt(12.5, 8.5), 1.5)}`, lively.rect(0, 0, 1 emerge: (...args) => { if (args.includes('all')) { // keyword granted - return 'When you buy a card, you may trash a card for a discount equal to its cost.' + return 'When you buy a card: You may sacrifice a card for a discount equal to its cost.' } if (args.includes('one')) { // keyword granted - return 'When you buy the card, you may trash a card for a discount equal to its cost.' + return 'When you buy the card: You may sacrifice a card for a discount equal to its cost.' } - return 'When you buy this, you may trash a card for a discount equal to its cost.' + return 'When you buy this: You may sacrifice a card for a discount equal to its cost.' }, evoke: (cost, who) => { @@ -882,7 +885,7 @@ ${SVG.elementSymbol(others[2], lively.pt(12.5, 8.5), 1.5)}`, lively.rect(0, 0, 1 if (who === 'one') { subject = 'the card'; } - return `Passive As a free action, you may trash ${subject} to exec its blitz effects.` + return `gear Trash ${subject} to exec its blitz effects.` }, impulse: () => { @@ -967,7 +970,7 @@ ${SVG.elementSymbol(others[2], lively.pt(12.5, 8.5), 1.5)}`, lively.rect(0, 0, 1 }, seek: (...args) => { - return 'Reveal cards from any pile until you reveal the appropriate card(s), return the others to the game box.' + return 'Reveal cards from deck until you reveal the appropriate card(s), return the others to the game box.' }, stuncounter: (...args) => { @@ -1015,7 +1018,7 @@ ${SVG.elementSymbol(others[2], lively.pt(12.5, 8.5), 1.5)}`, lively.rect(0, 0, 1 return `unknown reminder text '${keyword}''`; } - return italic(`(${reminderText(...modifiers)})`); + return this.italic(`(${reminderText(...modifiers)})`); }); } From 35ac48cd5091b10d329fdc0d54ca369f3ca37dfe Mon Sep 17 00:00:00 2001 From: onsetsu Date: Wed, 25 Sep 2024 13:47:19 +0200 Subject: [PATCH 2/3] duplicate button also for view mode in container SQUASHED: AUTO-COMMIT-KatrinsBA.pdf,AUTO-COMMIT-src-components-tools-lively-container.html,AUTO-COMMIT-src-components-widgets-lively-notification.html,AUTO-COMMIT-src-components-widgets-ubg-card.js, --- src/components/tools/lively-container.html | 2 +- src/components/widgets/ubg-card.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/tools/lively-container.html b/src/components/tools/lively-container.html index f6eda695c..472fc349a 100644 --- a/src/components/tools/lively-container.html +++ b/src/components/tools/lively-container.html @@ -234,7 +234,7 @@ - diff --git a/src/components/widgets/ubg-card.js b/src/components/widgets/ubg-card.js index 58bc19f86..e49ee1bc4 100644 --- a/src/components/widgets/ubg-card.js +++ b/src/components/widgets/ubg-card.js @@ -934,7 +934,7 @@ ${SVG.elementSymbol(others[2], lively.pt(12.5, 8.5), 1.5)}`, lively.rect(0, 0, 1 }, reap: (...args) => { - return `To reap, gain vp equal to a card's base vp.` + return `To reap a card, gain () equal to its cost OR vp equal to its base vp.` }, resonance: (...args) => { From 2b871dfad3ccb79ceb62f60f4a1ba7003fecc1f7 Mon Sep 17 00:00:00 2001 From: onsetsu Date: Thu, 26 Sep 2024 11:14:59 +0200 Subject: [PATCH 3/3] added example for plugin explorer SQUASHED: AUTO-COMMIT-demos-stefan-plugin-explorer-README.md, --- demos/stefan/plugin-explorer/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 demos/stefan/plugin-explorer/README.md diff --git a/demos/stefan/plugin-explorer/README.md b/demos/stefan/plugin-explorer/README.md new file mode 100644 index 000000000..cf4b3847b --- /dev/null +++ b/demos/stefan/plugin-explorer/README.md @@ -0,0 +1,14 @@ +# Babel Plugin Explorer Demo + +The babel.js plugin explorer allows developers to live program plugins to the babel transpiler used in Lively4. +Live programming provides instant feedback on the example input. +Further, Lively's self-sustaining nature allows you to apply changes to the compiler on-the-fly, thus, affecting all future module loads without the need to restart lively. + + + +You can go to the trace visualization using the button in top right corner. \ No newline at end of file