Эх сурвалжийг харах

献祭效果规模可填小数

WGL 1 сар өмнө
parent
commit
b35db20456

+ 40 - 7
ActionTowerDefense/Assets/Resources/Prefab/GameManager.prefab

@@ -97,7 +97,7 @@ MonoBehaviour:
   woodProbability: 15
   isRockEnable: 0
   rockProbability: 50
-  stoneHpRadio: 0.5
+  stoneStatuePrefab: {fileID: 0}
   isSkyEnable: 0
   attackRate: 0.01
   isGroundEnable: 0
@@ -176,7 +176,11 @@ MonoBehaviour:
     - 10
     - 5
     sacrificeValue: 0a0000000a0000000a0000000a000000
-    power: 01000000020000000300000004000000
+    power:
+    - 1
+    - 2
+    - 3
+    - 4
     effectBonus:
     - 1
     - 2
@@ -198,7 +202,11 @@ MonoBehaviour:
     - 10
     - 10
     sacrificeValue: 0a0000000a0000000a0000000a000000
-    power: 01000000010000000100000001000000
+    power:
+    - 2
+    - 3
+    - 4
+    - 5
     effectBonus:
     - 1
     - 2
@@ -219,7 +227,11 @@ MonoBehaviour:
     - 10
     - 5
     sacrificeValue: 0a0000000a0000000a0000000a000000
-    power: 0a0000000f000000140000001e000000
+    power:
+    - 3
+    - 5
+    - 7
+    - 9
     effectBonus:
     - 1
     - 2
@@ -240,7 +252,11 @@ MonoBehaviour:
     - 10
     - 5
     sacrificeValue: 0a0000000a0000000a0000000a000000
-    power: 01000000020000000300000004000000
+    power:
+    - 1
+    - 2
+    - 3
+    - 4
     effectBonus:
     - 1
     - 2
@@ -261,7 +277,11 @@ MonoBehaviour:
     - 10
     - 5
     sacrificeValue: 0a0000000a0000000a0000000a000000
-    power: 01000000020000000300000004000000
+    power:
+    - 1
+    - 2
+    - 3
+    - 4
     effectBonus:
     - 1
     - 2
@@ -281,13 +301,26 @@ MonoBehaviour:
     - 10
     - 5
     sacrificeValue: 0a0000000a0000000a0000000a000000
-    power: 01000000020000000300000004000000
+    power:
+    - 1
+    - 2
+    - 3
+    - 4
     effectBonus:
     - 1
     - 2
     - 3
     - 4
     obj: {fileID: 256012001268456902, guid: d682c4f893ea2364ba164892a71ceb8b, type: 3}
+  tornadoFan:
+    attributeTag: 0
+    bUseFixedSacrifice: 0
+    sacrificeRatio: []
+    cd: []
+    sacrificeValue: 
+    power: []
+    effectBonus: []
+    obj: {fileID: 0}
 --- !u!114 &1880576200062196086
 MonoBehaviour:
   m_ObjectHideFlags: 0

+ 5 - 5
ActionTowerDefense/Assets/Scripts/Conduct/ConductController.cs

@@ -169,7 +169,7 @@ public class ConductController : MonoBehaviour
                 obj = PoolManager.Instantiate(flyingSwords.obj);
                 FanFlyingSwords FFS = obj.GetComponent<FanFlyingSwords>();
                 FFS.owner = playerController;
-                FFS.swordsNum = dienum * flyingSwords.power[demonicRarity];
+                FFS.swordsNum = Mathf.RoundToInt(dienum * flyingSwords.power[demonicRarity]);
                 tagAdd += flyingSwords.effectBonus[demonicRarity] * myTreasureTag[(int)flyingSwords.attributeTag - 1] / 100;
                 FFS.damage = (int)(attackDamage * tagAdd);
                 FFS.Biu();
@@ -179,7 +179,7 @@ public class ConductController : MonoBehaviour
                 obj = PoolManager.Instantiate(iceRain.obj);
                 IceRainController iceRainController = obj.GetComponent<IceRainController>();
                 iceRainController.owner = playerController;
