Game Mechanics Design Documentation (WiP) - gaberdell/SuchLife2.0GameProject GitHub Wiki
Note: All of the calculations are subject to balancing in the future. More will be add in later as the development continues
There will be 2 types of armor: Physical armor and Magic armor. MC will both have physical armor and magic armor. The damage taken will be calculated separately. If a weapon is a hybrid (deal both physical damage and magic damage), the damage applied to the player is the combination of 2 damage type after applying the damage reduction below.
-
Physical Mitigation
- Provide entities with physical damage reduction.
- Gear with ‘Armor’ stats will decrease damage taken.
- For any subsequent defenseBuff, add it into the enemydefense (enemyDefense + defenseBuff + defenseBuff + …)
- Formula:
$\Huge ({1.25 \over {(enemyDefense + defenseBuff)*(1 - defReductionCoef) \over 375} + 1.5}) + 0.1$
- Formula:
-
Magic mitigation
- Provide entities with magic damage reduction.
- Gear with ‘Magic’ stats will decrease damage taken.
- For any subsequent defenseBuff, add it into the enemyDefense (enemyDefense + defenseBuff + defenseBuff + …)
- Formula:
$\Huge ({1.25 \over {(enemyDefense + defenseBuff) * (1 - defReductionCoef) \over 375} + 1.5}) + 0.1$
- Formula:
Dodge will allow you to significantly reduce incoming damage to the entities. This mechanics will only apply to the MC, NPC (Both hostile and non-hostile human and humanoid creature), and Boss enemy. Once an entity “dodges” an attack, the damage applied to that entity will be cut by half. Max dodge chance can go as high as 90%. Any excess dodge chance would be removed.
Agility (dodge chance) and accuracy (hit chance) will both be percentage and it’s an additive calculation. For example, if you have 50% dodge chance and 25% hit chance (accuracy), the final dodge chance would be 25%.
- Formula: Final dodge chance= Dodge chance - hit chance
Terminology:
- baseAttack: MC’s base attack at the current level
- rarityAdditionalAttack: "Rarity additional attack" chart in Equipment Documentation document
- weaponAttack: attack stat of the weapon
- equipmentAttack: MC’s base attack + attack stats increase after equipping armor pieces.
- totalAttack = (baseAttack + equipmentAttack + weaponAttack + rarityAdditionalAttack) * attackBuff
- skillDamageIncrease: the additional damage increase of individual skill.
There will be 2 types of damage:
- True damage: Directly deduct your health without going through the mitigation calculation. Will not factor in crit rate and crit damage.
- Hit Damage
- (totalAttack * skillDamageIncrease) * 2.5
- “Missed” Damage
- ((totalAttack * skillDamageIncrease) * 2.5) * 0.5
- Hit Damage
- Blunt Damage: Damage that must go through mitigation calculation before deducting it from the health pool. For any subsequent attack_buff, add it into the attack (attackBuff + attackBbuff + attackBuff + … ). There are 4 types of Blunt Damage:
- Hit Crit-ed Damage
- ((baseAttack + (totalAttack * critDamageMul))* skillDamageIncrease)*2.5
- Hit Non-crit damage
- (totalAttack * skillDamageIncrease) * 2.5
- “Missed” Crit-ed damage
- ((totalAttack * critDamageMul * skillDamageIncrease) * 2.5) * 0.5
- “Missed” Non-crit damage
- ((totalAttack * skillDamageIncrease) * 2.5) * 0.5
- ((totalAttack * skillDamageIncrease) * 2.5) * 0.5
- Hit Crit-ed Damage
Note: Since we have hybrid weapons, there will be melee damage and ranged damage. We can consider both to be a separate source of damage. For example, if a Lance cannon have a base stat (melee) of 20 and base stat (ranged) of 10, and if the player uses a melee move and deal a “Missed” Non-crit damage, the totalAttack equation is above and the overall damage would be (totalAttack * skillDamageIncrease) * 2.5) * 0.5.
Crit chance and crit damage will be in percentage when display play on the UI. For calculation, CDmg will be a non-negative integer (CDmg / 100). The cap for Crit is 100% and CDmg is 400%, with any excess stats will be lowered to the limit.
MC can do Persuading and bargaining action to a merchant-type NPC, which will allow the MC to buy/sell item at lower/higher price or even establish “supply chain” if the MC choose to follow the merchant path. Chances of success depend on the relationship between the MC and the client. There will be 2 types of bargaining:
- Face-to-face:
- You will have to directly travel to the location and meet up with the client.
- Must go through speech check every time you meet up, but it allows you to improve your relationship (increase/decrease affinity).
- Must wait 4 in-games days for a reply after travel and meet-up.
- Send an offer:
- Does not have to travel to the client, can do it on-the-go.
- Does not increase/decrease affinity.
- Must wait for 2 days for a reply.
Note: DoT (Damage over Time)
- Hunted: Any projectile firing from the caster will start to home onto the marked enemy.
- Armor break: Decrease defense stat by 50%
- Burn (DoT): Deal (applied damage * 2) per second.
- Bleed (DoT): Deal 2% of enemy max health per second
- Radiation (DoT): Reduce 1% of max health every second, health reduction cannot go pass 60% of the original health value.
- Counter Stance: While adopting the counter stance, you will reduce the damage taken to yourself by 95% in a half-circle in the direction of your cursor. You can move around and look around while in the counter stance. You will also have a resource meter which will indicate when your counter stance wears out. The reflection area of effect would be in an elongated rectangle. You have 2 options:
- Let the counter stance automatically reflect the damage for you by just not holding any button.
- Resource drain rate: 5 points/s
- Hold it in by pressing a button of your choice. Once the timer runs out, you will reflect 40% of the total damage absorbed toward the direction of your cursor.
- Resource drain rate: 8 points/s
- Let the counter stance automatically reflect the damage for you by just not holding any button.