View Javadoc
1   /*
2    * Copyright (c) 2022 Kaiserpfalz EDV-Service, Roland T. Lichti.
3    *
4    * This program is free software: you can redistribute it and/or modify
5    * it under the terms of the GNU General Public License as published by
6    * the Free Software Foundation, either version 3 of the License, or
7    * (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program.  If not, see <https://www.gnu.org/licenses/>.
16   */
17  
18  package de.kaiserpfalzedv.rpg.torg.model.core;
19  
20  import com.fasterxml.jackson.annotation.JsonInclude;
21  import lombok.AllArgsConstructor;
22  import lombok.Builder;
23  import lombok.Getter;
24  import lombok.ToString;
25  import lombok.extern.jackson.Jacksonized;
26  import org.eclipse.microprofile.openapi.annotations.media.Schema;
27  
28  import java.util.Set;
29  
30  /**
31   * Armor -- The data for all CharSheet armors (weapons, powers, ...).
32   *
33   * @author klenkes74 {@literal <rlichti@kaiserpfalz-edv.de>}
34   * @since 1.2.0  2021-05-23
35   */
36  @Jacksonized
37  @Builder(toBuilder = true)
38  @AllArgsConstructor
39  @Getter
40  @ToString
41  @JsonInclude(JsonInclude.Include.NON_ABSENT)
42  public class Armor {
43      @Schema(description = "Name of the armor.", minLength = 5, maxLength = 50)
44      private final String name;
45  
46      @Schema(description = "Axiom of this armor.", minItems = 1, maxItems = 1)
47      private final Set<Axiom> axioms;
48  
49      @Schema(description = "This armor limits the dexterity to this value.", nullable = true, minimum = "1", maximum = "30")
50      private final Integer maxDex;
51  
52      @Schema(description = "The armor bonus.")
53      private final Integer bonus;
54  
55      @Schema(description = "If the use of this armor will fatigue the wearer of this armor.")
56      @Builder.Default
57      private final Boolean fatigues = false;
58  }