Procházet zdrojové kódy

击落根据高度造成落地伤害

WGL před 1 měsícem
rodič
revize
7d559a62f6

+ 19 - 13
ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Sword.prefab

@@ -187,10 +187,12 @@ MonoBehaviour:
   canBreakWall: 0
   wallBrealNum: 10
   isShoot: 0
-  owner: {fileID: 0}
   isSingleAttack: 0
+  isDoT: 0
+  owner: {fileID: 0}
   cantSingleAttack: 0
   trigedObjs: []
+  trigedTime: []
   attackMethod:
     attackName: 
     attackType: 0
@@ -226,7 +228,7 @@ MonoBehaviour:
         force: 0
         time: 0
         haveLandingDamage: 0
-        landingDamage: 0
+        landingDamageRate: 0
         ControlOrder: 0
       weak:
         time: 0
@@ -263,6 +265,7 @@ MonoBehaviour:
   repelValue: 0
   offsetY: 1
   hitRate: 1
+  interval: 0
   isCreatedByDemonicSummon: 0
 --- !u!1 &2437299196472462361
 GameObject:
@@ -409,9 +412,8 @@ MonoBehaviour:
   heavyDamage: 0
   killer: {fileID: 0}
   isFrozen: 0
-  electrifyAttackSpeedScale: 0.6
-  electrifyMoveSpeedScale: 0.6
   isElectrify: 0
+  electrifyEffect: {fileID: 0}
   isOnFire: 0
   fireStacks: 0
   searchState: 0
@@ -511,7 +513,7 @@ MonoBehaviour:
         force: 200
         time: 5
         haveLandingDamage: 1
-        landingDamage: 30
+        landingDamageRate: 0
         ControlOrder: 0
       weak:
         time: 0
@@ -577,7 +579,7 @@ MonoBehaviour:
         force: 0
         time: 0
         haveLandingDamage: 0
-        landingDamage: 0
+        landingDamageRate: 0
         ControlOrder: 0
       weak:
         time: 0
@@ -643,7 +645,7 @@ MonoBehaviour:
         force: 200
         time: 5
         haveLandingDamage: 1
-        landingDamage: 30
+        landingDamageRate: 1
         ControlOrder: 0
       weak:
         time: 0
@@ -710,7 +712,7 @@ MonoBehaviour:
         force: 0
         time: 0
         haveLandingDamage: 0
-        landingDamage: 0
+        landingDamageRate: 0
         ControlOrder: 0
       weak:
         time: 0
@@ -777,7 +779,7 @@ MonoBehaviour:
         force: 0
         time: 0
         haveLandingDamage: 0
-        landingDamage: 0
+        landingDamageRate: 0
         ControlOrder: 0
       weak:
         time: 0
@@ -1247,10 +1249,12 @@ MonoBehaviour:
   canBreakWall: 0
   wallBrealNum: 10
   isShoot: 0
-  owner: {fileID: 0}
   isSingleAttack: 0
+  isDoT: 0
+  owner: {fileID: 0}
   cantSingleAttack: 0
   trigedObjs: []
+  trigedTime: []
   attackMethod:
     attackName: 
     attackType: 0
@@ -1286,7 +1290,7 @@ MonoBehaviour:
         force: 0
         time: 0
         haveLandingDamage: 0
-        landingDamage: 0
+        landingDamageRate: 0
         ControlOrder: 0
       weak:
         time: 0
@@ -1323,6 +1327,7 @@ MonoBehaviour:
   repelValue: 0
   offsetY: 1
   hitRate: 1
+  interval: 0
   isCreatedByDemonicSummon: 0
 --- !u!1 &7669620205589286043
 GameObject:
@@ -1749,7 +1754,7 @@ MonoBehaviour:
         force: 0
         time: 0
         haveLandingDamage: 0
-        landingDamage: 0
+        landingDamageRate: 0
         ControlOrder: 0
       weak:
         time: 0
@@ -1833,7 +1838,7 @@ MonoBehaviour:
         force: 0
         time: 0
         haveLandingDamage: 0
-        landingDamage: 0
+        landingDamageRate: 0
         ControlOrder: 0
       weak:
         time: 0
@@ -1871,6 +1876,7 @@ MonoBehaviour:
   isFly: 0
   decelerationRatioX: 2
   decelerationRatioY: 15
+  landingDamageFrom: {fileID: 0}
   rotateCenterHeight: 1
   startFlyAngle: 15
   flyingRotateSpeedRange: {x: 15, y: 45}

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

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

