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   * AttackData -- The data for all CharSheet attacks (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 Attack {
43      @Schema(description = "Name of the attack.", minLength = 5, maxLength = 50)
44      private final String name;
45  
46      @Schema(description = "Up to 2 axioms for this attack.", minItems = 1, maxItems = 2)
47      private final Set<Axiom> axioms;
48  
49      @Schema(description = "Minimal strength to use this attack.", nullable = true, minimum = "1", maximum = "30")
50      private final Integer minStr;
51  
52      @Schema(description = "The damage dealt by this attack.")
53      private final Damage damage;
54  
55      @Schema(description = "Ammunition in a ranged weapon (e.g. 1 for a bow or 6 for a colt.", nullable = true)
56      private final Integer ammunition;
57  
58      @Schema(description = "The armor piercing value of this attack.", nullable = true, minimum = "0")
59      private final Integer ap;
60  
61      @Schema(description = "The range of the attack.", nullable = true, minLength = 1, maxLength = 20)
62      private final String range;
63  
64      @Schema(description = "The skill used for this attack.")
65      private final Skill skill;
66      private final Integer skillLevel;
67  
68      @Schema(description = "The attack is a power and not an item.", nullable = true)
69      private final AttackPower power;
70  
71      private final String attackNote;
72      private final String damageNote;
73  }