Ejemplo n.º 1
0
  private void showCharacterInfo() {
    character.println(
        "{cls}{text:bold}{text:magenta}Character{text}: {text:bold}%s{text}", character.getName());

    // start = 5, min = 3, max = 7
    character.println(
        "{text:bold}{text:magenta}Health{text}: {text:bold}%d{text} (min 3, max 7)",
        character.getHealth());

    // start = 5, min = 3, max = 7
    character.println(
        "{text:bold}{text:magenta}Sanity{text}: {text:bold}%d{text} (min 3, max 7)",
        character.getSanity());

    // start = 1, min = 1, max = 3>
    character.println(
        "{text:bold}{text:magenta}Focus{text}: {text:bold}%d{text} (min 1, max 3)",
        character.getFocus());

    character.println(
        "{text:bold}{text:magenta}Items{text}: {text:bold}%s{text}", character.getItemSummary());
    character.println(
        "{text:bold}{text:magenta}Spells{text}: {text:bold}%s{text}", character.getSpellSummary());
    character.println(
        "{text:bold}{text:magenta}Skills{text}: {text:bold}%s{text}", character.getSkillsSummary());
    character.println(
        "{text:bold}{text:magenta}Money{text}: {text:bold}$%d{text}", character.getMoney());
  }
Ejemplo n.º 2
0
 private void moreHealth() {
   if (character.getHealth() < 7) {
     character.incHealth();
     character.decSanity();
   }
 }