+ 6 - 3
ActionTowerDefense/Assets/Scripts/Characters/AttributeStatus.cs

@@ -334,8 +334,11 @@ public class AttributeStatus : MonoBehaviour
                             {
                                 if (attackMethod.attackInfo.shotDown.haveLandingDamage)
                                 {
-                                    landingDamage = attackMethod.attackInfo.shotDown.landingDamage;
-                                    character.BeHit(attackMethod, landingDamageFrom, landingDamage);
+                                    landingDamage = (int)(Mathf.Abs(transform.position.y - startFlyPos.y) * attackMethod.attackInfo.shotDown.landingDamageRate);
+                                    if (landingDamage > 0)
+                                    {
+                                        character.BeHit(attackMethod, landingDamageFrom, landingDamage);
+                                    }
                                 }
                             }
                             BounceEffect();
@@ -562,7 +565,7 @@ public class AttributeStatus : MonoBehaviour
         rb.transform.rotation = Quaternion.Euler(0, 0, 0);
         character.ani.Play("hitted", 0, 0);
         character.nowCanFly = false;
-
+        startFlyPos = transform.position;
         hitState = 0;
         isFly = false;
         character.ChangeState(CharacterState.SpecialStatus_ShotDown);

+ 25 - 13
ActionTowerDefense/Assets/Scripts/Characters/SoldierBuff.cs

@@ -63,7 +63,7 @@ public class SoldierBuff : MonoBehaviour
         ats.resistances.armor = initArmor + armor;
     }
 
