How to Estimate Expected Value and Bounds for a C6 Resource-Refund Mechanic
This article explains how to estimate attack counts for a sixth-constellation resource-refund effect when the skill text does not state pity or rising odds. It covers independent rolls versus memory, a resource state model, per-round expectation, natural energy and a time cap, hard bounds, Monte Carlo simulation, and checks against theory.
1. First check whether the effect has memory
When an effect fails several times in a row, many players feel that the next attempt is “due.” That intuition is wrong for independent random rolls. Before analyzing a C6 effect, confirm whether it has memory: whether past results change later probabilities.
2. Independent rolls versus rising pity
Independent randomness means every check uses a fixed probability again. The previous result does not affect the next one. If a hit refunds a resource with probability 34%, the next hit is still 34% whether the recent streak was success or failure.
Non-independent randomness means history changes later odds. Common forms are: probability rises after each failure, a guaranteed trigger after a set number of attempts, or at least one trigger inside a fixed cycle. Those rules are usually written in the skill or talent text.
This analysis assumes the skill text does not state pity or increasing odds, so rolls are treated as independent. If the text says otherwise, use the matching model.
With (p=0.34), the chance of five refunds in a row failing is:
[
0.66^5\approx12.52\%
]
That figure is only the probability of a failure streak. It does not raise the trigger chance on the fifth attempt. The fifth attempt is still 34%.
3. Abstract the C6 effect as a resource model
For calculation, write the mechanic as these rules:
- Each attack spends 1 resource. You start with 5, and the cap is also 5.
- Each attack has a 34% chance to refund 1 resource.
- The attack interval is 0.27 seconds.
- When an attack spends the last resource of the round, the round ends immediately.
- Even if that last hit triggers a refund, the round does not continue.
- The first natural energy gain of a round occurs sometime between 0 and 1.5 seconds, and at most once per round.
- The test window is 120 seconds and contains 12 rounds.
The critical rule is that the last hit cannot extend the round. Overflow also matters: if a refund triggers while resources are already full, the resource count does not increase, so the real gain depends on how full the bar is when the refund hits.
4. Expected attacks per round
Ignore natural energy and the time limit first, and look at one round only.
Going from 5 resources down to 1 requires 4 non-refunds. At 1 resource, the next attack spends the last point and the round ends, whether or not that hit refunds. So attacks in one round equal “attacks needed to get 4 non-refunds” plus 1.
Let (T) be the number of attacks needed to obtain 4 non-refunds. (T) follows a negative binomial distribution, so:
[
E[T]=\frac{4}{0.66}\approx6.06,\qquad E[N]=E[T]+1\approx7.06
]
A common shortcut is (5/0.66\approx7.58). That formula assumes the round ends on the fifth non-refund, which does not match the rules. The two models compare as follows:
| Model | Round ends when | Expected attacks per round | Expected attacks over 12 rounds |
|---|---|---|---|
| Incorrect: negative binomial with r=5 | 5 non-refunds occur | 7.58 | 90.91 |
| Correct: resource state machine | One more attack after resources fall to 1 | 7.06 | 84.73 |
The distribution of attacks in one round makes the same point. The chance of exactly 5 attacks is (0.66^4\approx18.97\%). The chance of exactly 6 attacks is about (4\times0.66^4\times0.34\approx25.79\%).
The value 7.06 excludes natural energy and the 120-second limit. Use it only as a baseline.
5. Natural energy and the time limit
Natural energy only adds resources. It does not shorten a round. After adding it, the average attack count cannot fall below 7.06. How much it rises has to be measured by simulation.
The time limit is a separate bound. Attack times are (t_k=0.27k), and only attacks with (t_k<120) count. Because (120/0.27\approx444.44), (k) runs from 0 to 444, which is 445 attack times. No matter how much resource is available, 120 seconds can contain at most 445 attacks.
Actual attacks can be written as:
[
N{\text{actual}}=\min(N{\text{resource}},N{\text{time}}),\qquad N{\text{time}}=445
]
In this model, the resource-limited count is usually smaller. The time cap matters only when the trigger rate is very high, energy returns early, or rounds chain together tightly.
6. Theoretical lower and upper bounds
Lower bound: each round needs at least 4 non-refunds plus 1 more hit, so at least 5 attacks per round. Twelve rounds total at least 60 attacks, provided those 60 attacks (about 16.2 seconds) fit inside 120 seconds. If rounds also wait extra time between them, include that wait and recalculate.
Upper bound: the resource model itself has no finite ceiling, because if every hit refunds, resources stay at 5. The real ceiling comes from time: 445 attack times.
So in this model:
[
60\le N_{\text{actual}}\le445
]
Those are hard bounds, but the range is too wide. The actual distribution needs Monte Carlo simulation.
7. Monte Carlo pseudocode and boundary rules
Agree on three rules before simulating: check natural energy before the attack, and at most once per round; count an attack only if its time is (t<120); store time on an integer scale, for example 0.01 seconds per tick, so 0.27 seconds is 27 ticks and 120 seconds is 12000 ticks, which avoids floating-point error.
total_attacks = 0repeat M times (M is the number of simulations):current_time = 0attacks_this_run = 0repeat 12 rounds:resource = 5energy_time = uniform random in [0, 1.5]energy_used_this_round = falseround_start = current_timewhile resource > 0 and current_time < 120:if not energy_used_this_round and current_time - round_start >= energy_time:resource = min(resource + 1, 5)energy_used_this_round = trueattacks_this_run += 1resource -= 1if resource > 0 and random() < 0.34:resource = min(resource + 1, 5)current_time += 0.27total_attacks += attacks_this_runmean_attacks = total_attacks / M
In this pseudocode, when resources fall to 0 there is no refund check and the round ends. That is how “the last hit cannot extend the round” is implemented.
8. How to check the simulation
First, turn off natural energy and the time limit, and keep only the resource cap and the continuation rule. The expected attacks per round should be close to 7.06, and the expected total over 12 rounds should be close to 84.73.
The variance of attacks in one round is (4\times0.34/0.66^2\approx3.12), so the standard deviation is about 1.77. Over 12 rounds the standard deviation is about (\sqrt{12}\times1.77\approx6.12). If you simulate (M) times, the standard error of the mean is about (6.12/\sqrt{M}). At 10,000 runs that is about 0.06; at 1,000,000 runs it is about 0.006. If the simulated mean is far from theory relative to that standard error, the usual bugs are resource-spend order, handling of the last hit, or where the roll is placed.
Second, test boundary cases one by one:
- C6 always fails: each round should be exactly 5 attacks.
- C6 always succeeds: resources stay at 5 until the 120-second cutoff.
- Natural energy arrives at 0 seconds or at 1.5 seconds.
- A refund on the last hit must not continue the round.
- A refund while resources are full must not push the count above 5.
- The last attack time sits just under 120 seconds.
Third, report the distribution, not only the mean. Record the minimum, maximum, median, 5th percentile, 95th percentile, and standard deviation. The average describes the long-run expectation. Percentiles describe the swing you can see in a single fight.
Fourth, if you have combat logs, compare recorded attack counts with the simulated distribution. With a small sample, a single log can easily land in the tail. That does not by itself disprove the model.
9. Conclusion
For a C6 effect with no stated pity or rising odds, start by treating rolls as independent. A failure streak does not raise the next trigger chance. Extreme short-run results are normal variance.
In this model, the result is set by five conditions together: 5 starting resources, a 34% refund chance, a 0.27-second attack interval, one natural energy gain per round, and the rule that the last hit cannot extend the round. Estimating with “resources times a refund multiplier” misses the cap and the ending rule.
A more reliable order of analysis is:
- Confirm whether the random mechanism is independent.
- Fix the order of spending and refunding resources.
- Compute the simplified expectation, the theoretical floor, and the time ceiling separately.
- Use Monte Carlo simulation to get the full distribution.
- Check the program with boundary tests and theoretical values.
- Only then convert attack counts into damage or energy gain.
The same method applies to any combat mechanic that refunds a resource by chance, extends an attack chain by chance, or makes several independent checks.
