//5 public void EndRound() { Console.WriteLine($"End round, move = {move}"); Turn ^= true; OnlyCanEnd?.Invoke(false); CanSkip = false; if (move == 0) { } else if (move == 1) { move = 0; foreach (Cord C in cordsMarkedToMove) { A[C].FloorStatus = FloorStatus.Normal; } } else if (move == 2) { move = 0; } else if (move == 3) { move = 0; foreach (Cord C in cordsMarkedToPossibleAttack) { A[C].FloorStatus = FloorStatus.Normal; } } else if (move == 4) { move = 0; A[attackPlace].FloorStatus = FloorStatus.Normal; } else if (move == 5) { move = 0; } else { throw new NotImplementedException(); } SkillLifecycle(); A.EndRound(Turn); UpdateCursor(App.defauLt); }
private void ShowAtttack(Cord C) { bool primaryAttackEnable = PAt(C).IsSomeoneToAttack(C, A, true); bool skillAttackEnable = PAt(C).IsSomeoneToAttack(C, A, false); if (primaryAttackEnable || skillAttackEnable) //can attack { Console.WriteLine("Moved pawn can attack"); } else //cannot attack { Console.WriteLine("Moved pawn cannot attack anyone"); OnlyCanEnd?.Invoke(true); } StartAttackEvent?.Invoke(primaryAttackEnable, skillAttackEnable); }
public void ExecuteAttack() { string x = attackType ? "Attack" : "Skill"; Console.WriteLine($"Pawn at {movedPawn} with bonus {attackBonus}. {x} on pawn at {attackPlace}"); if (attackType) { PAt(movedPawn).NormalAttack(this, attackPlace, attackBonus); PlaySound?.Invoke(PAt(movedPawn).AttackSound); } else { PAt(movedPawn).SkillAttack(this, attackPlace, attackBonus); PlaySound?.Invoke(PAt(movedPawn).AttackSound); } A[attackPlace].FloorStatus = FloorStatus.Normal; move = 5; OnlyCanEnd?.Invoke(true); }