Combat Variables
Combat in CryptoBlades utilizes a set of variables calculated from the NFT data the player owns. These variables are outlined as follows.
- Unaligned Character Power is calculated using the character's current level, and the selected weapon without considering any elemental matching.
- Aligned Character Power calculated the same as above, except it takes into account if any attributes match the character's element, or if the attribute is PWR.
- Trait Bonus is calculated by checking the element of the character and evaluating if it is strong, neutral, or weak against the chosen enemy's element.
- Enemy Power
Elemental Matching
Choosing an enemy that you have an elemental advantage against, comparing a weapon's element to your character, and comparing a weapon's attributes to your character are the three considerations in regards to elemental matching.
Based on the formulas for combat, we can make several key definitive statements.
- Matching elements is important for win rate and experience gain calculations.
- Matching elements is NOT important in calculating enemy power range.
Formulas
Combat starts by determining the Unaligned Character Power and using that to determine the range of enemies to choose from.
Once the Unaligned Character Power has been determined the game takes that value and applies a ±10% to determine the range of possible enemy power values.
- NOTE: This ±10% means you will never receive an enemy that is impossible to beat, though you might be hard pressed to win against an enemy if you don't have the advantage of elemental matching on your side.
The player then proceeds to choose an enemy to fight and confirms the transaction. The contract calculates for the player's Aligned Character Power and Trait Bonus and uses those values to determine the player's combat roll and the experience gained on victory.
The player's roll is calculated by multiplying Aligned Character Power with Trait Bonus and applying a ±10%.
The enemy's roll is calculated by taking their listed power value and applying a ±10%.
If the player's roll is equal to or greater than the enemy's roll, they win the fight. Experience and SKILL payouts can then be calculated.
Calculating Power
Unaligned Character Power
Unaligned Character Power is the variable used to determine the range of enemy power rolls.
The required variables to calculate this are the following:
Variable |
Description |
Character Power |
Character Power is the listed power displayed on the upper left-hand side of the screen above the stamina bar when a character is selected. |
Weapon Attribute Base |
Weapon Attribute Base is the sum of all the weapon's attribute values without taking into consideration elemental matching. |
Weapon Bonus Power |
Weapon Bonus Power is the listed bonus power value if the weapon has been reforged. |
The current formula to calculate for unaligned power is
unalignedPower=(((attributeTotal∗0.0025)+1)∗charPower)+bonusPower
Let's do a sample calculation assuming the following values below:
Unaligned Power comes out at 4500. Minimum Enemy Power is 4500 * 0.9 rounded down to 4050. Maximum Enemy Power is 4500 * 1.1 rounded down to 4950. |
Aligned Character Power
Aligned Character Power is the variable used in determining the player's combat roll in conjunction with Trait Bonus.
The required variables to calculate this are similar to Unaligned Character Power above but instead of Weapon Attribute Base, Aligned Character Power uses Weapon Attribute Multiplied.
Instead of the formula simply summing up all the weapon's attributes, we instead evaluate each attribute separately and apply the following calculations to determine their value:
- if attributeElement != charElement (attributeValue * 0.0025)
- if attributeElement == PWR (attributeValue * 0.002575)
- if attributeElement == charElement (attributeValue * 0.002675)
Once each attribute has been evaluated, they get totaled and used in the same formula as unaligned power to get the aligned power.
alignedPower=((evaluatedAttributeTotal+1)∗charPower)+bonusPower
Let's do another sample calculation assuming the following values below:
Aligned Power comes out to 4570. |
Trait Bonus
Trait Bonus is a variable multiplied to Aligned Power and used to determine the player's combat roll.
The formula to determine Trait Bonus is outlined below.
- TraitBonus = 1
- if charElement == weaponElement (TraitBonus += 0.075)
- if charElement > enemyElement (TraitBonus += 0.075)
- if charElement < enemyElement (TraitBonus -= 0.075)
The elemental advantage in regards to character against enemy is as follows:
- Fire beats Earth
- Earth beats Lightning
- Lightning beats Water
- Water beats Fire
Trait Bonus gets evaluated and then multiplied with Aligned Power to get the player's final power value.
A ±10% is then applied to the final value to determine the player's combat roll.
Taking the Aligned Power calculated above, let's assume the following variables:
Trait Bonus comes out to 1.075. Final Power Value after applying Trait Bonus to the Aligned Power above is 4912. Minimum Player Roll is 4912 * 0.9 rounded down to 4420. |