/*
 * The MIT License
 *
 * Copyright 2016 MrMcX.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package dungeon;

import util.Dice;

/**
 * Stores information about a trap
 * @author MrMcX
 */
public class Trap {

    private String trap;

    /**
     * Constructs a random trap
     */
    public Trap() {
        trap = "";
        switch (Dice.Roll(20, 1)) {
            case 1:
            case 2:
            case 3:
                trap = "getarnte Fallgrube";
                break;
            case 4:
            case 5:
            case 6:
                trap = "getarnte Fallgrube (angespitzte Stäbe/Speere oder Eisenspitzen am Boden)";
                break;
            case 7:
                trap = "Schnur am Boden löst Giftwolke aus.";
                break;
            case 8:
                trap = "Magische Glyphe löst Schadenszauber aus.";
                break;
            case 9:
                trap = "Schnur am Boden löst Steinfall aus.";
                break;
            case 10:
            case 11:
                trap = "Schnur am Boden löst sensenartige Klingen aus.";
                break;
            case 12:
            case 13:
                trap = "Bodenplatte löst schwere Steinkugel aus, die auf die Helden zurollt.";
                break;
            case 14:
            case 15:
                trap = "Bodeplatte löst " + Dice.Roll(6, 1) + " Armbrustbolzen aus.";
                break;
            case 16:
                trap = "Magische Glyphe löst magischen Effekt aus.";
                break;
            case 17:
            case 18:
                trap = "Ein herab fallendes Netz verstrickt die Helden.";
                break;
            case 19:
            case 20:
                trap = "Die Wände bewegen sich auf die Helden zu und drohen sie zu zerquetschen.";
                break;
        }
    }
    @Override
    public String toString() {
        return trap;
    }
}
