1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
32
33
34
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 }