@Override
 public boolean process(Creature user) {
   Utils.print("Sorry, but I haven't implemented this power yet.");
   return false;
 }
  public void init() {
    topPanel = new JPanel();
    LayoutManager gridBagLayout = new GridBagLayout();
    Dimension preferredSize = new Dimension();
    preferredSize.setSize(3810, 975);
    topPanel.setPreferredSize(preferredSize);
    topPanel.setLayout(gridBagLayout);
    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.BOTH;

    /* Set up the encounter. */
    // encounter = new KoboldLairOutsideEncounter();

    Encounter.setEncounter(encounter);
    encounter.init();

    partyPanel.init(encounter.getCreatures());
    battlefieldPanel.init(encounter.getMap(), encounter.getCreatures());
    battleMapScrollPane = new JScrollPane();
    Dimension battleMapScrollPaneDimension = new Dimension(1055, 975);
    battleMapScrollPane.setPreferredSize(battleMapScrollPaneDimension);
    battleMapScrollPane.createHorizontalScrollBar();
    battleMapScrollPane.createVerticalScrollBar();
    battleMapScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    battleMapScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    battleMapScrollPane.getVerticalScrollBar().setUnitIncrement(16);

    battleMapScrollPane.add(battlefieldPanel);
    battleMapScrollPane.setViewportView(battlefieldPanel);

    bufferBetweenMonitors = new JPanel();
    Dimension bufferDimension = new Dimension(10, 975);
    bufferBetweenMonitors.setPreferredSize(bufferDimension);

    creatureScrollPane = new JScrollPane();
    Dimension creatureScrollPaneDimension = new Dimension(725, 975);
    creatureScrollPane.setPreferredSize(creatureScrollPaneDimension);
    creatureScrollPane.createHorizontalScrollBar();
    creatureScrollPane.createVerticalScrollBar();
    creatureScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    creatureScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    creatureScrollPane.getVerticalScrollBar().setUnitIncrement(16);

    creatureScrollPane.add(partyPanel);
    creatureScrollPane.setViewportView(partyPanel);

    battleCardsScrollPane = new JScrollPane();
    Dimension battleCardsScrollPaneDimension = new Dimension(1170, 975);
    battleCardsScrollPane.setPreferredSize(battleCardsScrollPaneDimension);
    battleCardsScrollPane.createHorizontalScrollBar();
    battleCardsScrollPane.createVerticalScrollBar();
    battleCardsScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    battleCardsScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    battleCardsScrollPane.getVerticalScrollBar().setUnitIncrement(16);

    battleCardPanel.init();
    battleCardsScrollPane.add(battleCardPanel);
    battleCardsScrollPane.setViewportView(battleCardPanel);

    console = new IntegratedCommandConsole();
    console.addPropertyChangeListener(consolePanel);
    console.setConsolePanel(consolePanel);

    topPanel.add(battleMapScrollPane, c);
    topPanel.add(consolePanel, c);
    topPanel.add(bufferBetweenMonitors, c);
    topPanel.add(creatureScrollPane, c);
    topPanel.add(battleCardsScrollPane, c);
    add(topPanel);

    Utils.setICC(console);
    Utils.setGui(this);
  }
Esempio n. 3
0
 @Override
 public void makeRacialAbilityScoreAdjustments(PlayerCharacter pc, DndClass dndClass) {
   Utils.print("As a Gnome you get +2 to Charisma and Intelligence.");
   setCharismaBonus(getCharismaBonus() + 2);
   setIntelligenceBonus(getIntelligenceBonus() + 2);
 }
 @Override
 public void cast(PlayerCharacter user) {
   Utils.print("Sorry, but I haven't implemented this Ritual yet.");
 }
Esempio n. 5
0
  @Override
  public void makeRaceChoices(PlayerCharacter pc, DndClass dndClass) {
    Utils.print(
        "What is your character's name? From the book it suggests the following male and female names:");
    Utils.print(
        "Male Names: Alston, Alvyn, Brocc, Eldon, Frug, Kellen, Ku, Nim, Orryn, Pock, Sindri, Warryn, Wrenn");
    Utils.print(
        "Female Names: Breena, Carlin, Donella, Ella, Lilli, Lorilla, Nissa, Nyx, Oda, Orla, Roswyn, Tana, Zanna");
    Utils.print("Your name?");
    pc.setName(Utils.getInput());

    Utils.print("What Height is your character?  The book suggests 3' 4\" - 3' 8\" (40\" - 48\")");
    Utils.print("Your choice (in inches):");
    pc.setHeight(Utils.getValidIntInputInRange(0, 200));

    Utils.print("What Weight is your character?  The book suggests 50 - 75 lb");
    Utils.print("Your choice (in pounds):");
    pc.setWeight(Utils.getValidIntInputInRange(0, 1000));

    Utils.print("Setting size to Small.");
    pc.setSize(Size.SMALL);

    Utils.print("Setting speed to 5.");
    pc.setBaseSpeed(5);

    Utils.print("Adding low-light vision to senses.");
    pc.addSense(new Sense(SenseType.LOWLIGHT_VISION));

    pc.addLanguage("Common");
    pc.addLanguage("Elven");

    Utils.print("As a Gnome, you get +2 Arcana and Stealth");
    Skill arcana = pc.getSkill(SkillType.ARCANA);
    arcana.setMisc(arcana.getMisc() + 2);

    Skill stealth = pc.getSkill(SkillType.STEALTH);
    stealth.setMisc(stealth.getMisc() + 2);

    pc.addPower(new FadeAway());

    pc.setOrigin(Origin.FEY);

    // TODO: Master Trickster, Reactive Stealth, Trickster's Cunning.
    Utils.print(
        "NOTE: I have not yet coded Master Trickster, Reactive Stealth, Trickster's Cunning.");
  }