public override void Update(List <PointViewerUtility.ActionBase> acts, PlayerBase[] plist, FieldBase f) { if (!(f is field)) { Console.Error.WriteLine("パラメータ FieldBase f はfield型である必要があります"); return; } if (acts.Count == 0) { return; } foreach (Action act in acts) { Player target = (Player)UtilityMethod.Target(plist, act.Player); switch (act.State) { case (Action.O1): target.O1++; target.AdditionalPoint += oPoint; break; case (Action.O2): target.O2++; target.AdditionalPoint += oPoint; break; case (Action.X1): target.X1++; target.AdditionalPoint -= penalty; break; case (Action.X2): target.X2++; target.AdditionalPoint -= penalty; break; case (Action.B1): target.B1++; target.AdditionalPoint += bPoint; break; case (Action.B2): target.B2++; target.AdditionalPoint += bPoint; break; default: break; } target.Point = target.InitialPoint + target.AdditionalPoint; } }
public override void Update(List <PointViewerUtility.ActionBase> acts, PlayerBase[] plist, FieldBase f) { if (!(f is field)) { Console.Error.WriteLine("パラメータ FieldBase f はfield型である必要があります"); return; } if (acts.Count == 0) { return; } foreach (Action act in acts) { Player target = (Player)UtilityMethod.Target(plist, act.Player); if (IsDirectPoint) { if (act.State == Action.P) { target.Point = act.Point; } } else { switch (act.State) { case (Action.O1): target.O1++; target.Point += addPoint; break; case (Action.O2): target.O2++; target.Point += addPoint; break; case (Action.OO): target.O1++; target.O2++; target.Point += addPoint + doubleBonus; break; default: break; } } } }
public override void Update(List <PointViewerUtility.ActionBase> acts, PlayerBase[] plist, FieldBase f) { if (!(f is field)) { Console.Error.WriteLine("パラメータ FieldBase f はfield型である必要があります"); return; } if (acts.Count == 0) { return; } foreach (Action act in acts) { Player target = (Player)UtilityMethod.Target(plist, acts[0].Player); switch (act.State) { case (Action.O1): target.O1++; break; case (Action.O2): target.O2++; break; case (Action.X1): target.X1++; target.SleepCount = 2; break; case (Action.X2): target.X2++; target.SleepCount = 2; break; case (Action.FuncSet): target.FuncNum = act.FuncNum; break; default: break; } } }
public override void Update(List <PointViewerUtility.ActionBase> acts, PlayerBase[] plist, FieldBase f) { if (acts.Count == 1 && f is field) { Player target = (Player)UtilityMethod.Target(plist, acts[0].Player); Action act = (Action)acts[0]; switch (act.State) { case (Action.O1): target.O1++; target.Point = basicPoint * target.O + target.Bonus; break; case (Action.O2): target.O2++; target.Point = basicPoint * target.O + target.Bonus; break; case (Action.X1): target.X1++; target.SleepCount = sleep; break; case (Action.X2): target.X2++; target.SleepCount = sleep; break; case (Action.A): target.Bonus += act.Point; target.Point = basicPoint * target.O + target.Bonus; break; default: break; } } }
public override void Update(List <PointViewerUtility.ActionBase> acts, PlayerBase[] plist, FieldBase f) { if (acts.Count == 1 && f is field) { Player target = (Player)UtilityMethod.Target(plist, acts[0].Player); Action act = (Action)acts[0]; switch (act.State) { case (Action.O1): target.O1++; target.P1++; target.Point += target.P2 + 1; break; case (Action.O2): target.O2++; target.P2++; target.Point += target.P1 + 1; break; case (Action.X1): target.X1++; target.P1 = 0; break; case (Action.X2): target.X2++; target.P2 = 0; break; default: break; } } }
public override void Update(List <PointViewerUtility.ActionBase> acts, PlayerBase[] plist, FieldBase f) { if (!(f is field)) { Console.Error.WriteLine("パラメータ FieldBase f はfield型である必要があります"); return; } if (acts.Count == 0) { return; } Player target = (Player)UtilityMethod.Target(plist, acts[0].Player); Action act = (Action)acts[0]; switch (act.State) { case (Action.O1): target.O1++; if (target.IsP1Attacker) { if (act.Kind == Action.Attack) { foreach (Player p in plist) { if (target != p) { p.Point -= target.AP; } } } } else { if (act.Kind == Action.Heal) { target.Point += healLP; } else if (act.Kind == Action.Reinforce) { target.AP += reinforceAP; } } break; case (Action.O2): target.O2++; if (!target.IsP1Attacker) { if (act.Kind == Action.Attack) { foreach (Player p in plist) { if (target != p) { p.Point -= target.AP; } } } } else { if (act.Kind == Action.Heal) { target.Point += healLP; } else if (act.Kind == Action.Reinforce) { target.AP += reinforceAP; } } break; case (Action.X1): target.X1++; if (target.AP == defaultAP) { target.Point -= penaltyLP; } else { target.AP = defaultAP; } break; case (Action.X2): target.X2++; if (target.AP == defaultAP) { target.Point -= penaltyLP; } else { target.AP = defaultAP; } break; case (Action.Switch): target.SwitchAttacker(); target.SleepCount = 1; break; default: break; } }
public override void Update(List <PointViewerUtility.ActionBase> acts, PlayerBase[] plist, FieldBase f) { if (!(f is field)) { Console.Error.WriteLine("パラメータ FieldBase f はfield型である必要があります"); return; } if (acts.Count == 0) { return; } Player target = (Player)UtilityMethod.Target(plist, acts[0].Player); Action act = (Action)acts[0]; switch (act.State) { case (Action.O1): target.O1++; ((field)f).FieldBoad.ChooseLine(act.Line, playerIndex[target.MainKey()]); { var pointTable = ((field)f).FieldBoad.BoadPointTable(); for (int i = 0; i < plist.Length; i++) { int value; var p = ((Player)plist[i]); if (pointTable.TryGetValue(i + 1, out value)) { p.FieldPoint = value; } else { p.FieldPoint = 0; } p.Point = p.O + p.FieldPoint; } } break; case (Action.O2): target.O2++; ((field)f).FieldBoad.ChooseLine(act.Line, playerIndex[target.MainKey()]); { var pointTable = ((field)f).FieldBoad.BoadPointTable(); for (int i = 0; i < plist.Length; i++) { int value; var p = ((Player)plist[i]); if (pointTable.TryGetValue(i + 1, out value)) { p.FieldPoint = value; } else { p.FieldPoint = 0; } p.Point = p.O + p.FieldPoint; } } break; case (Action.X1): target.X1++; target.SleepCount = sleep; break; case (Action.X2): target.X2++; target.SleepCount = sleep; break; default: break; } }
public override void Update(List <PointViewerUtility.ActionBase> acts, PlayerBase[] plist, FieldBase f) { if (acts.Count == 1 && f is field) { Player target = (Player)UtilityMethod.Target(plist, acts[0].Player); Action act = (Action)acts[0]; switch (act.State) { case (Action.O1): target.O1++; if (target.Standup2) { target.Standup2 = false; target.BonusAdded = true; } if (!target.BonusAdded && !target.Standup1) { target.Standup1 = true; } target.Point = target.O1 + target.O2; if (target.BonusAdded) { target.Point++; } break; case (Action.O2): target.O2++; if (target.Standup1) { target.Standup1 = false; target.BonusAdded = true; } if (!target.BonusAdded && !target.Standup2) { target.Standup2 = true; } target.Point = target.O1 + target.O2; if (target.BonusAdded) { target.Point++; } break; case (Action.X1): target.X1++; break; case (Action.X2): target.X2++; break; default: break; } } else if (acts.Count > 1) { foreach (Action act in acts) { Player p = (Player)PointViewerUtility.UtilityMethod.Target(plist, act.Player); switch (act.State) { case Action.SET4o2x: p.WinPoint = winPoint - 1; p.LoseX = losePoint; break; case Action.SET4o3x: p.WinPoint = winPoint - 1; p.LoseX = losePoint + 1; break; case Action.SET5o2x: p.WinPoint = winPoint; p.LoseX = losePoint; break; case Action.SET5o3x: p.WinPoint = winPoint; p.LoseX = losePoint + 1; break; default: p.WinPoint = winPoint; p.LoseX = losePoint; break; } } } }