示例#1
0
 public override (IAction[], State.Province) Perform(State.Province province, State.Player active)
 {
     if (Province == province.Id)
     {
         var(attacked, actions) = province.AttackedBy(Army);
         return(actions, attacked);
     }
     return(new[] { this }, province);
 }
示例#2
0
 public (IAction[], State.Province) Perform(State.Province province, State.Player active)
 {
     if (province.Occupied && province is State.Land Land && Land.IsControlledBy(active.Id) && rand.NextDouble() < Land.Instability)
     {
         var(land, actions) = Land.Revolt();
         return(actions.Concat(this), land);
     }
     return(new[] { this }, province);
 }
示例#3
0
 public (IAction[], State.Province) Perform(State.Province province, State.Player active)
 {
     if (active.Id == Debtor && province is State.Land land && land.IsControlledBy(Debtor) && Debt > settings.DebtLimit + active.Money)
     {
         var(new_province, actions) = land.Revolt();
         return(land.Price > Debt ? actions : actions.Concat(new Loan(Debtor, Debt - land.Price, settings)), new_province);
     }
     return(new[] { this }, province);
 }
示例#4
0
 public (IAction[], State.Province) Perform(State.Province province, State.Player active)
 {
     if (province is State.Land land && land.IsControlledBy(Player) && Amount > 0)
     {
         var(new_province, actions) = land.Revolt();
         return(Amount <= land.Price ? actions : actions.Concat(new Seizure(Player, Amount - land.Price)), new_province);
     }
     return(new[] { this }, province);
 }
示例#5
0
 public override (IAction[], State.Province) Perform(State.Province province, State.Player active)
 {
     return(Province == province.Id ? (System.Array.Empty <IAction>(), province.ReinforcedBy(Army)) : (new[] { this }, province));
 }
示例#6
0
 public Attack(int player, int from, State.Province to, State.Army army) : base(player, from, to, army)
 {
 }
示例#7
0
 public abstract (IAction[], State.Province) Perform(State.Province province, State.Player active);
示例#8
0
 public Reinforce(int player, int from, State.Province to, State.Army army) : base(player, from, to, army)
 {
 }