View Javadoc
1   /*
2    * Copyright (c) 2021 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.actors;
19  
20  import org.eclipse.microprofile.openapi.annotations.media.Schema;
21  
22  import com.fasterxml.jackson.annotation.JsonInclude;
23  
24  import de.kaiserpfalzedv.rpg.torg.model.core.Skill;
25  import lombok.AllArgsConstructor;
26  import lombok.Builder;
27  import lombok.EqualsAndHashCode;
28  import lombok.Getter;
29  import lombok.ToString;
30  import lombok.extern.jackson.Jacksonized;
31  
32  /**
33   * SkillValue -- A single skill of a character/npc or threat.
34   *
35   * @author klenkes74 {@literal <rlichti@kaiserpfalz-edv.de>}
36   * @since 1.2.0  2021-05-23
37   */
38  @Jacksonized
39  @Builder(toBuilder = true)
40  @AllArgsConstructor
41  @Getter
42  @ToString
43  @EqualsAndHashCode
44  @JsonInclude(JsonInclude.Include.NON_ABSENT)
45  @Schema(description = "A single skill with its values")
46  public class SkillValue {
47      @Schema(description = "Name of the skill to use.")
48      private final Skill name;
49  
50      @ToString.Exclude
51      @Schema(description = "The adds of this skill", nullable = true)
52      private final Integer adds;
53  
54      @ToString.Exclude
55      @Schema(description = "The bonus to the skill", nullable = true)
56      private final Integer bonus;
57  
58      @Schema(description = "The total value of this skill", nullable = true)
59      private final Integer value;
60  
61      @Schema(description = "If the skill is favoured", nullable = true)
62      private final Boolean favoured;
63  }