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 java.util.HashMap;
21  
22  import org.eclipse.microprofile.openapi.annotations.media.Schema;
23  
24  import com.fasterxml.jackson.annotation.JsonInclude;
25  
26  import de.kaiserpfalzedv.rpg.torg.model.core.Cosm;
27  import lombok.AllArgsConstructor;
28  import lombok.Builder;
29  import lombok.EqualsAndHashCode;
30  import lombok.Getter;
31  import lombok.ToString;
32  import lombok.extern.jackson.Jacksonized;
33  
34  /**
35   * Possibility --
36   *
37   * @author klenkes74 {@literal <rlichti@kaiserpfalz-edv.de>}
38   * @since 2.0.0  2021-06-06
39   */
40  @Jacksonized
41  @Builder(toBuilder = true)
42  @AllArgsConstructor
43  @Getter
44  @ToString
45  @EqualsAndHashCode
46  @JsonInclude(JsonInclude.Include.NON_ABSENT)
47  @Schema(description = "Possibilities and probability to have possibilities")
48  public class Possibility {
49      @Schema(description = "Number of maximum possibilities of the actor", nullable = true)
50      private final Integer possibilities;
51  
52      @Schema(description = "The probability that the actor has possibilities (need to be checked with D20).", nullable = true)
53      private final Integer probability;
54  
55      @ToString.Exclude
56      @Schema(description = "Different cosms have different possibilities.", nullable = true)
57      @Builder.Default
58      private final HashMap<Cosm, Integer> cosmPossibilities = new HashMap<>();
59  }