-                iceRainController.swordsNum = dienum * iceRain.power[demonicRarity];
+                iceRainController.swordsNum = Mathf.RoundToInt(dienum * iceRain.power[demonicRarity]);
                 tagAdd += iceRain.effectBonus[demonicRarity] * myTreasureTag[(int)iceRain.attributeTag - 1] / 100;
                 iceRainController.damage = (int)(attackDamage * tagAdd);
                 iceRainController.Biu();
@@ -201,7 +201,7 @@ public class ConductController : MonoBehaviour
                 }
                 obj.transform.position = transform.position + Vector3.up;
                 tagAdd += barrier.effectBonus[demonicRarity] * myTreasureTag[(int)barrier.attributeTag - 1] / 100;
-                photosphere.hp = (int)((prefabDemonic.totalHp + soldierExtraBuff.hp + gameManager.totalHp)*dienum * barrier.power[demonicRarity] * tagAdd);
+                photosphere.hp = Mathf.RoundToInt((prefabDemonic.totalHp + soldierExtraBuff.hp + gameManager.totalHp)*dienum * barrier.power[demonicRarity] * tagAdd);
                 photosphere.conductController = this;
                 break;
             case ConductSkills.SpiritBloodAggregator:
@@ -212,7 +212,7 @@ public class ConductController : MonoBehaviour
                 bs.boostNum = dienum;
                 bs.Settings();
                 tagAdd += spiritBloodAggregator.effectBonus[demonicRarity] * myTreasureTag[(int)spiritBloodAggregator.attributeTag - 1] / 100;
-                int totalHp = demonic.totalHp * spiritBloodAggregator.power[demonicRarity] * dienum;
+                int totalHp = Mathf.RoundToInt(demonic.totalHp * spiritBloodAggregator.power[demonicRarity] * dienum);
                 demonic.totalHp = (int)(totalHp * tagAdd);
                 demonic.hp = demonic.totalHp;
                 demonic.attackController.attackSummonId = 0;
@@ -225,7 +225,7 @@ public class ConductController : MonoBehaviour
                 ConductManager.WanderingDragonOrb wanderingDragonOrb = conductManager.wanderingDragonOrb;
                 obj = PoolManager.Instantiate(wanderingDragonOrb.obj);
                 DragonController dragonController = obj.GetComponent<DragonController>();
-                dragonController.num = dienum * wanderingDragonOrb.power[demonicRarity];
+                dragonController.num = Mathf.RoundToInt(dienum * wanderingDragonOrb.power[demonicRarity]);
                 tagAdd += wanderingDragonOrb.effectBonus[demonicRarity] * myTreasureTag[(int)wanderingDragonOrb.attributeTag - 1] / 100;
                 dragonController.damage = (int)(attackDamage * tagAdd);
                 dragonController.demonicId = demonicId;

+ 20 - 6
ActionTowerDefense/Assets/Scripts/Conduct/ConductManager.cs

@@ -27,7 +27,7 @@ public class ConductManager : MonoBehaviour
         [ShowIf("@!bUseFixedSacrifice")][LabelText("献祭比例(%)")] public float[] sacrificeRatio;
         [ShowIf("@!bUseFixedSacrifice")] [LabelText("CD")] public float[] cd;
         [ShowIf("bUseFixedSacrifice")][LabelText("献祭数量")] public int[] sacrificeValue;
-        [LabelText("效果规模")] public int[] power;
+        [LabelText("效果规模")] public float[] power;
         [LabelText("效果加成(%)")] public float[] effectBonus;
         [LabelText("随机范围")] public Vector2 randomRange;
         [LabelText("是否会死亡")] public bool canDie;
@@ -42,7 +42,7 @@ public class ConductManager : MonoBehaviour
         [ShowIf("@!bUseFixedSacrifice")] [LabelText("献祭比例(%)")] public float[] sacrificeRatio;
         [ShowIf("@!bUseFixedSacrifice")] [LabelText("CD")] public float[] cd;
         [ShowIf("bUseFixedSacrifice")] [LabelText("献祭数量")] public int[] sacrificeValue;
