/* * drawCard(player:Player,many: number = 1): void { * var c = 0; * //On recupère la carte au sommet du deck et on l'ajoute à la main si il y a au moins une carte dans le deck * if (player.deck.length > 0) { * Debug.Log("tu as des cartes dans le deck donc on pioche"); * while (c < many) { * player.hand.push(player.deck.pop()); * c += 1; * } * } * else { * while (c < many) { * player.hand.push(player.deck.pop()); * c += 1; * } * Debug.Log("vous n'avez plus de carte dans le deck"); * this.looser = player; * } * }*/ public void summonMonster(Player player, PlayerSideField playerSide, int handCardPosition) { // if (player.canNormalSummon == true) { // if (playerSide.monsterZone1IsEmpty) { // playerSide.monsterZone1.monsterPosition.push(player.hand[handCardPosition]); // player.hand.splice(handCardPosition, 1); // } // else if (playerSide.monsterZone2IsEmpty) { // Debug.Log("Le deuxième zM est vide"); // playerSide.monsterZone2.monsterPosition.push(player.hand[handCardPosition]); // player.hand.splice(handCardPosition, 1); // } // else if (playerSide.monsterZone3IsEmpty) { // Debug.Log("Le troisième zM est vide"); // playerSide.monsterZone3.monsterPosition.push(player.hand[handCardPosition]); // player.hand.splice(handCardPosition, 1); // } // else if (playerSide.monsterZone4IsEmpty) { // Debug.Log("Le quatrième zM est vide"); // playerSide.monsterZone4.monsterPosition.push(player.hand[handCardPosition]); // player.hand.splice(handCardPosition, 1); // } // else if (playerSide.monsterZone5IsEmpty) { // Debug.Log("Le cinquième zM est vide"); // playerSide.monsterZone5.monsterPosition.push(player.hand[handCardPosition]); // player.hand.splice(handCardPosition, 1); // } // //On ne fait qu'une invocation normale par tour donc après cNs is false // player.canNormalSummon = false; // } // else if (player.canNormalSummon == false) { // Debug.Log("Vous avez deja fait une invocation normal ce tour"); // } }
/* directAttack(positionMonsterOnField:number,positionTargetAttack:number): void { * // TODO implement here * * }*/ public void summonMonster(PlayerSideField playerSide, int position) { // if (this.canNormalSummon == true) { // Debug.Log("Vous pouvez faire une invocation normal ce tour"); // if (playerSide.monsterZone1IsEmpty() == true ) { // Debug.Log("La première zone monstre est vide"); // playerSide.monsterZone1.monsterPosition.push(this.hand[position]); // playerSide.monsterZone1.monsterPosition[playerSide.monsterZone1.monsterPosition.length - 1].faceMode = monsterFightMode.faceUpAttack; // this.hand.splice(position, 1); // } // else if (playerSide.monsterZone2IsEmpty() == true ) { // Debug.Log("La deuxième zone monstre est vide"); // playerSide.monsterZone2.monsterPosition.push(this.hand[position]); // playerSide.monsterZone2.monsterPosition[playerSide.monsterZone2.monsterPosition.length - 1].faceMode = monsterFightMode.faceUpAttack; // this.hand.splice(position, 1); // } // else if (playerSide.monsterZone3IsEmpty() == true ) { // Debug.Log("La troisième zone monstre est vide"); // playerSide.monsterZone3.monsterPosition.push(this.hand[position]); // playerSide.monsterZone3.monsterPosition[playerSide.monsterZone3.monsterPosition.length - 1].faceMode = monsterFightMode.faceUpAttack; // this.hand.splice(position, 1); // } // else if (playerSide.monsterZone4IsEmpty() == true ) { // Debug.Log("La quatrième zone monstre est vide"); // playerSide.monsterZone4.monsterPosition.push(this.hand[position]); // playerSide.monsterZone4.monsterPosition[playerSide.monsterZone4.monsterPosition.length - 1].faceMode = monsterFightMode.faceUpAttack; // this.hand.splice(position, 1); // } // else if (playerSide.monsterZone5IsEmpty() == true ) { // Debug.Log("La cinquième zone monstre est vide"); // playerSide.monsterZone5.monsterPosition.push(this.hand[position]); // playerSide.monsterZone5.monsterPosition[playerSide.monsterZone5.monsterPosition.length - 1].faceMode = monsterFightMode.faceUpAttack; // this.hand.splice(position, 1); // } // this.canNormalSummon = false; // } // else if (this.canNormalSummon == false) { // Debug.Log("Vous avez deja fait une invocation normal ce tour"); // } }