static void GenerateMonsterActions() { for (int i = 0; i < monsters.Count; ++i) { Attack newAttack = new Attack(monsters[i]); newAttack.AddTarget(playerChars[Random.Range(0, playerChars.Count)]); actions.Add(newAttack); } }
public void LaunchBasicAttack() { Attack baseAttack = new Attack(this); //Choose a random target for your attack int nPlayers = BattleEventHandler.Player.Count; baseAttack.AddTarget(BattleEventHandler.Player[Random.Range(0, nPlayers)]); baseAttack.ExecuteAction(); }