22 package com.realtime.crossfire.jxclient.character;
24 import java.util.ArrayList;
25 import java.util.Collection;
26 import java.util.Collections;
27 import java.util.HashMap;
28 import java.util.List;
30 import org.jetbrains.annotations.NotNull;
54 private final String
msg;
60 private final List<Choice>
choices =
new ArrayList<>();
66 private final Map<Integer, Long>
stats =
new HashMap<>();
76 public ClassRaceInfo(@NotNull
final String archName, @NotNull
final String name, @NotNull
final String msg, @NotNull
final Map<Integer, Long> stats, @NotNull
final Collection<Choice> choices) {
80 this.stats.putAll(stats);
81 this.choices.addAll(choices);
118 return stats.get(statNo);
119 }
catch (
final NullPointerException ignored) {
130 return Collections.unmodifiableList(choices);
139 return "arch="+archName+
", name="+name+
", stats="+stats+
", choices="+
choices;
final String name
The human readable race name.
String getName()
Returns the human readable race name.
String getMsg()
Returns the long description.
final Map< Integer, Long > stats
The stat adjustments.
final String archName
The archetype name.
final List< Choice > choices
The available choices.
List< Choice > getChoices()
Returns the available choices.
long getStatAdjustment(final int statNo)
Returns a stat adjustment.
final String msg
The long description.
ClassRaceInfo(@NotNull final String archName, @NotNull final String name, @NotNull final String msg, @NotNull final Map< Integer, Long > stats, @NotNull final Collection< Choice > choices)
Creates a new instance.
One possible class or race for character creation.
String getArchName()
Returns the archetype name.