Difference between revisions of "Template:Data mathFormula"
(updating thorn lash math formula) |
FeralKitty (talk | contribs) (1.6+399 Edina Gramling) |
||
Line 2: | Line 2: | ||
| Bash = Damage: (((1d4+3)+(((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)*0.5)*(1+self.theme_tree_upgrade)))+self.theme_tree_upgrade)+target.distanceTo.targetTile<!-- assets/data/effects/attack/treeArmBash.json --> | | Bash = Damage: (((1d4+3)+(((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)*0.5)*(1+self.theme_tree_upgrade)))+self.theme_tree_upgrade)+target.distanceTo.targetTile<!-- assets/data/effects/attack/treeArmBash.json --> | ||
| Bear Hug = Damage: ((1d3+2)+attacker.PHYSICAL_DAMAGE_BONUS)+attacker.POTENCY<!-- assets/data/effects/bear/bearHug.json --> | | Bear Hug = Damage: ((1d3+2)+attacker.PHYSICAL_DAMAGE_BONUS)+attacker.POTENCY<!-- assets/data/effects/bear/bearHug.json --> | ||
| Bite = Damage: | | Bite = Damage: ((2+1d3)+(((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)*0.5)*(1+self.theme_wolf_upgradeBite)))+self.theme_wolf_upgradeBite<!-- assets/data/effects/attack/wolfBiteMelee.json --> | ||
| Bitter Scratch = Damage: max(1,(floor(((attacker.PHYSICAL_DAMAGE_BONUS+attacker.POTENCY)/2))-1))<!-- assets/data/effects/attack/skeletalShred.json --> | | Bitter Scratch = Damage: max(1,(floor(((attacker.PHYSICAL_DAMAGE_BONUS+attacker.POTENCY)/2))-1))<!-- assets/data/effects/attack/skeletalShred.json --> | ||
| Chain Lightning = Damage: (3+ceil(((((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)*0.5)*(1+self.theme_storm_upgrade))/1)))+self.theme_storm_upgrade<!-- assets/data/effects/storm/chainLightningUpgrade.json --> | | Chain Lightning = Damage: (3+ceil(((((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)*0.5)*(1+self.theme_storm_upgrade))/1)))+self.theme_storm_upgrade<!-- assets/data/effects/storm/chainLightningUpgrade.json --> | ||
Line 20: | Line 20: | ||
| Invigoration = Health: 2+floor(((attacker.PHYSICAL_DAMAGE_BONUS+attacker.POTENCY)/2))<!-- assets/data/effects/green/greenArm_invigoration.json --> | | Invigoration = Health: 2+floor(((attacker.PHYSICAL_DAMAGE_BONUS+attacker.POTENCY)/2))<!-- assets/data/effects/green/greenArm_invigoration.json --> | ||
| Jumpjolt = Damage: (3+ceil(((((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)*0.5)*(1+self.theme_storm_upgrade))/1)))+self.theme_storm_upgrade<!-- assets/data/effects/storm/chainLightning.json --> | | Jumpjolt = Damage: (3+ceil(((((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)*0.5)*(1+self.theme_storm_upgrade))/1)))+self.theme_storm_upgrade<!-- assets/data/effects/storm/chainLightning.json --> | ||
| Peck = Damage: | | Peck = Damage: (1+1d3)+floor(((attacker.PHYSICAL_DAMAGE_BONUS+attacker.POTENCY)/2))<!-- assets/data/effects/attack/crowPeckMelee.json --> | ||
| Scratch and Claw = Damage: ((1d3+4)+(((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)*0.5)*(1+self.theme_crow_upgrade)))+self.theme_crow_upgrade<!-- assets/data/effects/attack/crowArmFrenzy.json --> | | Scratch and Claw = Damage: ((1d3+4)+(((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)*0.5)*(1+self.theme_crow_upgrade)))+self.theme_crow_upgrade<!-- assets/data/effects/attack/crowArmFrenzy.json --> | ||
| Shooting Star = Damage: ((1d5+((0.5*(self.PHYSICAL_DAMAGE_BONUS+self.POTENCY))*(1+self.theme_star_upgrade)))+self.theme_star_upgrade)-self.throughShotTargetNum<!-- assets/data/effects/attack/shootingStar.json --> | | Shooting Star = Damage: ((1d5+((0.5*(self.PHYSICAL_DAMAGE_BONUS+self.POTENCY))*(1+self.theme_star_upgrade)))+self.theme_star_upgrade)-self.throughShotTargetNum<!-- assets/data/effects/attack/shootingStar.json --> | ||
| Skunk Spray = Poison: 1+floor((attacker.POTENCY/3))<!-- assets/data/effects/attack/skunkTailSpray.json --> | | Skunk Spray = Poison: (1+floor((attacker.POTENCY/3)))+(self.theme_skunk_upgrade*2)<!-- assets/data/effects/attack/skunkTailSpray.json --> | ||
| Splinterskin = 1<!-- assets/data/effects/attack/treeThemeSplinterskin.json --> | | Splinterskin = 1<!-- assets/data/effects/attack/treeThemeSplinterskin.json --> | ||
| Static Shock = 2<!-- assets/data/effects/storm/staticShock_returnsDamage.json --> | | Static Shock = 2<!-- assets/data/effects/storm/staticShock_returnsDamage.json --> | ||
| Sting = Damage: (1+1d2)+floor(((attacker.PHYSICAL_DAMAGE_BONUS+attacker.POTENCY)/2))<!-- assets/data/effects/attack/scorpionTailStab.json --> | | Sting = Damage: ((1+1d2)+floor(((attacker.PHYSICAL_DAMAGE_BONUS+attacker.POTENCY)/2)))+self.theme_scorpion_upgrade<!-- assets/data/effects/attack/scorpionTailStab.json --> | ||
| Stone Claw = Damage: (1d5+attacker.PHYSICAL_DAMAGE_BONUS)+attacker.POTENCY<!-- assets/data/effects/attack/stoneClaw.json --> | | Stone Claw = Damage: (1d5+attacker.PHYSICAL_DAMAGE_BONUS)+attacker.POTENCY<!-- assets/data/effects/attack/stoneClaw.json --> | ||
| Strike = Damage: (4+(((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)*0.5)*(1+self.theme_skeleton_upgrade)))+self.theme_skeleton_upgrade<!-- assets/data/effects/attack/skeletonKingDaggerAttack.json --> | | Strike = Damage: (4+(((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)*0.5)*(1+self.theme_skeleton_upgrade)))+self.theme_skeleton_upgrade<!-- assets/data/effects/attack/skeletonKingDaggerAttack.json --> | ||
| Swipes = Damage: ((1d3+3)+((0.5*(self.PHYSICAL_DAMAGE_BONUS+self.POTENCY))*(1+self.theme_bear_upgrade)))+self.theme_bear_upgrade<!-- assets/data/effects/bear/bearArmSwipe.json --> | | Swipes = Damage: ((1d3+3)+((0.5*(self.PHYSICAL_DAMAGE_BONUS+self.POTENCY))*(1+self.theme_bear_upgrade)))+self.theme_bear_upgrade<!-- assets/data/effects/bear/bearArmSwipe.json --> | ||
| Thorn Lash = Damage: | | Thorn Lash = Damage: (1d3+(((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)*0.5)*(1+self.theme_vine_upgrade)))+self.theme_vine_upgrade<!-- assets/data/effects/vine/vineArmThornLash.json --> | ||
| Thunder Stomp = Range: ((0.6+(self.POTENCY/3))+self.themePiece_storm_rightLeg)+self.themePiece_storm_leftLeg<!-- assets/data/effects/storm/thunderStompAttack.json --> | | Thunder Stomp = Range: ((0.6+(self.POTENCY/3))+self.themePiece_storm_rightLeg)+self.themePiece_storm_leftLeg<!-- assets/data/effects/storm/thunderStompAttack.json --> | ||
| Witherbolt = Initial Damage: ceil((1+(((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)/4)*(1+self.theme_green_upgrade))))+self.theme_green_upgrade<!-- assets/data/effects/green/greenArm_witherbolt.json --> | | Witherbolt = Initial Damage: ceil((1+(((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)/4)*(1+self.theme_green_upgrade))))+self.theme_green_upgrade<!-- assets/data/effects/green/greenArm_witherbolt.json --> |
Revision as of 17:30, 4 March 2022
- This documentation is transcluded from Template:Data mathFormula/doc
This template is used by the game data process to help automatically keep pages up-to-date.
Warning: Manually editing this template data may cause your changes to be overwritten or lost if the template is automatically updated. If specific game data is missing from this template, please ask about it on the Discord #wiki channel (to arrange for its data to automatically be added to these templates).
Usage
This template returns the (math) formula for a specific theme ability. A future update will add hero abilities.
The template uses the following parameter:
- 1
- The name associated with the specific math formula.
Examples
Theme ability math formula
{{Data mathFormula|Bash}}
Damage: (((1d4+3)+(((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)*0.5)*(1+self.theme_tree_upgrade)))+self.theme_tree_upgrade)+target.distanceTo.targetTile
Hero ability math formula (to be added)
{{Data mathFormula|Shieldshear}}
(No math formula is returned, as this hero ability data has not been added yet to the template.)
Technical details
Math formula data comes from Wildermyth's.json
files. For example, assets/data/effects/attack/morthagiArmHammer.json
includes the following line:
"amount": "(((1d4+3)+(((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)*0.5)*(1+self.theme_morthagi_upgrade)))+self.theme_morthagi_upgrade)+target.distanceTo.targetTile"
This shows the actual formula used to calculate the damage amount, based on the hero's Bonus Damage, Potency, and whether the morthagi theme has been upgraded or not.
Note: An expression like self.theme_morthagi_upgrade evaluates to 0 if that aspect does not exist (i.e., the theme is not upgraded), or (the aspect value of) 1.0 if that aspect does exist.
{{Formulas | damage = {{Data mathFormula|Hammer}} }}
Formulas |
Damage: (((1d4+3)+(((self.PHYSICAL_DAMAGE_BONUS+self.POTENCY)*0.5)*(1+self.theme_morthagi_upgrade)))+self.theme_morthagi_upgrade)+target.distanceTo.targetTile |
See Formulas Guide for help with math functions. |