-        [LabelText("效果规模")] public int[] power;
+        [LabelText("效果规模")] public float[] power;
         [LabelText("效果加成(%)")] public float[] effectBonus;
         public GameObject obj;
     }
@@ -56,7 +56,7 @@ public class ConductManager : MonoBehaviour
         [ShowIf("@!bUseFixedSacrifice")] [LabelText("献祭比例(%)")] public float[] sacrificeRatio;
         [ShowIf("@!bUseFixedSacrifice")] [LabelText("CD")] public float[] cd;
         [ShowIf("bUseFixedSacrifice")] [LabelText("献祭数量")] public int[] sacrificeValue;
-        [LabelText("效果规模")] public int[] power;
+        [LabelText("效果规模")] public float[] power;
         [LabelText("效果加成(%)")] public float[] effectBonus;
         public GameObject obj;
     }
@@ -70,7 +70,7 @@ public class ConductManager : MonoBehaviour
         [ShowIf("@!bUseFixedSacrifice")] [LabelText("献祭比例(%)")] public float[] sacrificeRatio;
         [ShowIf("@!bUseFixedSacrifice")] [LabelText("CD")] public float[] cd;
         [ShowIf("bUseFixedSacrifice")] [LabelText("献祭数量")] public int[] sacrificeValue;
-        [LabelText("效果规模")] public int[] power;
+        [LabelText("效果规模")] public float[] power;
         [LabelText("效果加成(%)")] public float[] effectBonus;
         public GameObject obj;
     }
@@ -84,7 +84,7 @@ public class ConductManager : MonoBehaviour
         [ShowIf("@!bUseFixedSacrifice")] [LabelText("献祭比例(%)")] public float[] sacrificeRatio;
         [ShowIf("@!bUseFixedSacrifice")] [LabelText("CD")] public float[] cd;
         [ShowIf("bUseFixedSacrifice")] [LabelText("献祭数量")] public int[] sacrificeValue;
-        [LabelText("效果规模")] public int[] power;
+        [LabelText("效果规模")] public float[] power;
         [LabelText("效果加成(%)")] public float[] effectBonus;
     }
     [LabelText("灵血聚合器")] public SpiritBloodAggregator spiritBloodAggregator;
@@ -97,12 +97,26 @@ public class ConductManager : MonoBehaviour
         [ShowIf("@!bUseFixedSacrifice")] [LabelText("献祭比例(%)")] public float[] sacrificeRatio;
         [ShowIf("@!bUseFixedSacrifice")] [LabelText("CD")] public float[] cd;
         [ShowIf("bUseFixedSacrifice")] [LabelText("献祭数量")] public int[] sacrificeValue;
-        [LabelText("效果规模")] public int[] power;
+        [LabelText("效果规模")] public float[] power;
         [LabelText("效果加成(%)")] public float[] effectBonus;
         public GameObject obj;
     }
     [LabelText("游龙球")] public WanderingDragonOrb wanderingDragonOrb;
 
+    //龙卷扇
+    [Serializable] public struct TornadoFan
+    {
+        [LabelText("标签")] public AttributeTag attributeTag;
+        [LabelText("献祭方式")] [Tooltip("勾选定额;不勾选百分比")] public bool bUseFixedSacrifice;
+        [ShowIf("@!bUseFixedSacrifice")] [LabelText("献祭比例(%)")] public float[] sacrificeRatio;
+        [ShowIf("@!bUseFixedSacrifice")] [LabelText("CD")] public float[] cd;
+        [ShowIf("bUseFixedSacrifice")] [LabelText("献祭数量")] public int[] sacrificeValue;
+        [LabelText("效果规模")] public float[] power;
+        [LabelText("效果加成(%)")] public float[] effectBonus;
+        public GameObject obj;
+    }
+    [LabelText("游龙球")] public TornadoFan tornadoFan;
+
     private void Awake()
     {
         if(!instance)