public static void StartTurnCombat(Mob attacker, Mob target) { if (attacker.Battle != null && target.Battle != null) { return; } if (CheckValidTarget(attacker, target) == false) { return; } SetTargetEnemies(attacker, target); attacker.CombatType = CombatType.TurnBased; target.CombatType = CombatType.TurnBased; TurnBattle battle = new TurnBattle(); battle.Participants.Add(attacker); battle.Participants.Add(target); battle.NextTurn = attacker; battle.CurrentTurn = target; attacker.Battle = battle; target.Battle = battle; battle.SetNextTurn(); }
public static void StartTurnCombat(Mob attacker, Mob target) { if (attacker.Battle != null && target.Battle != null) return; if (CheckValidTarget(attacker, target) == false) return; SetTargetEnemies(attacker, target); attacker.CombatType = CombatType.TurnBased; target.CombatType = CombatType.TurnBased; TurnBattle battle = new TurnBattle(); battle.Participants.Add(attacker); battle.Participants.Add(target); battle.NextTurn = attacker; battle.CurrentTurn = target; attacker.Battle = battle; target.Battle = battle; battle.SetNextTurn(); }