1243896040 4 недель назад
Родитель
Сommit
86e720e217

+ 1 - 0
ActionTowerDefense/Assets/Scripts/Characters/AttackController.cs

@@ -88,6 +88,7 @@ public class AttackInfo
         [LabelText("邈華綴悈婠奀潔")] public float time;
         [LabelText("邈華岆瘁衄夼漲")] [ToggleLeft]public bool haveLandingDamage;
         [LabelText("邈華夼漲掀薹")] [ShowIf("haveLandingDamage")] public float landingDamageRate;
+        [LabelText("邈華夼漲郔苤硉")] [ShowIf("haveLandingDamage")] public int minLandingDamage;
         [LabelText("諷秶脯撰")] public int ControlOrder;
     }
     private bool ShowShotDownValue() => attackEffect.Contains(AttackEffect.ShotDown);

+ 4 - 2
ActionTowerDefense/Assets/Scripts/Characters/AttributeStatus.cs

@@ -332,9 +332,11 @@ public class AttributeStatus : MonoBehaviour
                             }
                             else
                             {
-                                if (attackMethod.attackInfo.shotDown.haveLandingDamage)
+                                AttackInfo.ShotDown shotDown = attackMethod.attackInfo.shotDown;
+                                if (shotDown.haveLandingDamage)
                                 {
-                                    landingDamage = (int)(Mathf.Abs(transform.position.y - startFlyPos.y) * attackMethod.attackInfo.shotDown.landingDamageRate);
+                                    landingDamage = (int)(Mathf.Abs(transform.position.y - startFlyPos.y) * shotDown.landingDamageRate);
+                                    landingDamage = Mathf.Clamp(landingDamage, shotDown.minLandingDamage, landingDamage);
                                     if (landingDamage > 0)
                                     {
                                         character.BeHit(attackMethod, landingDamageFrom, landingDamage);