You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/AI.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,9 @@ The AI is:
7
7
- Poor to Ok in control decks
8
8
- Pretty bad for most combo decks
9
9
10
+
The logic is mostly based on heuristics and split between effect APIs and all other ingame decisions. Sometimes there is hardcoded logic for single cards but that's usually not a healthy approach though it can be more justifiable for highly iconic cards.
11
+
Defining general concepts of smart play can help improve the win rate much easier, e.g. the AI will always attack with creatures that it has temporarily gained control of until end of turn in order not to miss the opportunity and thus waste the control effect.
12
+
10
13
If you want to train a model for the AI, please do. We would love to see something like that implemented in Forge.
Copy file name to clipboardExpand all lines: docs/Advanced-Search.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,19 @@
1
1
# Advanced Search
2
2
3
-
Forge implements many ways to help you find the cards you want in your ever growing collection. One of them uses a [Scryfall-like syntax](https://scryfall.com/docs/syntax) in the collection search bar.
3
+
Forge implements many ways to help you find the cards you want in your ever growing collection.
4
+
5
+
Pressing Ctrl+Enter in current search adds another editable search bar.
6
+
Here's how searching for all Goblins without Haste-related abilities might look:
7
+

8
+
9
+
Click the "X" in the upper right corner of each search widget to remove that filter from the filter stack.
10
+
11
+
Find-as-you-type is implemented for Deck Editor tables. Just start typing while the table has focus and the next card with a matching string in its name will be highlighted. If more than one card matches, hit Enter to select the next matching card. A popup panel will appear with the search string so you know what you are searching for. If no cards match the string, the string will be highlighted in red. Find-as-you-type mode is automatically exited after 5 seconds of inactivity, or hit Escape to exit find-as-you-type mode immediately.
4
12
5
13
## Additional information
6
14
15
+
Another way to filter is using [Scryfall-like syntax](https://scryfall.com/docs/syntax) in the collection search bar.
16
+
7
17
If no operators are passed between tokens, Forge will assume it is joined by `and`. For example, `t:cat t:warrior t:creature` will search for "creatures that are a cat **and** a warrior". Make sure to use `|` or `or` for your queries, as well as parentheses `( )` when needed.
8
18
9
19
Keywords can be negated by prefixing a minus sign `-`. For example, `t:creature -t:goblin` will search for "creatures that aren't goblins".
Copy file name to clipboardExpand all lines: docs/Card-Images.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,10 @@ Primarily there are two types of images you'll care about; cards, and tokens.
8
8
9
9
**Tokens** - are the images for the cards replacing a generic "1/1 zombie" for example. These are less frequently updated, and are typically the bulk of what is missing when doing an audit. However, these are probably where the more true "custom" replacements are available, with either custom artwork, or modified of other existing.
10
10
11
+
A deck may explicitly define the edition and art variant of each card it includes. If a deck specifies those for no card, Forge uses a special algorithm to determine which card printings were the latest by the moment all of deck's had been printed. These very editions of cards are used when loading deck into memory to reflect the flavour of the season when the deck was built.
12
+
13
+
Card images are cleared from memory cache when switching screens and between games.
14
+
11
15
# Downloading
12
16
13
17
Due to charges in Forges hosting and scryfall terms you can no longer predownload card images. Turn on auto download in forge to download card images when first viewed.
Copy file name to clipboardExpand all lines: docs/Creating-a-custom-Card.md
+54Lines changed: 54 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -173,3 +173,57 @@ The sinmlest method for creating an effect on your card is to find another card
173
173
>./Forge/res/cardsfolder/cardsfolder.zip
174
174
175
175
Unzipping this file will sllow you to search for any card in the containing subfolders.
176
+
177
+
# Custom mechanics
178
+
179
+
We don't accept new mechanics from outside of official Cards into the main repository. This restriction is needed to keep the engine healthy.
180
+
181
+
However there is some support to simulate them using named abilities:
182
+
183
+
This will support things like being able to target specific SA using a custom name. (Flash on Meditate abilities in this example)
184
+
185
+
```text
186
+
Name:Plo Koon
187
+
ManaCost:3 W W
188
+
Types:Legendary Creature KelDor Jedi
189
+
PT:4/4
190
+
191
+
S:Mode$ CastWithFlash | ValidSA$ Activated.NamedAbilityMeditate | Caster$ You | Description$ You may activate meditate abilities any time you could cast an instant.
192
+
193
+
A:AB$ ChangeZone | Named$ Meditate | Cost$ 1 W | ActivationZone$ Battlefield | SorcerySpeed$ True | Origin$ Battlefield | Destination$ Hand | Defined$ Self | SpellDescription$ Meditate (Return this creature to its owner's hand. Meditate only as a sorcery.)
194
+
195
+
Oracle:You may activate meditate abilities any time you could cast an instant.\nMeditate 1W (Return this creature to its owner's hand. Meditate only as a sorcery.)
196
+
```
197
+
198
+
Restrict trigger to only if was triggered by a specific type of SA (Only Scry when Meditating and not being bounced), and reduce cost for a specific type of ability.
199
+
200
+
```text
201
+
Name:Jedi Training
202
+
ManaCost:U
203
+
Types:Enchantment
204
+
205
+
S:Mode$ ReduceCost | ValidCard$ Card | ValidSpell$ Activated.NamedAbilityMeditate | Activator$ You | Amount$ 1 | Description$ Meditate abilities you activate cost {1} less to activate.
206
+
207
+
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Hand | TriggerZones$ Battlefield | ValidCard$ Creature.Jedi+YouCtrl | Condition$ FromNamedAbilityMeditate | SubAbility$ DBScry | TriggerDescription$ Whenever a Jedi creature you control meditates, scry 1.
208
+
SVar:DBScry:DB$ Scry | ScryNum$ 1
209
+
210
+
Oracle:Meditate abilities you activate cost {1} less to activate.\nWhenever a Jedi creature you control meditates, scry 1.
211
+
```
212
+
213
+
It will also allow for cards to check if a card was cast using an certain ability using `Count$FromNamedAbility<name>.<true>.<false>`:
214
+
215
+
```text
216
+
Name:Chronic Traitor
217
+
ManaCost:2 B
218
+
Types:Creature Human Rogue
219
+
PT:2/1
220
+
221
+
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigSacrifice | TriggerDescription$ When this creature enters, each player sacrifices a creature. If this creature's paranoia cost was paid, each player sacrifices two creatures instead.
222
+
SVar:TrigSacrifice:DB$ Sacrifice | Defined$ Player | SacValid$ Creature | Amount$ X
223
+
SVar:X:Count$FromNamedAbilityParanoia.2.1
224
+
225
+
T:Mode$ ChangesZone | TriggerZones$ Hand | ValidCard$ Permanent.YouCtrl | Origin$ Battlefield | Destination$ Any | Execute$ PayParanoia | TriggerDescription$ Paranoia {2}{B}{B} (You may cast this spell for its paranoia cost when a permanent you control leaves the battlefield.)
226
+
SVar:PayParanoia:DB$ Play | Named$ Paranoia | PlayCost$ 2 B B | ValidSA$ Spell.Self | Controller$ You | ValidZone$ Hand | Optional$ True
227
+
228
+
Oracle:When this creature enters, each player sacrifices a creature. If this creature's paranoia cost was paid, each player sacrifices two creatures instead.\nParanoia {2}{B}{B} (You may cast this spell for its paranoia cost when a permanent you control leaves the battlefield.)
Copy file name to clipboardExpand all lines: docs/Creating-a-custom-Set.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -260,6 +260,15 @@ For the tokens, we can deposit them inside `%localappdata%/Forge/Cache/pics/toke
260
260
261
261
You can now start your game again, and see that the art loads correctly now.
262
262
263
+
## Excursion: Card variants
264
+
265
+
There are currently multiple ways to specify a flavor name:
266
+
* Manually, by writing `Variant:Foo:FlavorName:Loret Ipsum` in the card script, and adding `${"variant": "Foo"}` to the end of the edition entry. You'll also want to add `Variant:Foo:Oracle:When Loret Ipsum enters...` if the flavor name would appear in the Oracle text, or if it would otherwise be changed.
267
+
* By lookup, again by using `Variant:Foo:FlavorName:Loret Ipsum` in the card script, but simply using "Loret Ipsum" as the name in the edition file.
268
+
* Automatically, by putting `${"flavorName": "Loret Ipsum"}` at the end of the edition entry.
269
+
270
+
The third method is the easiest, but besides a simple find/replace for the card name, it won't be able to make any changes to flavor the Oracle text, such as for ability words. They all function the same under the hood once the CardDB is loaded; the latter two are just shortcuts for the first.
271
+
263
272
## 🎉 Congratulations
264
273
265
274
You’ve just added your first custom set in Forge! There's still much more to explore — scripting advanced abilities, custom mechanics, and set structures — but you now have a solid foundation to build from.
Note: For now, please also check [this](https://www.slightlymagic.net/forum/viewtopic.php?f=26&t=11825) forum topic for some additional information.
10
-
11
9
# General
12
10
13
11
## How do I download content?
14
12
15
-
Forge has content downloaders within the app itself, you can use those tools to update the graphics assets. More information about card and token image assets can be found here. [Card Images, Downloading](Card-Images#downloading)
13
+
Forge has content downloaders within the app itself, you can use those tools to update the graphics assets. More information about card and token image assets can be found here. [Card Images, Downloading](Card-Images.md#downloading)
14
+
15
+
## My desktop match/deck view is all messed up?
16
+
The match and deck editor windows contain panels that can be moved and/or resized. The changes that you make are saved to files that are named "editor.xml" and "match.xml". These files can be found in your userDir/preferences/ directory.
17
+
18
+
Sometimes people will decide that they do not like the changes that they made and wish to go back to the original layout. To reset layouts to default, go to the Game Settings -> Preferences -> Troubleshooting section. You will find at this location two buttons that will reset the match layout and the deck editor layouts.
19
+
20
+
Also use the mentioned measure if your match or deckeditor won't start - it would help in 90% of the cases.
16
21
17
22
## I think I found a bug in Forge. What do I do?
18
23
@@ -24,7 +29,7 @@ For starters, please take note of (1) what you had in play, (2) what your oppone
24
29
25
30
If you did not get a Crash Report, but you have experienced a problem in how Forge handled one or more cards or game rules, *please read the cards (and the Oracle rulings) carefully* to make sure you understand how they work. You may be surprised to find that Forge is actually enforcing the rules correctly.
26
31
27
-
Because duplicate bug reports use up our limited resources, please research your bug with the **Search** box on Forge's [issue tracker](https://git.cardforge.org/core-developers/forge/-/issues) to see if your bug has already been reported there. For Crash Reports, use key words from the second paragraph of the Crash Report.
32
+
Because duplicate bug reports use up our limited resources, please research your bug with the **Search** box on Forge's [issue tracker](https://github.com/Card-Forge/forge/issues) to see if your bug has already been reported there. For Crash Reports, use key words from the second paragraph of the Crash Report.
28
33
29
34
* If you find a matching issue, examine it to see if you have anything new to contribute. For example, a different way of reproducing a problem can sometimes be helpful. If the issue was posted to the forum, you may post your additional information there.
30
35
@@ -46,7 +51,17 @@ A development environment such as [IntelliJ](https://www.jetbrains.com/idea) is
46
51
47
52
Thanks to the nature of how cards are implemented, you can also contribute these as small plain text files. This is especially helpful during a preview season, when there are a lot of new cards in the backlog. This is mostly coordinated in #card-scripting on the Discord (and the pins there).
48
53
49
-
To obtain the source code of Forge, read our [Development Guide]((SM-autoconverted)--how-to-get-started-developing-forge).
54
+
For smaller first-time contributions using the GitHub web interface is also an alternative:
55
+

56
+
57
+
1. Register GitHub Account (if you don't already have one)
58
+
2. Make your own fork of Forge, press this button on the main project page (must only be done first time)
59
+
3. In your fork you can navigate to `forge-gui/res/cardsfolder/upcoming` and either Upload new files or open an existing one
60
+
4. When you're done at the bottom make sure to create a new branch, that makes it easier to keep your changes apart
61
+
5. On the next page make sure you choose the original project as merge target (see screens)
62
+
6. Please test your scripts and watch for review comments
63
+
64
+
To obtain the source code of Forge, read our [Development Guide](Development/IntelliJ-setup/IntelliJ-setup.md).
50
65
51
66
## My system is all setup to help. What now?
52
67
@@ -56,7 +71,7 @@ Take a look through the /res/cardsfolder folder. This is where all the card data
56
71
57
72
## Where do I use Flashback or a similar ability that is in an External area?
58
73
59
-
Click on the Lightning Bolt icon in the player panel. Since cards with External Activations aren't as clear to activate, we created this shortcut for this specific purpose.
74
+
Click on the Lightning Bolt icon in the player panel. Since cards with external Activations aren't as clear to activate, we created this shortcut for this specific purpose. After the last card is removed from a zone window, that window will automatically be hidden.
60
75
61
76
## How do I target a player?
62
77
@@ -71,7 +86,3 @@ If you have an effect that generated you some mana, and you don't know where it
71
86
## What is the difference between Fantasy Quest and Normal Quest?
72
87
73
88
In Normal Quest, you start with 20 life and only have access to the Card Shop. In Fantasy Quest, you start at 15 life and gain additional access to the Bazaar which allows you to buy things like extra life points, Pets, Plants and more.
74
-
75
-
## Sealed Deck Mode
76
-
77
-
[HOW-TO: Customize your Sealed Deck games with fantasy blocks](https://www.slightlymagic.net/forum/viewtopic.php?f=26&t=8164)
0 commit comments