public void launchQuest() { foreach (var monster in this.quest.monsters) { FightHandler fightHandler = new FightHandler(MenuHandler.getInstance().hero, monster); fightHandler.startFight(); } MenuHandler.getInstance().returnToMenu(); }
public void talk() { Console.Clear(); Console.WriteLine("Bonjour ! " + MenuHandler.getInstance().hero); Console.WriteLine("Je suis " + this.name + ", j'ai besoin d'aide !"); Console.WriteLine("Acceptes tu " + this.quest.name + " ?"); Console.WriteLine("Il te faudra ..." + quest.description + "( Difficulté: " + this.quest.difficulty + ", nombre de monstres: " + this.quest.monsters.Count + ")"); }
public void ItemSelected() { if (this.name == "Accepter") { this.associatedPnj.launchQuest(); } else if (this.name == "Refuser") { MenuHandler.getInstance().returnToMenu(); } }
static void Main(string[] args) { Console.WriteLine("Bonjour aventurier ! Quel est votre nom ?"); // Hero hero = new Hero(Console.ReadLine()); MenuHandler.getInstance().hero = new Hero(Console.ReadLine()); // FightHandler fm = new FightHandler(hero, new SpiderSwarm()); // fm.startFight(); Loot loot = new Loot(500, 500); Quest quest = new Quest("La colère des orcs", "Exploser beaucoup trop d'araignées en fait... ", 1, loot); Pnj mainPnj = new Pnj("Esteban", 100, 1000, 1000, quest); mainPnj.makeAchoice(); // MenuHandler.getInstance().returnToMenu(); }
public void MenuItemBank(Hero hero) { this.hero = hero; MenuHandler.getInstance().addItemToMenu(new InventoryMenuItem("Voir votre inventaire")); }
public void ItemSelected() { MenuHandler.getInstance().hero.inventory.showInventory(); MenuHandler.getInstance().returnToMenu(); }