Adds actions to monster cards.

This commit is contained in:
2020-09-01 23:59:12 -07:00
parent db670f3340
commit cbc4fd0389
6 changed files with 242 additions and 112 deletions

View File

@@ -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();
}
}