Move ProneDamage modifier from TakeCover to Warhead.

Rename it to ProneModifier and convert it to integer.
This commit is contained in:
reaperrr
2014-07-05 15:20:34 +02:00
parent b12c630e63
commit fabca5dca6
2 changed files with 5 additions and 3 deletions

View File

@@ -52,6 +52,8 @@ namespace OpenRA.GameRules
public readonly DamageModel DamageModel = DamageModel.Normal;
[Desc("Whether we should prevent prone response for infantry.")]
public readonly bool PreventProne = false;
[Desc("By what percentage should damage be modified against prone infantry.")]
public readonly int ProneModifier = 50;
public float EffectivenessAgainst(ActorInfo ai)
{

View File

@@ -18,7 +18,6 @@ namespace OpenRA.Mods.RA
public class TakeCoverInfo : TurretedInfo
{
public readonly int ProneTime = 100; /* ticks, =4s */
public readonly float ProneDamage = .5f;
public readonly decimal ProneSpeed = .5m;
public readonly WVec ProneOffset = new WVec(85, 0, -171);
@@ -58,9 +57,10 @@ namespace OpenRA.Mods.RA
LocalOffset = WVec.Zero;
}
public float GetDamageModifier(Actor attacker, WarheadInfo warhead )
public float GetDamageModifier(Actor attacker, WarheadInfo warhead)
{
return IsProne ? Info.ProneDamage : 1f;
var proneDamage = (warhead.ProneModifier / 100f);
return IsProne ? proneDamage : 1f;
}
public decimal GetSpeedModifier()