public Player InitialyPlayer(int vit, int str, int wis, int inte, string na, int wh, int classP) { Dice dice = new Dice(); int roll = dice.DiceRoll(); Player returnPlayer = null; switch (classP) { case 0: // warrior /* * if (roll % 2 == 0) //if sude * inventoryPlayer = new Sword("Broken Sword", 5, 5); * else //if liche * * inventoryPlayer = new Sword("Straight Sword", 10, 25); * * inventoryListPlayer.Add(inventoryPlayer); //lets add that generated shit into player inventory */ returnPlayer = new Warrior(vit, str, wis, inte, na, wh); //create player as warrior break; case 1: //mage returnPlayer = new Mage(vit, str, wis, inte, na, wh); break; } return(returnPlayer); }
protected Player ChooseOfEnemy(int whoE, Character player) { Player returnEnemy = null; int roll = dice.DiceRoll(); if (roll % 2 == 0) //if sude { returnEnemy = new Warrior(dice.DiceRoll(player.Vitality), dice.DiceRoll(player.Strength), dice.DiceRoll(player.Wisdom), dice.DiceRoll(player.Inteligence), "Ferda", whoE); } else //if liche { returnEnemy = new Mage(dice.DiceRoll(player.Vitality), dice.DiceRoll(player.Strength), dice.DiceRoll(player.Wisdom), dice.DiceRoll(player.Inteligence), "Janko", whoE); } return(returnEnemy); }