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:
jendave
2011-08-06 08:04:35 +00:00
parent 3534de67a7
commit 4e64763383
2 changed files with 8 additions and 1 deletions

View File

@@ -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

View File

@@ -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);