-    public void AddShootDownDamage(int damage)
+    public void AddShootDownDamage(float rate)
     {
         for (int i = 0; i < ac.attackMethod_summon.Length; i++)
         {
@@ -74,7 +74,7 @@ public class SoldierBuff : MonoBehaviour
                 if (ae == AttackEffect.ShotDown)
                 {
                     AttackInfo.ShotDown sd = ai.shotDown;
-                    sd.landingDamage = initAttackSummonInfo[i].shotDown.landingDamage + damage;
+                    sd.landingDamageRate = initAttackSummonInfo[i].shotDown.landingDamageRate + rate;
                     ai.shotDown = sd;
                     break;
                 }
@@ -90,7 +90,7 @@ public class SoldierBuff : MonoBehaviour
                 if (ae == AttackEffect.ShotDown)
                 {
                     AttackInfo.ShotDown sd = ai.shotDown;
-                    sd.landingDamage = initAttackMarchInfo[i].shotDown.landingDamage + damage;
+                    sd.landingDamageRate = initAttackMarchInfo[i].shotDown.landingDamageRate + rate;
                     ai.shotDown = sd;
                     break;
                 }
@@ -107,12 +107,18 @@ public class SoldierBuff : MonoBehaviour
             List<AttackEffect> aes = ai.attackEffect;
             foreach (AttackEffect ae in aes)
             {
-                if (ae == AttackEffect.BlowUp)
+                switch (ae)
                 {
-                    AttackInfo.BlowUp blowUp = ai.blowUp;
-                    blowUp.landingDamageRate = initAttackSummonInfo[i].blowUp.landingDamageRate + rate;
-                    ai.blowUp = blowUp;
-                    break;
+                    case AttackEffect.BlowUp:
+                        AttackInfo.BlowUp blowUp = ai.blowUp;
+                        blowUp.landingDamageRate = initAttackSummonInfo[i].blowUp.landingDamageRate + rate;
+                        ai.blowUp = blowUp;
+                        break;
+                    case AttackEffect.ShotDown:
+                        AttackInfo.ShotDown shotDown = ai.shotDown;
+                        shotDown.landingDamageRate = initAttackSummonInfo[i].shotDown.landingDamageRate + rate;
+                        ai.shotDown = shotDown;
+                        break;
                 }
             }
             ac.attackMethod_summon[i].attackInfo = ai;
@@ -123,12 +129,18 @@ public class SoldierBuff : MonoBehaviour
             List<AttackEffect> aes = ai.attackEffect;
             foreach (AttackEffect ae in aes)
             {
-                if (ae == AttackEffect.BlowUp)
+                switch (ae)
                 {
-                    AttackInfo.BlowUp blowUp = ai.blowUp;
-                    blowUp.landingDamageRate = initAttackMarchInfo[i].blowUp.landingDamageRate + rate;
-                    ai.blowUp = blowUp;
-                    break;
+                    case AttackEffect.BlowUp:
+                        AttackInfo.BlowUp blowUp = ai.blowUp;
+                        blowUp.landingDamageRate = initAttackSummonInfo[i].blowUp.landingDamageRate + rate;
+                        ai.blowUp = blowUp;
+                        break;
+                    case AttackEffect.ShotDown:
+                        AttackInfo.ShotDown shotDown = ai.shotDown;
+                        shotDown.landingDamageRate = initAttackSummonInfo[i].shotDown.landingDamageRate + rate;
+                        ai.shotDown = shotDown;
+                        break;
                 }
             }
             ac.attackMethod_march[i].attackInfo = ai;

+ 1 - 0
ActionTowerDefense/Assets/Scripts/Conduct/ConductController.cs

@@ -156,6 +156,7 @@ public class ConductController : MonoBehaviour
                 photosphere.hp = Mathf.RoundToInt((prefabDemonic.totalHp + soldierExtraBuff.hp + gameManager.totalHp)*dienum * barrier.power[demonicRarity] * tagAdd);
                 photosphere.conductController = this;
                 photosphere.id = photospheres.Count;
+                photosphere.time = 0;
                 photospheres.Add(photosphere);
                 RefreshBarrierScale();
                 break;

+ 1 - 1
ActionTowerDefense/Assets/Scripts/Conduct/Photosphere.cs

@@ -11,7 +11,7 @@ public class Photosphere : MonoBehaviour
     [LabelText("有停留时间")]public bool haveStayTime;
     [ShowIf("haveStayTime")][LabelText("停留时间")]public float stayTime;
     [LabelText("破碎特效")]public GameObject breakEffect;
-    private float time;
+    public float time;
     [LabelText("大小差值")] public float offset;
     public int hp;
     public int id;

+ 0 - 1
ActionTowerDefense/Assets/Scripts/Rougue/SoldierLevelRecord.cs

@@ -145,7 +145,6 @@ public class SoldierLevelRecord : MonoBehaviour
                 sb.AddMarchAttack(seb[i].marchAttack);
                 sb.AddHP(seb[i].hp);
                 sb.AddArmor(seb[i].armor);
-                sb.AddShootDownDamage(seb[i].shootDownDamage);
                 sb.AddBlowUpDamageRate(seb[i].shootDownDamageRate);
                 break;
             }

+ 38 - 38
ActionTowerDefense/GenerateDatas/json/cfgsoldierlevel.json

@@ -893,8 +893,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 5,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 1
   },
   {
     "Level": 3,
@@ -906,8 +906,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 10,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 1.3
   },
   {
     "Level": 4,
@@ -919,8 +919,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 15,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 1.6
   },
   {
     "Level": 5,
@@ -932,8 +932,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 40,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 1.9
   },
   {
     "Level": 6,
@@ -945,8 +945,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 50,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 2.2
   },
   {
     "Level": 7,
@@ -958,8 +958,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 60,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 2.5
   },
   {
     "Level": 8,
@@ -971,8 +971,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 70,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 2.8
   },
   {
     "Level": 9,
@@ -984,8 +984,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 80,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 3.1
   },
   {
     "Level": 10,
@@ -997,8 +997,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 90,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 3.4
   },
   {
     "Level": 11,
@@ -1010,8 +1010,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 100,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 3.7
   },
   {
     "Level": 12,
@@ -1023,8 +1023,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 110,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 4
   },
   {
     "Level": 13,
@@ -1036,8 +1036,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 120,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 4.3
   },
   {
     "Level": 14,
@@ -1049,8 +1049,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 130,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 4.6
   },
   {
     "Level": 15,
@@ -1062,8 +1062,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 140,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 4.9
   },
   {
     "Level": 16,
@@ -1075,8 +1075,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 150,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 5.2
   },
   {
     "Level": 17,
@@ -1088,8 +1088,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 160,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 5.5
   },
   {
     "Level": 18,
@@ -1101,8 +1101,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 170,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 5.8
   },
   {
     "Level": 19,
@@ -1114,8 +1114,8 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 180,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 6.1
   },
   {
     "Level": 20,
@@ -1127,7 +1127,7 @@
     "armor": 0,
     "MP": 0,
     "ArmorPierce": 0,
-    "ShootDownDamage": 190,
-    "ShootDownDamageRate": 0
+    "ShootDownDamage": 0,
+    "ShootDownDamageRate": 6.4
   }
 ]

binární
ActionTowerDefense/Luban/Config/Datas/士兵等级属性表.xlsx