public void AddDeckPokemon(CarD card) { MinhasCartas.Add(card); if (MinhasCartas.Count == 1) { this.PokemonPrincipal = this.MinhasCartas[0]; } }
public CarD CreateNewCardPokemon() { int idCard = IDCard; String nomePk = Pk.Nome; String tipoPK = Pk.Tipo; int ataquePK = Pk.Ataque; int evolucaoPK = Pk.Evolucao; CarD aux = new CarD(idCard, nomePk, tipoPK, ataquePK, evolucaoPK); return(aux); }
public CarD getDeckPokemon(int id) { CarD aux = null; foreach (CarD carD in MinhasCartas) { if (carD.IDCard == id) { aux = carD; break; } } return(aux); }
public Ginasio(String nome, List <CarD> Cartas) { Id++; Nivel = Id; Nome = nome; Treinadores = new List <Jogador>(); Random r = new Random(); int j = 0; for (int i = Id; i > 0; i--) { String adversario = "NPC_" + (j + 1); Jogador ad = new Jogador(adversario); CarD card = Cartas[r.Next(Cartas.Count())].CreateNewCardPokemon(Nivel); ad.AddDeckPokemon(card);//pegar aleatoriamente Treinadores.Add(ad); j++; } }
public CarD CreateNewCardPokemon(int nivel) { int idPk = this.IDCard; String nomePk = this.Pk.Nome; String tipoPK = this.Pk.Tipo; int ataquePK = this.Pk.Ataque; int evolucaoPK = this.Pk.Evolucao; CarD aux; switch (nivel) { case 1: if (evolucaoPK == 0) { aux = new CarD(IDCard, nomePk, tipoPK, (int)(ataquePK - (ataquePK * 80 / 100)), evolucaoPK); } else { aux = new CarD(IDCard, nomePk, tipoPK, (int)(ataquePK - (ataquePK * 40 / 100)), evolucaoPK); } break; case 2: if (evolucaoPK == 0) { aux = new CarD(IDCard, nomePk, tipoPK, (int)(ataquePK - (ataquePK * 60 / 100)), evolucaoPK); } else { aux = new CarD(IDCard, nomePk, tipoPK, (int)(ataquePK - (ataquePK * 30 / 100)), evolucaoPK); } break; case 3: if (evolucaoPK == 0) { aux = new CarD(IDCard, nomePk, tipoPK, (int)(ataquePK - (ataquePK * 40 / 100)), evolucaoPK); } else { aux = new CarD(IDCard, nomePk, tipoPK, (int)(ataquePK - (ataquePK * 20 / 100)), evolucaoPK); } break; case 4: if (evolucaoPK == 0) { aux = new CarD(IDCard, nomePk, tipoPK, (int)(ataquePK - (ataquePK * 20 / 100)), evolucaoPK); } else { aux = new CarD(IDCard, nomePk, tipoPK, (int)(ataquePK - (ataquePK * 10 / 100)), evolucaoPK); } break; default: { if (nivel > 10) { aux = new CarD(IDCard, nomePk, tipoPK, (int)(ataquePK + (ataquePK * nivel / 100)), evolucaoPK); } else { aux = new CarD(IDCard, nomePk, tipoPK, ataquePK, evolucaoPK); } break; } } return(aux); }