示例#1
0
 public ParamContext(PTypeContext ptc, String name, String subcat, int cost)
 {
     pc    = ptc;
     param = new BuildParameter {
         Game = pc.pc.game, Name = name, Category = subcat, Type = pc.ptype, Cost = cost
     };
 }
示例#2
0
                public ParamContext Dor(int amount, BuildParameter ofthis, bool not)
                {
                    var g = bpr.Last();

                    Dep(amount, ofthis, g.DAmount, not);
                    bpr.Last().OrGroup = g.OrGroup;
                    return(this);
                }
示例#3
0
 public ParamContext Dep(int amount, BuildParameter ofthis, int forthis, bool not)
 {
     bpr.Add(new BuildParameterRequiement
     {
         OrGroup = Guid.NewGuid().ToString(),
         DAmount = forthis,
         Depend  = param,
         On      = ofthis,
         Game    = pc.pc.game,
         OAmount = amount,
         Not     = not
     });
     return(this);
 }
示例#4
0
 public ParamContext Exclude(int amount, BuildParameter ofthis, int forthis = 1)
 {
     return(Dep(amount, ofthis, forthis, true));
 }
示例#5
0
 public ParamContext Require(int amount, BuildParameter ofthis, int forthis = 1)
 {
     return(Dep(amount, ofthis, forthis, false));
 }
示例#6
0
 public ParamContext OrExclude(int amount, BuildParameter ofthis)
 {
     return(Dor(amount, ofthis, true));
 }
示例#7
0
 public ParamContext OrRequire(int amount, BuildParameter ofthis)
 {
     return(Dor(amount, ofthis, false));
 }