Adds actions to monster cards.
This commit is contained in:
@@ -14,6 +14,7 @@ public class Monster {
|
||||
|
||||
public Monster() {
|
||||
mAbilities = new ArrayList<>();
|
||||
mActions = new ArrayList<>();
|
||||
mConditionImmunities = new HashSet<>();
|
||||
mDamageTypes = new HashSet<>();
|
||||
mLanguages = new HashSet<>();
|
||||
@@ -979,4 +980,26 @@ public class Monster {
|
||||
return getProficiencyBonus() + getAbilityModifier(abilityScoreName);
|
||||
}
|
||||
|
||||
public List<String> getActionDescriptions() {
|
||||
ArrayList<String> actions = new ArrayList<>();
|
||||
for (Action action : getActions()) {
|
||||
actions.add(getPlaceholderReplacedText(String.format("__%s__ %s", action.getName(), action.getDescription())));
|
||||
}
|
||||
return actions;
|
||||
}
|
||||
|
||||
private ArrayList<Action> mActions;
|
||||
public List<Action> getActions() {
|
||||
return mActions;
|
||||
}
|
||||
public void addAction(Action ability) {
|
||||
mActions.add(ability);
|
||||
}
|
||||
public void removeAction(Action ability) {
|
||||
mActions.remove(ability);
|
||||
}
|
||||
public void clearActions() {
|
||||
mActions.clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user