static public TokenFromManySpaces ToGather(
     IEnumerable <GatherGroup> remaining,
     SpiritIsland.Space to,
     IEnumerable <SpaceToken> tokens,
     Present present = Present.Always
     ) => new TokenFromManySpaces(
     (present == Present.Done ? "Gather up to " : "Gather ") + remaining.Select(x => x.ToString()).Join(", "),
     tokens,
     present
     )
 {
     AdjacentInfo = new AdjacentInfo {
         Original  = to,
         Adjacent  = tokens.Select(s => s.Space).Distinct().ToArray(),
         Direction = AdjacentDirection.Incoming
     }
 };
 static public TokenFromManySpaces ToGather(
     int remaining,
     SpiritIsland.Space to,
     IEnumerable <SpaceToken> tokens,
     Present present = Present.Always
     ) => new TokenFromManySpaces(
     present == Present.Done
                     ? $"Gather up to {remaining}"
                     : $"Gather {remaining}",
     tokens,
     present
     )
 {
     AdjacentInfo = new AdjacentInfo {
         Original  = to,
         Adjacent  = tokens.Select(s => s.Space).Distinct().ToArray(),
         Direction = AdjacentDirection.Incoming
     }
 };
Beispiel #3
0
 public static TokenFrom1Space ToRemove(SpiritIsland.Space space, IEnumerable <Token> options)
 => new TokenFrom1Space("Remove invader", space, options, Present.Always);
Beispiel #4
0
 public static TokenFrom1Space ToReplace(string actionVerb, SpiritIsland.Space space, IEnumerable <Token> options)
 => new TokenFrom1Space($"Select invader to {actionVerb}", space, options.Cast <HealthToken>(), Present.Always);
Beispiel #5
0
 public static TokenFrom1Space ForBadlandDamage(int remainingDamage, SpiritIsland.Space space, IEnumerable <Token> invaders)
 => new TokenFrom1Space($"Select invader to apply badland damage ({remainingDamage} remaining)", space, invaders, Present.Done);
Beispiel #6
0
 public static TokenFrom1Space ForAggregateDamage(SpiritIsland.Space space, Token[] invaderTokens, int aggregateDamage, Present present)
 => new TokenFrom1Space($"Damage ({aggregateDamage} remaining)", space, invaderTokens, present);
Beispiel #7
0
 public static TokenFrom1Space ForIndividualDamage(int damagePerInvader, SpiritIsland.Space space, IEnumerable <Token> invaders)
 => new TokenFrom1Space($"Select invader to apply {damagePerInvader} damage", space, invaders.Distinct(), Present.Done);
Beispiel #8
0
 public static TokenFrom1Space ToRemoveByHealth(SpiritIsland.Space space, IEnumerable <Token> invaders, int remainingDamage)
 => new TokenFrom1Space($"Remove up to {remainingDamage} health of invaders.", space, invaders.Where(x => x.RemainingHealth <= remainingDamage), Present.Done);
 public static TokenFrom1Space TokenToMove(SpiritIsland.Space srcSpace, int count, Token[] options, Present present)
 => new TokenFrom1Space(present != Present.Done ? $"Move ({count})" : $"Move up to ({count})", srcSpace, options, present);
 public static TokenFrom1Space TokenToPush(SpiritIsland.Space space, int count, Token[] options, Present present)
 => new TokenFrom1Space(present != Present.Done ? $"Push ({count})" : $"Push up to ({count})", space, options, present);
 public TokenFrom1Space(string prompt, SpiritIsland.Space space, IEnumerable <Token> options, Present present)
     : base(prompt, options, present)
 {
     Space = space;
 }