JScratch
Loading...
Searching...
No Matches
ClassFeature.java
Go to the documentation of this file.
1package com.burrbox.dndiablo;
2
3public class ClassFeature {
4 public String name;
5 public String description;
6 public int levelUnlocked;
7
8 // --- Usage Logic ---
9 public boolean isActive; // True if it's a button you press (Action), False if it's a Passive
10 public int maxUses; // For features like "Rage" or "Second Wind" (0 if infinite)
11 public int currentUses;
12
13 // Resource Recovery
14 // In D&D, some things reset on a "Short Rest" (1 hour) and some on a "Long Rest" (8 hours)
15 public boolean resetsOnShortRest;
16
17 // --- Action Mechanics (Simplified for Dndiablo) ---
18 public String actionType; // e.g., "Buff", "Attack", "Heal", "Utility"
19 public int effectValue; // e.g., A "Second Wind" heal might be 10, a "Rage" bonus might be 2
20 public String diceRoll; // e.g., "1d10 + 5" for dynamic calculation
21
22 public ClassFeature(String name, String description, int levelUnlocked) {
23 this.name = name;
24 this.description = description;
25 this.levelUnlocked = levelUnlocked;
26 }
27}
ClassFeature(String name, String description, int levelUnlocked)