package eu.smoser.dungeongenerator.dungeon.objects;

import eu.smoser.dungeongenerator.dungeon.Dungeon;
import eu.smoser.dungeongenerator.util.Dice;

/**
 * Stores information about enemies
 * @author MrMcX
 */
public class Enemy extends ADungeonObject{
    /**
     * Constructs a new random enemy in a given type of room
     * @param type type of environment
     */
    public Enemy(Dungeon.Type type){
        descString = "";
        if(Dungeon.Natural(type)){
            switch(Dice.Roll(20, 1)){
                case 1: 
                    descString = "Höhlendrache";
                    break;
                case 2: 
                case 3:
                case 4:
                case 5: 
                    descString = "verirrter Goblin";
                    break;
                case 6:
                case 7: 
                    descString = "Gruftassel";
                    break;
                case 8: 
                    descString = "Glutling";
                    break;
                case 9:
                case 10: 
                    descString = "Höhlenspinne";
                    break;
                case 11: 
                    descString = Dice.Roll(20, 5) + " Fledermäuse";
                    break;
                case 12: 
                    descString = "Höhlenoger";
                    break;
                case 13:
                case 14:
                case 15:
                case 16: 
                    descString = Dice.Roll(6, 1)*Dice.Roll(20, 1) + " Ratten";
                    break;
                case 17: 
                    descString = "Riesenamöbe";
                    break;
                case 18: 
                    descString = Dice.Roll(6, 1) + " Skelette";
                    break;
                case 19: 
                    descString = "Geistererscheinung eines hier verstorbenen Abenteurers";
                    break;
                case 20: 
                    descString = Dice.Roll(6, 1) + " Wühlschrate";   
                    break;
            }
        } else {
            switch(Dice.Roll(20, 1)){
                case 1:
                case 2:
                case 3: 
                    descString = Dice.Roll(6, 1) + " Einwohner des Systems";
                    break;
                case 4: 
                    descString = Dice.Roll(6, 1) + " Gruftasseln";
                    break;
                case 5:
                case 6: 
                    descString = "Riesenamöbe";
                    break;
                case 7: 
                    descString = "Höhlenhaustiere";
                    break;
                case 8:
                case 9: 
                    descString = Dice.Roll(6, 1) + " Gefangene";
                    break;
                case 10: 
                    descString = "Mumie";
                    break;
                case 11:
                case 12:
                case 13: 
                    descString = Dice.Roll(6, 2) + " Einwohner des Systems";
                    break;
                case 14:
                case 15:
                case 16: 
                    descString = Dice.Roll(6,1) + " Ratten";
                    break;
                case 17:
                case 18: 
                    descString = Dice.Roll(6, 1) + " Skelette";
                    break;
                case 19: 
                    descString = "‚Endgegner‘ der Anlage";
                    break;
                case 20: 
                    descString = Dice.Roll(6, 1) + " gut ausgebildete Wachen der Einwohner";
                    break;
            }
        }
    }
}
