Move ProneDamage modifier from TakeCover to Warhead.
Rename it to ProneModifier and convert it to integer.
This commit is contained in:
@@ -52,6 +52,8 @@ namespace OpenRA.GameRules
|
|||||||
public readonly DamageModel DamageModel = DamageModel.Normal;
|
public readonly DamageModel DamageModel = DamageModel.Normal;
|
||||||
[Desc("Whether we should prevent prone response for infantry.")]
|
[Desc("Whether we should prevent prone response for infantry.")]
|
||||||
public readonly bool PreventProne = false;
|
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)
|
public float EffectivenessAgainst(ActorInfo ai)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ namespace OpenRA.Mods.RA
|
|||||||
public class TakeCoverInfo : TurretedInfo
|
public class TakeCoverInfo : TurretedInfo
|
||||||
{
|
{
|
||||||
public readonly int ProneTime = 100; /* ticks, =4s */
|
public readonly int ProneTime = 100; /* ticks, =4s */
|
||||||
public readonly float ProneDamage = .5f;
|
|
||||||
public readonly decimal ProneSpeed = .5m;
|
public readonly decimal ProneSpeed = .5m;
|
||||||
public readonly WVec ProneOffset = new WVec(85, 0, -171);
|
public readonly WVec ProneOffset = new WVec(85, 0, -171);
|
||||||
|
|
||||||
@@ -58,9 +57,10 @@ namespace OpenRA.Mods.RA
|
|||||||
LocalOffset = WVec.Zero;
|
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()
|
public decimal GetSpeedModifier()
|
||||||
|
|||||||
Reference in New Issue
Block a user