Implement passive relics and six-family defense towers
This commit is contained in:
@@ -339,6 +339,18 @@ namespace BumpCombat.Combat
|
||||
playerStats.CalculateDamage(rawDamage, damageTag),
|
||||
side,
|
||||
isOffsetHit);
|
||||
finalDamage = PassiveRelicController.Instance?.ApplyTrophyBumpDamage(
|
||||
finalDamage,
|
||||
!isDash && string.IsNullOrEmpty(sourceId) && !artifactColor.HasValue)
|
||||
?? finalDamage;
|
||||
float baseBumpDamage = !isDash
|
||||
&& string.IsNullOrEmpty(sourceId)
|
||||
&& !artifactColor.HasValue
|
||||
? finalDamage
|
||||
: BumpCombatMath.ApplySideMultiplier(
|
||||
playerStats.CalculateDamage(baseDamage, DamageTag.Collision),
|
||||
side,
|
||||
isOffsetHit);
|
||||
finalDamage = PassiveRelicController.Instance?.ApplyOrdinaryBumpDamageMultiplier(
|
||||
finalDamage,
|
||||
!isDash && string.IsNullOrEmpty(sourceId),
|
||||
@@ -494,7 +506,8 @@ namespace BumpCombat.Combat
|
||||
playerHealth?.TryTakeDamage(
|
||||
enemy.ContactDamage,
|
||||
enemyToPlayer,
|
||||
enemy.PlayerKnockbackDistance);
|
||||
enemy.PlayerKnockbackDistance,
|
||||
fromEnemyAttack: false);
|
||||
}
|
||||
else if (side != HitSide.Front
|
||||
&& !enemy.IsCrowd
|
||||
@@ -527,7 +540,8 @@ namespace BumpCombat.Combat
|
||||
launchSucceeded,
|
||||
artifactEffect.HasValue,
|
||||
artifactEffect.GetValueOrDefault(),
|
||||
artifactEffect.HasValue && isStrongDash));
|
||||
artifactEffect.HasValue && isStrongDash,
|
||||
baseBumpDamage));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,13 +24,15 @@ namespace BumpCombat.Combat
|
||||
bool launchSucceeded = false,
|
||||
bool isArtifactHit = false,
|
||||
ActiveArtifactEffect artifactEffect = ActiveArtifactEffect.Dash,
|
||||
bool isChargedArtifact = false)
|
||||
bool isChargedArtifact = false,
|
||||
float baseBumpDamage = 0f)
|
||||
{
|
||||
Attacker = attacker;
|
||||
Target = target;
|
||||
IsDash = isDash;
|
||||
Side = side;
|
||||
Damage = damage;
|
||||
BaseBumpDamage = baseBumpDamage;
|
||||
KnockbackDirection = knockbackDirection;
|
||||
KnockbackForce = knockbackForce;
|
||||
HitPosition = hitPosition;
|
||||
@@ -96,6 +98,7 @@ namespace BumpCombat.Combat
|
||||
public bool IsOrdinaryBump => !IsDash && string.IsNullOrEmpty(SourceId);
|
||||
public HitSide Side { get; }
|
||||
public float Damage { get; }
|
||||
public float BaseBumpDamage { get; }
|
||||
public bool HasBackBonus => UsesPositionBonus && Side == HitSide.Back;
|
||||
public bool IsOffsetHit { get; }
|
||||
public bool HasPositionBonus =>
|
||||
|
||||
Reference in New Issue
Block a user