-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
60 additions
and
28 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...ear-comparer.spec.ts-snapshots/import-gear-ocr-fills-in-correct-gear-1-chromium-linux.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4 star gear:Physical Resistance: 0 rollsAttack: 2 rolls, strength: 88%Physical Attack: 2 rolls, strength: 50%Volt Attack: 0 rollsor5 star gear:Physical Resistance: 0 rollsAttack: 2 rolls, strength: 88%Physical Attack: 3 rolls, strength: 11%Volt Attack: 0 rollsor5 star gear:Physical Resistance: 0 rollsAttack: 3 rolls, strength: 36%Physical Attack: 2 rolls, strength: 50%Volt Attack: 0 rolls | ||
4 star gear:Physical Resistance: 0 rollsAttack: 2 rollsAverage strength of each roll: 88%. Total weighting: 185%Physical Attack: 2 rollsAverage strength of each roll: 50%. Total weighting: 140%Volt Attack: 0 rollsor5 star gear:Physical Resistance: 0 rollsAttack: 2 rollsAverage strength of each roll: 88%. Total weighting: 185%Physical Attack: 3 rollsAverage strength of each roll: 11%. Total weighting: 140%Volt Attack: 0 rollsor5 star gear:Physical Resistance: 0 rollsAttack: 3 rollsAverage strength of each roll: 36%. Total weighting: 185%Physical Attack: 2 rollsAverage strength of each roll: 50%. Total weighting: 140%Volt Attack: 0 rolls |
2 changes: 1 addition & 1 deletion
2
...gear-comparer.spec.ts-snapshots/import-gear-ocr-fills-in-correct-gear-1-firefox-linux.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4 star gear:Physical Resistance: 0 rollsAttack: 2 rolls, strength: 88%Physical Attack: 2 rolls, strength: 50%Volt Attack: 0 rollsor5 star gear:Physical Resistance: 0 rollsAttack: 2 rolls, strength: 88%Physical Attack: 3 rolls, strength: 11%Volt Attack: 0 rollsor5 star gear:Physical Resistance: 0 rollsAttack: 3 rolls, strength: 36%Physical Attack: 2 rolls, strength: 50%Volt Attack: 0 rolls | ||
4 star gear:Physical Resistance: 0 rollsAttack: 2 rollsAverage strength of each roll: 88%. Total weighting: 185%Physical Attack: 2 rollsAverage strength of each roll: 50%. Total weighting: 140%Volt Attack: 0 rollsor5 star gear:Physical Resistance: 0 rollsAttack: 2 rollsAverage strength of each roll: 88%. Total weighting: 185%Physical Attack: 3 rollsAverage strength of each roll: 11%. Total weighting: 140%Volt Attack: 0 rollsor5 star gear:Physical Resistance: 0 rollsAttack: 3 rollsAverage strength of each roll: 36%. Total weighting: 185%Physical Attack: 2 rollsAverage strength of each roll: 50%. Total weighting: 140%Volt Attack: 0 rolls |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
export interface RollCombination { | ||
numberOfRolls: number; | ||
rollStrength: number | undefined; | ||
|
||
/** The average strength of each roll between the min roll value and the max roll value. | ||
* | ||
* i.e. For one roll, if rolled the min roll value, the strength is 0. If rolled the max roll value, the strength is 1. | ||
* | ||
* e.g. if min roll value is 100, max roll value is 200, and a roll is 150, then the strength of that roll is 0.5. */ | ||
rollStrength: number; | ||
|
||
/** This is the sum of (the strength of each roll between 0 and the max roll value). | ||
* | ||
* This value is used to compare which stat rolled "higher" | ||
* | ||
* Slightly different calculation from the `rollStrength` property in that the `rollStrength` property normalizes the strength to be relative to the range of the min roll value and the max roll value, instead of 0 and the max roll value. | ||
* | ||
* e.g. max roll value = 100. First roll is 50, strength is 0.5. Second roll is 75, strength is 0.75. Total weight is 0.5 + 0.75 = 1.25 | ||
* | ||
* Note that since we are unlikely to know the value of each roll, this is calculated by using the average strength of a single roll multiplied by the number of rolls | ||
*/ | ||
totalRollWeight: number; | ||
} | ||
|
||
export function zeroRollCombination(): RollCombination { | ||
return { numberOfRolls: 0, rollStrength: undefined }; | ||
return { numberOfRolls: 0, rollStrength: 0, totalRollWeight: 0 }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters