Cryptoblades Fighting and Combat Guide

Bantillo

Elite Gamer
Nov 4, 2018
170
7
18
Visit site
Combat serves as the primary source of gaining SKILL through the use of your character and weapon NFTs. Fighting consists of the player selecting a character and a weapon, and selecting an enemy from a randomized set based on your calculated power.

After the player has selected their enemy, the contract calculates on-chain the randomized player and enemy rolls and determines a victory if the player's roll is equal to or higher than the enemy's roll.

A victorious fight results in a experience payout to your character, and a SKILL payout to your in-game wallet.

A defeat results in a loss of the gas fees paid.

Combat Formula​


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 is the listed power value of the chosen enemy, and is used in determining the enemy's combat roll and the rewards payout.
Using the above information, we can draw several conclusions for CryptoBlades combat that are written out below.

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.
  • Matching elements is NOT important in calculating SKILL payout.

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.

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) +bonusPowerunalignedPower=(((attributeTotal∗0.0025)+1)∗charPower)+bonusPower

After we calculate for unaligned power, we apply a ±10% to determine the range of values that the enemy power values might be.

Let's do a sample calculation assuming the following values below:
  • Character Power - 1000 (a level one character)
  • Attribute Total - 800 (a max attribute 4-star weapon)
  • Bonus Power - 1500 (a 100/100 LB, 0/25 4B, 0/10 5B weapon)
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.Weapon Attribute Base is the sum of all the weapon's attribute values without taking into consideration elemental matching.

Aligned Character Power uses

Weapon Attribute Multiplied.Weapon Attribute Multiplied is the sum of all the weapon's attribute values after applying a multiplier to each attribute based on elemental matching.

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) + bonusPoweralignedPower=((evaluatedAttributeTotal+1)∗charPower)+bonusPower

Let's do another sample calculation assuming the following values below:
  • Character Power - 1000 (a level one character)
  • Character Element - Fire
  • Attribute One - STR 400
  • Attribute Two - CHA 400
  • Bonus Power - 1500 (a 100/100 LB, 0/25 4B, 0/10 5B weapon)
Aligned Power comes out to 4570.
Aligned Power is used as is when calculating experience gain, or multiplied with Trait Bonus when calculating the player's combat roll.

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 players 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:
  • Character Element - Fire
  • Weapon Element - Water
  • Enemy Element - Earth
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.
Maximum Player Roll is 4912 * 1.1 rounded down to 5403.

Enemy Power​

Enemy Power is a simple ±10% calculation applied to the listed enemy power of whatever enemy the player chose.
The numerical value listed on the combat screen button is used to determine experience and SKILL payouts.
The calculated value with the ±10% applied is used to determine the enemy's rolls in combat

Taking the previous values into account, let's finalize the sample combat simulation
  • Minimum Enemy Power = 4050
  • Maximum Enemy Power = 4950
Let's assume the player chose an enemy with a listed power value of 4700.
  • Enemy Power = 4700
Minimum Enemy Roll is 4700 * 0.9 rounded down to 4230.
Maximum Enemy Roll is 4700 * 1.1 rounded down to 5170.
From this information, we know that the player can roll between 4420 - 5403 and the enemy can roll between 4230 - 5170.

Combat Rewards​


Stamina per Fight​

Players may decide how much stamina they wish to spend on a single fight, and can spend up to 200 stamina in one go.
Gas offset is paid once per transaction, so if the user decides to spend 200 stamina they would receive 5x the evaluated baseline rewards, but gas offset only once.

The expected dollar value gains are equivalent for all tiers of stamina spending when accounting for gas, however earnings across an average period of time may differ if the player loses multiple high stamina fights.
Experience gained in fights are also multiplied proportionally depending on whatever stamina value the player chooses to spend.


Skill Payout​

The formula to determine SKILL payout is as follows:
payout = gasOffset + (baseline * √(enemyPower/1000))payout=gasOffset+(baseline∗√(enemyPower/1000))

Gas Offset is shown in the earnings calculator as follows:

Taken August 1, 2021

Baseline is also shown in the earnings calculator as follows:


Taken August 1, 2021

These numbers are dynamically adjusted by the Oracle, taking into account SKILL dollar value.

Note that the "power" variable indicated in the formula is the listed power value of whatever enemy the player chooses to fight.

credits to cryptoblade
 

Similar threads


Reply