All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.softwaremagico.tm.random.predefined.characters.Npc Maven / Gradle / Ivy

There is a newer version: 0.10.5
Show newest version
package com.softwaremagico.tm.random.predefined.characters;

/*-
 * #%L
 * Think Machine (Random Generator)
 * %%
 * Copyright (C) 2017 - 2021 Softwaremagico
 * %%
 * This software is designed by Jorge Hortelano Otero. Jorge Hortelano Otero
 *  Valencia (Spain).
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; If not, see .
 * #L%
 */

import com.softwaremagico.tm.character.benefices.AvailableBenefice;
import com.softwaremagico.tm.character.benefices.BeneficeDefinition;
import com.softwaremagico.tm.character.blessings.Blessing;
import com.softwaremagico.tm.character.characteristics.Characteristic;
import com.softwaremagico.tm.character.equipment.armours.Armour;
import com.softwaremagico.tm.character.equipment.shields.Shield;
import com.softwaremagico.tm.character.equipment.weapons.Weapon;
import com.softwaremagico.tm.character.factions.Faction;
import com.softwaremagico.tm.character.occultism.OccultismPath;
import com.softwaremagico.tm.character.races.Race;
import com.softwaremagico.tm.character.skills.AvailableSkill;
import com.softwaremagico.tm.random.predefined.IRandomPredefined;
import com.softwaremagico.tm.random.predefined.RandomPredefined;
import com.softwaremagico.tm.random.selectors.IRandomPreference;

import java.util.HashSet;
import java.util.Set;

public class Npc extends RandomPredefined implements IRandomPredefined {
    private final Set mandatoryWeapons;
    private final Set mandatoryArmours;
    private final Set mandatoryShields;

    public Npc(String id, String name, String description, String language, String moduleName,
               Set> randomPreferences, Set characteristicsMinimumValues,
               Set requiredSkills, Set suggestedSkills,
               Set mandatoryBlessings, Set suggestedBlessings,
               Set mandatoryBenefices, Set suggestedBenefices,
               Set mandatoryBeneficeSpecializations, Set suggestedBeneficeSpecializations,
               Set mandatoryOccultismPaths, Faction faction, Race race, String group) {
        super(id, name, description, language, moduleName, randomPreferences, characteristicsMinimumValues, requiredSkills,
                suggestedSkills, mandatoryBlessings, suggestedBlessings, mandatoryBenefices, suggestedBenefices,
                mandatoryBeneficeSpecializations, suggestedBeneficeSpecializations, mandatoryOccultismPaths, faction, race, group);
        this.mandatoryWeapons = new HashSet<>();
        this.mandatoryArmours = new HashSet<>();
        this.mandatoryShields = new HashSet<>();
    }

    public Npc(String id, String name, String description, String language, String moduleName, String group) {
        this(id, name, description, language, moduleName, new HashSet<>(), new HashSet<>(), new HashSet<>(), new HashSet<>(),
                new HashSet<>(), new HashSet<>(), new HashSet<>(), new HashSet<>(), new HashSet<>(), new HashSet<>(), new HashSet<>(),
                null, null, group);
    }

    public void addMandatoryWeapons(Set weapons) {
        mandatoryWeapons.addAll(weapons);
    }

    public void addMandatoryArmours(Set armours) {
        mandatoryArmours.addAll(armours);
    }

    public void addMandatoryShields(Set shields) {
        mandatoryShields.addAll(shields);
    }

    @Override
    public Set getMandatoryWeapons() {
        return mandatoryWeapons;
    }

    @Override
    public Set getMandatoryArmours() {
        return mandatoryArmours;
    }

    @Override
    public Set getMandatoryShields() {
        return mandatoryShields;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy