Exemple #1
0
 public static TriggerContentTypeDescriptor[] getComponents()
 {
     return(new TriggerContentTypeDescriptor[] {
         TriggerContentType.VISUAL_LABEL("Current player has most "),
         TriggerContentType.RESOURCES,
     });
 }
Exemple #2
0
        public GeneralTriggerContentInternalCalculator(Parser parser, string name, TriggerContentTypeDescriptor[] types, int[] usefulMapping, int[] atextMapping, int[] trigMapping, Func <TriggerContentTypeDescriptor[], int> getArgCount, TriggerContent content)
        {
            int count   = getArgCount(types);
            int counter = 0;

            _textMapping = atextMapping;

            _contents   = new SaveableItem[count];
            _name       = name;
            visualParts = new TriggerDefinitionPart[types.Length];
            for (int i = 0; i < types.Length; i++)
            {
                int localCounter = counter;
                TriggerContentTypeDescriptor type = types[i];
                if (type is TriggerContentTypeDescriptorVisual)
                {
                    string label = ((TriggerContentTypeDescriptorVisual)type).Content;
                    if (label.Equals("\n"))
                    {
                        visualParts[i] = new TriggerDefinitionNewLine();
                    }
                    else
                    {
                        visualParts[i] = (TriggerDefinitionPart)TriggerContentType.VISUAL_LABEL(label).Read(null, 0);
                    }
                }
                else
                {
                    _contents[_textMapping[counter]] = type.Read(content, _textMapping[counter]);
                    counter++;
                    visualParts[i] = type.GetDefinitionPart(() => _contents[_textMapping[localCounter]], (SaveableItem whatevs) => { _contents[_textMapping[localCounter]] = whatevs; });
                }
            }
        }
Exemple #3
0
 public static TriggerContentTypeDescriptor[] getComponents()
 {
     return(new TriggerContentTypeDescriptor[] {
         TriggerContentType.SWITCH_NAME,
         TriggerContentType.VISUAL_LABEL(" is "),
         TriggerContentType.SWITCH_STATE,
     });
 }
Exemple #4
0
 public static TriggerContentTypeDescriptor[] getComponents()
 {
     return(new TriggerContentTypeDescriptor[] {
         TriggerContentType.VISUAL_LABEL("Current player has most kills of "),
         TriggerContentType.UNIT_TYPE,
         TriggerContentType.VISUAL_LABEL("."),
     });
 }
Exemple #5
0
 public static TriggerContentTypeDescriptor[] getComponents()
 {
     return(new TriggerContentTypeDescriptor[] {
         TriggerContentType.VISUAL_LABEL("Current player has lowest score "),
         TriggerContentType.SCOREBOARD,
         TriggerContentType.VISUAL_LABEL("."),
     });
 }
Exemple #6
0
 public static TriggerContentTypeDescriptor[] getComponents()
 {
     return(new TriggerContentTypeDescriptor[] {
         TriggerContentType.VISUAL_LABEL("Current player commands the least "),
         TriggerContentType.UNIT_TYPE,
         TriggerContentType.VISUAL_LABEL("."),
     });
 }
Exemple #7
0
 public static TriggerContentTypeDescriptor[] getComponents()
 {
     return(new TriggerContentTypeDescriptor[] {
         TriggerContentType.VISUAL_LABEL("Alapsed scenario time is "),
         TriggerContentType.QUANTIFIER,
         TriggerContentType.VISUAL_LABEL(" "),
         TriggerContentType.AMOUNT,
         TriggerContentType.VISUAL_LABEL(" game seconds."),
     });
 }
Exemple #8
0
 public static TriggerContentTypeDescriptor[] getComponents()
 {
     return(new TriggerContentTypeDescriptor[] {
         TriggerContentType.PLAYER,
         TriggerContentType.VISUAL_LABEL(" has "),
         TriggerContentType.QUANTIFIER,
         TriggerContentType.VISUAL_LABEL(" "),
         TriggerContentType.AMOUNT,
         TriggerContentType.VISUAL_LABEL(" opponents remaining in the game."),
     });
 }
Exemple #9
0
 public static TriggerContentTypeDescriptor[] getComponents()
 {
     return(new TriggerContentTypeDescriptor[] {
         TriggerContentType.VISUAL_LABEL("Modify memory value at address "),
         TriggerContentType.ADDRESS,
         TriggerContentType.VISUAL_LABEL(": "),
         TriggerContentType.QUANTIFIER,
         TriggerContentType.VISUAL_LABEL(" "),
         TriggerContentType.AMOUNT,
         TriggerContentType.VISUAL_LABEL("."),
     });
 }
Exemple #10
0
 public static TriggerContentTypeDescriptor[] getComponents()
 {
     return(new TriggerContentTypeDescriptor[] {
         TriggerContentType.PLAYER,
         TriggerContentType.VISUAL_LABEL(" "),
         TriggerContentType.SCOREBOARD,
         TriggerContentType.VISUAL_LABEL(" score is "),
         TriggerContentType.QUANTIFIER,
         TriggerContentType.VISUAL_LABEL(" "),
         TriggerContentType.AMOUNT,
         TriggerContentType.VISUAL_LABEL("."),
     });
 }
Exemple #11
0
 public static TriggerContentTypeDescriptor[] getComponents()
 {
     return(new TriggerContentTypeDescriptor[] {
         TriggerContentType.PLAYER,
         TriggerContentType.VISUAL_LABEL(" kills "),
         TriggerContentType.QUANTIFIER,
         TriggerContentType.VISUAL_LABEL(" "),
         TriggerContentType.AMOUNT,
         TriggerContentType.VISUAL_LABEL(" of "),
         TriggerContentType.UNIT_TYPE,
         TriggerContentType.VISUAL_LABEL("."),
     });
 }
Exemple #12
0
 public static TriggerContentTypeDescriptor[] getComponents()
 {
     return(new TriggerContentTypeDescriptor[] {
         TriggerContentType.PLAYER,
         TriggerContentType.VISUAL_LABEL(" accumulates "),
         TriggerContentType.QUANTIFIER,
         TriggerContentType.VISUAL_LABEL(" "),
         TriggerContentType.AMOUNT,
         TriggerContentType.VISUAL_LABEL(" "),
         TriggerContentType.RESOURCES,
         TriggerContentType.VISUAL_LABEL("."),
     });
 }
Exemple #13
0
 public static TriggerContentTypeDescriptor[] getComponents()
 {
     return(new TriggerContentTypeDescriptor[] {
         TriggerContentType.AMOUNT,
         TriggerContentType.VISUAL_LABEL(" "),
         TriggerContentType.AMOUNT,
         TriggerContentType.VISUAL_LABEL(" "),
         TriggerContentType.AMOUNT,
         TriggerContentType.VISUAL_LABEL(" "),
         TriggerContentType.AMOUNT,
         TriggerContentType.VISUAL_LABEL(" "),
         TriggerContentType.QUANTIFIER,
         TriggerContentType.VISUAL_LABEL(" "),
         TriggerContentType.AMOUNT,
         TriggerContentType.VISUAL_LABEL(" "),
         TriggerContentType.AMOUNT,
         TriggerContentType.VISUAL_LABEL(" "),
         TriggerContentType.AMOUNT,
         TriggerContentType.VISUAL_LABEL(" "),
         TriggerContentType.AMOUNT,
         TriggerContentType.VISUAL_LABEL(" ")
     });
 }
Exemple #14
0
 public static TriggerContentTypeDescriptor[] getComponents()
 {
     return(new TriggerContentTypeDescriptor[] {
         TriggerContentType.VISUAL_LABEL("Never"),
     });
 }