mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
1)added comment parsing in ReadCard. In card text files, you can now start a line with "#", and that line will be ignored during parsing. It is only valid on per-line basis.
2) updated Judge of Currents with comments as an example
This commit is contained in:
@@ -3,6 +3,8 @@ ManaCost:1 W
|
|||||||
Types:Creature Merfolk Wizard
|
Types:Creature Merfolk Wizard
|
||||||
Text:no text
|
Text:no text
|
||||||
PT:1/1
|
PT:1/1
|
||||||
|
#Note: Type/Creature.Merfolk is not accepted by WheneverKeyword
|
||||||
|
#"Initiator - OwnedByController" causes one player not to trigger if both players have Judge of Currents in play
|
||||||
K:WheneverKeyword:BecomesTapped:Type/Merfolk:Play:ModifyLife/1:ControllingPlayer_Self:ASAP:Yes_No:Initiator - OwnedByController:Whenever a Merfolk you control becomes tapped, you may gain 1 life.
|
K:WheneverKeyword:BecomesTapped:Type/Merfolk:Play:ModifyLife/1:ControllingPlayer_Self:ASAP:Yes_No:Initiator - OwnedByController:Whenever a Merfolk you control becomes tapped, you may gain 1 life.
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/judge_of_currents.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/judge_of_currents.jpg
|
||||||
|
|||||||
@@ -91,7 +91,12 @@ public class ReadCard implements Runnable, NewConstants {
|
|||||||
String s = readLine();
|
String s = readLine();
|
||||||
while (!s.equals("End"))
|
while (!s.equals("End"))
|
||||||
{
|
{
|
||||||
if (s.startsWith("Name:"))
|
if (s.startsWith("#"))
|
||||||
|
{
|
||||||
|
//no need to do anything, this indicates a comment line
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (s.startsWith("Name:"))
|
||||||
{
|
{
|
||||||
String t = s.substring(5);
|
String t = s.substring(5);
|
||||||
//System.out.println(s);
|
//System.out.println(s);
|
||||||
|
|||||||
Reference in New Issue
Block a user