diff --git a/ColorlessWorld-2024-4-2/Assets/GameDate/cardDeckList.asset b/ColorlessWorld-2024-4-2/Assets/GameDate/cardDeckList.asset index 43acd718..465b0875 100644 --- a/ColorlessWorld-2024-4-2/Assets/GameDate/cardDeckList.asset +++ b/ColorlessWorld-2024-4-2/Assets/GameDate/cardDeckList.asset @@ -13,10 +13,19 @@ MonoBehaviour: m_Name: cardDeckList m_EditorClassIdentifier: cardDeckList: + - 1010 - 1005 + - 1010 + - 1010 + - 2040 + - 2041 + - 2042 + - 2043 + - 2044 + - 2045 + - 2046 + - 2047 + - 1010 + - 1010 - 1005 - 1005 - - 1005 - - 1005 - - 2001 - - 1012 diff --git a/ColorlessWorld-2024-4-2/Assets/Lana Studio/Casual RPG VFX/Upgrade for URP/Upgrade for URP.unitypackage.meta b/ColorlessWorld-2024-4-2/Assets/Lana Studio/Casual RPG VFX/Upgrade for URP/Upgrade for URP.unitypackage.meta deleted file mode 100644 index 1d182472..00000000 --- a/ColorlessWorld-2024-4-2/Assets/Lana Studio/Casual RPG VFX/Upgrade for URP/Upgrade for URP.unitypackage.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 5b07afdbcf13e43438545d591cfd2e4b -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Plugins/Microsoft.CSharp.dll.meta b/ColorlessWorld-2024-4-2/Assets/Plugins/Microsoft.CSharp.dll.meta new file mode 100644 index 00000000..17bba4e5 --- /dev/null +++ b/ColorlessWorld-2024-4-2/Assets/Plugins/Microsoft.CSharp.dll.meta @@ -0,0 +1,27 @@ +fileFormatVersion: 2 +guid: a94cf6fef2879da4c91e5ef768aadf4e +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/ForLook/Card_v04-0319.prefab b/ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/ForLook/Card_v04-0319.prefab index 25f3e442..fe60bfd5 100644 --- a/ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/ForLook/Card_v04-0319.prefab +++ b/ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/ForLook/Card_v04-0319.prefab @@ -1221,13 +1221,14 @@ MonoBehaviour: triggerBorde: {fileID: 3341784192257490232} currentCost: 0 currentCostType: - tempIsDisposable: 1 + tempIsDisposable: 0 lastConditionBool: 0 costIocn: {fileID: 0} bloodIcon: {fileID: 0} stepIcon: {fileID: 0} nodeIcon: {fileID: 0} - costImage: {fileID: 0} + tempMinusCost: 0 + colorValSprite: --- !u!114 &5545682449418996990 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/ForLook/Color-Card_v04-0319.prefab b/ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/ForLook/Color-Card_v04-0319.prefab index 22d6ce2f..41081b5d 100644 --- a/ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/ForLook/Color-Card_v04-0319.prefab +++ b/ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/ForLook/Color-Card_v04-0319.prefab @@ -1071,13 +1071,14 @@ MonoBehaviour: triggerBorde: {fileID: 2937696754111028786} currentCost: 0 currentCostType: - tempIsDisposable: 1 + tempIsDisposable: 0 lastConditionBool: 0 costIocn: {fileID: 0} bloodIcon: {fileID: 0} stepIcon: {fileID: 0} nodeIcon: {fileID: 0} - costImage: {fileID: 0} + tempMinusCost: 0 + colorValSprite: --- !u!114 &5545682449418996990 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/ColorlessWorld-2024-4-2/Assets/Scenes/SampleScene.unity b/ColorlessWorld-2024-4-2/Assets/Scenes/SampleScene.unity index 3a797ae5..97049460 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scenes/SampleScene.unity +++ b/ColorlessWorld-2024-4-2/Assets/Scenes/SampleScene.unity @@ -35806,6 +35806,7 @@ MonoBehaviour: farCamera: {fileID: 1180006399} currentCardEntity: {fileID: 0} currentMapNode: {fileID: 0} + isPlayerMoved: 0 --- !u!4 &1285317928 Transform: m_ObjectHideFlags: 0 @@ -52665,19 +52666,7 @@ MonoBehaviour: generatePoint: {fileID: 514899946} lineOffSet: {x: 1.43, y: 0, z: 0} columnOffSet: {x: 0, y: 0, z: 0.86} - enemyGenerateDataList: - - enemyPrefab: {fileID: 1253231568001379261, guid: cca022349b339cb478907d317369caed, - type: 3} - locationX: -1 - locationY: 3 - - enemyPrefab: {fileID: 1253231568001379261, guid: 279d9389205007c4f83c957211b36449, - type: 3} - locationX: 2 - locationY: 2 - - enemyPrefab: {fileID: 1253231568001379261, guid: 49641935fdc09c548a36f937cd5858cd, - type: 3} - locationX: 2 - locationY: 3 + enemyGenerateDataList: [] mapUnityFather: {fileID: 471426433} playerNameText: {fileID: 1103775266} cardDeckNumberText: {fileID: 1577863296} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_NextRoundCostMinusOne.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_NextRoundCostMinusOne.cs new file mode 100644 index 00000000..d8663c9b --- /dev/null +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_NextRoundCostMinusOne.cs @@ -0,0 +1,21 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +public class Buff_NextRoundCostMinusOne : Buff +{ + public override void Settle() + { + //value = 0; + + } + + public override Buff NewBuff(int value) + { + Buff buff = new Buff_NextRoundCostMinusOne(); + buff.value = value; + buff.icon = BuffDataManager.Instance.LoadImage(iconPath + "Sslx_Ui_Buff_liuxue_v01"); + return buff; + } +} diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_NextRoundCostMinusOne.cs.meta b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_NextRoundCostMinusOne.cs.meta new file mode 100644 index 00000000..db1a12bc --- /dev/null +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Buff/Buff_NextRoundCostMinusOne.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d031dea67185fa0478ca3d6278fe87d3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardEntity.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardEntity.cs index 1d420b15..2372c434 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardEntity.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardEntity.cs @@ -1306,8 +1306,8 @@ public class CardEntity : MonoBehaviour { costIocn.gameObject.SetActive(true); bloodIcon.gameObject.SetActive(false); - stepIcon.gameObject.SetActive(false); - nodeIcon .gameObject.SetActive(false); + /*stepIcon.gameObject.SetActive(false); + nodeIcon .gameObject.SetActive(false);*/ } break; case Name.CostType.step: @@ -1315,8 +1315,8 @@ public class CardEntity : MonoBehaviour { costIocn.gameObject.SetActive(false); bloodIcon.gameObject.SetActive(false); - stepIcon.gameObject.SetActive(true); - nodeIcon.gameObject.SetActive(false); + /*stepIcon.gameObject.SetActive(true); + nodeIcon.gameObject.SetActive(false);*/ } break; case Name.CostType.health: @@ -1324,8 +1324,8 @@ public class CardEntity : MonoBehaviour { costIocn.gameObject.SetActive(false); bloodIcon.gameObject.SetActive(true); - stepIcon.gameObject.SetActive(false); - nodeIcon.gameObject.SetActive(false); + /*stepIcon.gameObject.SetActive(false); + nodeIcon.gameObject.SetActive(false);*/ } break; case Name.CostType.node: @@ -1333,8 +1333,8 @@ public class CardEntity : MonoBehaviour { costIocn.gameObject.SetActive(false); bloodIcon.gameObject.SetActive(false); - stepIcon.gameObject.SetActive(false); - nodeIcon.gameObject.SetActive(true); + /*stepIcon.gameObject.SetActive(false); + nodeIcon.gameObject.SetActive(true);*/ } break; } diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Card/TurnMaster.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Card/TurnMaster.cs index 9f843afe..03965d12 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Card/TurnMaster.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Card/TurnMaster.cs @@ -103,7 +103,8 @@ public class TurnMaster : Singleton ResetLegacy(); //恢复体力 - GameManager.Instance.playerState.currentStepRange = Usermanager.Instance.StepRangeCalculation(GameManager.Instance.playerState.maxStepRange); + GameManager.Instance.playerState.currentStepRange = Usermanager.Instance.StepRangeCalculation(GameManager.Instance.playerState.maxStepRange); + GameManager.Instance.isPlayerMoved = false; //显示敌人攻击虚线 EnemyManager.Instance.EnemyLine_Observer(); //回复敌人系数 @@ -237,15 +238,18 @@ public class TurnMaster : Singleton { /* totalCost = Usermanager.Instance.totalCost; Usermanager.Instance.currentCost = totalCost;*/ + int maxCost = GameManager.Instance.playerState.maxCost; if (LegacyManager.Instance.isUseful(Name.Legacy.LegacyNode_PerpetualMotionPump)) { int lastRoundCost = GameManager.Instance.playerState.currentCost; - GameManager.Instance.playerState.currentCost = GameManager.Instance.playerState.maxCost+ lastRoundCost; + maxCost += lastRoundCost; } - else + if (Usermanager.playerAbnormalCondition.ContainsKey(AbnormalCondition.nextRoundCostMinusOne)) { - GameManager.Instance.playerState.currentCost = GameManager.Instance.playerState.maxCost; + maxCost -= 1; + Usermanager.playerAbnormalCondition[AbnormalCondition.nextRoundCostMinusOne].value-=1; } + GameManager.Instance.playerState.currentCost = maxCost; /*if (Usermanager.playerAbnormalCondition.ContainsKey(AbnormalCondition.nextTurnExtraOneCost)) diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyNode.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyNode.cs index 04a28b1c..5afbecfb 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyNode.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Enemy/EnemyNode.cs @@ -275,7 +275,8 @@ public class EnemyNode : MonoBehaviour,IEnemyObserver { //this.transform.position = GameManager.Instance.X[positionX].Y[positionY].transform.position; MapUnity mapUnity = getNodeTools.LocationToGetNode(positionX, positionY); - mapUnity.enemyNode = this; + mapUnity.enemyNode = this; + EnemyState.currentHP = 1; // transform.SetParent(mapUnity.CylinderFloor.transform); if (enemyType ==EnemyType.block) { @@ -1340,6 +1341,89 @@ public class EnemyNode : MonoBehaviour,IEnemyObserver } } + public void sufferDamageIfKilled(int damageVal, bool isFromPlayer, ref bool ifKilled) + { + if (isFromPlayer == true) + { + thornCal(); + } + bleedRealize(); + acidRainRealize(); + int trueDamage = SufferDamageCalculation(damageVal); + if (trueDamage > EnemyState.shieldValue) + { + int afterVal = trueDamage - EnemyState.shieldValue; + EnemyState.shieldValue = 0; + EnemyState.currentHP -= afterVal; + } + else + { + EnemyState.shieldValue -= trueDamage; + } + Debug.Log("敌人血量" + EnemyState.currentHP); + if (EnemyState.currentHP <= 0) + { + ifKilled=true; + OnDeath(); + } + else + { + foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) + { + switch (key) + { + case AbnormalCondition.sleep: + EnemyState.abnormalCondition.Remove(key); + EnemyState.damageMultiplier = 1; + EnemyState.stepRangeMultiplier = 1; + break; + case AbnormalCondition.shedding: + MapUnity currentNode = getNodeTools.LocationToGetNode(positionX, positionY); + HashSet targets = new HashSet { currentNode }; + int count = EnemyState.abnormalCondition[AbnormalCondition.shedding].value; + getNodeTools.getCircleNode(targets, 1); + enemy.RandomPollute(targets, count); + break; + } + } + foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) + { + switch (key) + { + case AbnormalCondition.weak: + EnemyState.damageMultiplier = 0.75; + break; + case AbnormalCondition.disarm: + EnemyState.damageMultiplier = 0; + break; + } + } + foreach (var key in EnemyState.abnormalCondition.Keys.ToList()) + { + switch (key) + { + case AbnormalCondition.coma: + EnemyState.damageMultiplier = 0; + EnemyState.stepRangeMultiplier = 0; + break; + case AbnormalCondition.sleep: + EnemyState.damageMultiplier = 0; + EnemyState.stepRangeMultiplier = 0; + break; + } + } + foreach (var Buff in EnemyState.abnormalCondition) + { + Debug.Log(Buff.Key + "层数:" + Buff.Value.value); + } + + if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.flashPoint)) + { + FlashPointRealize(); + } + } + } + public void bleedCal() { if (EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.bleed)) diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/GameManager.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/GameManager.cs index b02f1b12..f294b552 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/GameManager.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/GameManager.cs @@ -107,6 +107,8 @@ public class GameManager : Singleton [Header("当前玩家拖拽的卡牌选中的地块")] public MapUnity currentMapNode; + public bool isPlayerMoved = false; + private void Start() { //生成角色数据 @@ -225,6 +227,7 @@ public class GameManager : Singleton if (playerOn.whoColour != lastPlayerOn.whoColour) { + Debug.Log("节点1"); Usermanager.Instance.SufferPlayerOnColorCondition(playerOn.whoColour); //player.ChangeColorAnim(); } @@ -237,6 +240,7 @@ public class GameManager : Singleton if (playerOn.whoColour != lastWhoColor) { // player.ChangeColorAnim(); + Debug.Log("节点2"); Usermanager.Instance.SufferPlayerOnColorCondition(playerOn.whoColour); } lastWhoColor = playerOn.whoColour; diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Player.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Player.cs index a745c69b..155b87c2 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Player.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Player.cs @@ -297,6 +297,7 @@ public class Player : MonoBehaviour // moveLineRenderer.enabled = false; playerMoveDestination.SetActive(false); destinationCannotUpdate = false; + GameManager.Instance.isPlayerMoved = true; if (LegacyManager.Instance.relicClassNameList.Contains(Name.Legacy.LegacyNode_Bipod)) { LegacyManager.Instance.legacyNodesList[Name.Legacy.LegacyNode_Bipod].ResetCount(); diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/AbnormalCondition.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/AbnormalCondition.cs index 8bda539f..189ee862 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/AbnormalCondition.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/AbnormalCondition.cs @@ -155,6 +155,8 @@ public class AbnormalCondition : Singleton public const string Buff_EnemyNode = "118"; //传染 public const string infection = "119"; + //下回合能量上限-1 + public const string nextRoundCostMinusOne = "120"; public static readonly List canNegativeNumberList = new List { angerUpperDamage, shieldUpperValue, addDrawCard }; diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/CardFunction.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/CardFunction.cs index 2d5d89da..383a0d9b 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/CardFunction.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/CardFunction.cs @@ -197,10 +197,25 @@ public static class CardFunction public const string Invisible = "96"; //击退到场地边缘 public const string repelToEnd = "97"; + //如果目标没有流血,施加流血 + public const string bleedIfNot = "98"; + //场上每有一种颜色的地块,造成n点伤害 + public const string damageMulNodeKind = "99"; + + //将剩余移动力转化为能量 + public const string switchStepToCost = "100"; + //移动到目标格子,对周围造成n点伤害 + public const string teleportAndDamageAround = "101"; + //如果本回合移动过,造成n点伤害 + public const string damageIfMoved = "102"; + //如果击杀,回复n点能量 + public const string damageAndRestoreCostIfKill = "103"; //勤俭节约 public const string thrifty = "114"; //传染 public const string infection = "119"; + //下回合能量上限-1 + public const string nextRoundCostMinusOne = "120"; diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/Name.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/Name.cs index 0947f88f..c661ed5c 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/Name.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/Tool/Name.cs @@ -459,6 +459,23 @@ public static class Name case CardFunction.repelToEnd: sb.Append("将目标击退至场地边缘"); break; + case CardFunction.damageMulNodeKind: + sb.Append("场上每有一种颜色的地块,造成" + kvp.Value + "点伤害"); + break; + case CardFunction.bleedIfNot: + sb.Append("如果目标没有流血,施加" + kvp.Value + "层流血"); + break; + case CardFunction.switchStepToCost: + sb.Append("本回合将剩余移动力转化为能量"); + break; + case CardFunction.teleportAndDamageAround: + sb.Append("传送到目标格子,对周围造成" + kvp.Value + "点伤害"); + break; + case CardFunction.damageIfMoved: + sb.Append("如果本回合移动过,造成" + kvp.Value + "点伤害"); + break; + case CardFunction.damageAndRestoreCostIfKill: + break; } } diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/BuffDataManager.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/BuffDataManager.cs index 9108a23d..7b68c737 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/BuffDataManager.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/BuffDataManager.cs @@ -79,6 +79,7 @@ public class BuffDataManager : Singleton abnormalCondition.Add("116", new Buff_YellowNode()); abnormalCondition.Add("117", new Buff_BlueNode()); abnormalCondition.Add("118", new Buff_EnemyNode()); + abnormalCondition.Add("120", new Buff_NextRoundCostMinusOne()); abnormalCondition.Add("206", new Buff_flashPoint()); abnormalCondition.Add("207", new Buff_BonePile()); diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/MapUnityManager.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/MapUnityManager.cs index eeb2437a..6662579b 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/MapUnityManager.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/MapUnityManager.cs @@ -66,6 +66,31 @@ public class MapUnityManager : Singleton return advColor; } + public int getNodeKind() + { + int nodeKind = 0; + if (redNodeCount>0) + { + nodeKind++; + } + if (blackNodeCount > 0) + { + nodeKind++; + } + if (blueNodeCount > 0) + { + nodeKind++; + } + if (yellowNodeCount > 0) + { + nodeKind++; + } + if (whiteNodeCount > 0) + { + nodeKind++; + } + return nodeKind; + } public string GetKeyWithMaxValue(Dictionary dictionary) { diff --git a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/SettlementManager.cs b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/SettlementManager.cs index f5084cea..19fc7880 100644 --- a/ColorlessWorld-2024-4-2/Assets/Scripts/manager/SettlementManager.cs +++ b/ColorlessWorld-2024-4-2/Assets/Scripts/manager/SettlementManager.cs @@ -7,6 +7,7 @@ using Unity.VisualScripting; using UnityEditor.Experimental.GraphView; using UnityEngine; using static Name; +using static UnityEditor.PlayerSettings; using static UnityEngine.EventSystems.EventTrigger; @@ -28,6 +29,25 @@ public class SettlementManager : Singleton } } + public void bleedIfNotWork(int stackVak, List influencePreviewPool) + { + for (int i = 0; i < influencePreviewPool.Count; i++) + { + if (influencePreviewPool[i].enemyNode != null && influencePreviewPool[i].enemyNode.enemyType != EnemyNode.EnemyType.block) + { + if (influencePreviewPool[i].enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.bleed)) + { + + } + else + { + influencePreviewPool[i].enemyNode.sufferAbnormalCondition(AbnormalCondition.bleed, stackVak); + } + + } + } + } + public void doubleBleed(List influencePreviewPool) { if (influencePreviewPool[0].enemyNode != null && influencePreviewPool[0].enemyNode.EnemyState.abnormalCondition.ContainsKey(AbnormalCondition.bleed)) @@ -515,6 +535,21 @@ public class SettlementManager : Singleton } } + public void teleportAndDamageAround(List influencePreviewPool,int damage) + { + if (influencePreviewPool[0].enemyNode != null) + { + } + else + { + getNodeTools.playerTeleportToNode(influencePreviewPool[0]); + HashSet values = new HashSet { influencePreviewPool[0]}; + getNodeTools.getCircleNode(values,1); + damageWork(damage, values.ToList(), 0); + + } + } + public void teleportAround(List influencePreviewPool) { HashSet targets = new HashSet { influencePreviewPool[0] }; @@ -713,6 +748,7 @@ public class SettlementManager : Singleton public void damageWork(int damageVal, List influencePreviewPool,int pierceNum) { int pierceCount=0; + pierceNum = -1; if (pierceNum!=-1) { for (int i = 0; i < influencePreviewPool.Count; i++) @@ -743,6 +779,49 @@ public class SettlementManager : Singleton } + public void damageWorkIfKillRestoreCost(int damageVal, List influencePreviewPool, int pierceNum,int restoreCost) + { + int pierceCount = 0; + pierceNum = -1; + bool ifKilled=false; + if (pierceNum != -1) + { + for (int i = 0; i < influencePreviewPool.Count; i++) + { + //造成伤害 + if (influencePreviewPool[i].enemyNode != null) + { + pierceCount++; + influencePreviewPool[i].enemyNode.sufferDamageIfKilled(Usermanager.Instance.DamageCalculation(damageVal), true,ref ifKilled); + if (ifKilled) + { + GameManager.Instance.playerState.currentCost += restoreCost; + } + if (pierceCount >= pierceNum + 1) + { + break; + } + } + } + } + else + { + for (int i = 0; i < influencePreviewPool.Count; i++) + { + //造成伤害 + if (influencePreviewPool[i].enemyNode != null) + { + influencePreviewPool[i].enemyNode.sufferDamageIfKilled(Usermanager.Instance.DamageCalculation(damageVal), true, ref ifKilled); + if (ifKilled) + { + GameManager.Instance.playerState.currentCost += restoreCost; + } + } + } + } + + } + public IEnumerator settle(CardOriginalData cardOriginalData, HashSet influencePreviewPoolSet, int cardIndex, MapUnity targetNode) { List influencePreviewPool=new List(influencePreviewPoolSet); @@ -834,10 +913,26 @@ public class SettlementManager : Singleton damageWork(damageVal, influencePreviewPool, pierceNum); } break; + case CardFunction.damageAndRestoreCostIfKill: + string[] valuesB = kvp.Value.Split("&"); + int damageValB = int.Parse(valuesB[0]); + int restoreCost = int.Parse(valuesB[1]); + damageWorkIfKillRestoreCost(damageValB, influencePreviewPool, pierceNum,restoreCost); + break; case CardFunction.damageForRedNode: List redList = new List(getNodeTools.getNodesWithColor(Name.Color.Red)); damageWork(int.Parse(kvp.Value), redList, pierceNum); break; + case CardFunction.damageIfMoved: + if (GameManager.Instance.isPlayerMoved) + { + damageWork(int.Parse(kvp.Value), influencePreviewPool, pierceNum); + } + break; + case CardFunction.damageMulNodeKind: + int nodeKind=MapUnityManager.Instance.getNodeKind(); + damageWork(int.Parse(kvp.Value)*nodeKind, influencePreviewPool, pierceNum); + break; case CardFunction.damageForBlueNode: List blueList = new List(getNodeTools.getNodesWithColor(Name.Color.Blue)); damageWork(int.Parse(kvp.Value), blueList, pierceNum); @@ -931,6 +1026,9 @@ public class SettlementManager : Singleton case CardFunction.doubleBleed: doubleBleed(influencePreviewPool); break; + case CardFunction.bleedIfNot: + bleedIfNotWork(int.Parse(kvp.Value), influencePreviewPool); + break; case CardFunction.tripleBleed: tripleBleed(influencePreviewPool); break; @@ -955,6 +1053,11 @@ public class SettlementManager : Singleton case CardFunction.nodesForCost: nodesForCostWork(influencePreviewPool, int.Parse(kvp.Value)); break; + case CardFunction.switchStepToCost: + int step=GameManager.Instance.playerState.currentStepRange; + GameManager.Instance.playerState.currentStepRange = 0; + GameManager.Instance.playerState.currentCost += step; + break; case CardFunction.dyeing: // break; @@ -985,6 +1088,9 @@ public class SettlementManager : Singleton case CardFunction.teleportAround: teleportAround(new List { targetNode }); break; + case CardFunction.teleportAndDamageAround: + teleportAndDamageAround(influencePreviewPool, int.Parse(kvp.Value)); + break; case CardFunction.pullFirstEnemyToSelf: pullFirstEnemyToSelf(influencePreviewPool); break; @@ -1034,6 +1140,7 @@ public class SettlementManager : Singleton case CardFunction.calm: case CardFunction.Invisible: case CardFunction.thrifty: + case CardFunction.nextRoundCostMinusOne: Usermanager.Instance.SufferPlayerAbnormalCondition(kvp.Key, int.Parse(kvp.Value)); break; case CardFunction.doublebleedDamage: @@ -1155,6 +1262,27 @@ public class SettlementManager : Singleton Usermanager .Instance .expectDamage.Item1 = Usermanager.Instance.DamageCalculation(int.Parse(kvp.Value)); Usermanager.Instance.expectDamage.Item2 = 1; break; + case CardFunction.damageAndRestoreCostIfKill: + string[] valuesB = kvp.Value.Split("&"); + int damageValB = int.Parse(valuesB[0]); + int restoreCost = int.Parse(valuesB[1]); + Usermanager.Instance.expectDamage.Item1 = Usermanager.Instance.DamageCalculation(damageValB); + Usermanager.Instance.expectDamage.Item2 = 1; + break; + case CardFunction.damageMulNodeKind: + int nodeKind = MapUnityManager.Instance.getNodeKind(); + Usermanager.Instance.expectDamage.Item1 = Usermanager.Instance.DamageCalculation(int.Parse(kvp.Value) * nodeKind); + Usermanager.Instance.expectDamage.Item2 = 1; + break; + case CardFunction.damageIfMoved: + int damage = 0; + if (GameManager.Instance.isPlayerMoved) + { + damage= Usermanager.Instance.DamageCalculation(int.Parse(kvp.Value)); + } + Usermanager.Instance.expectDamage.Item1 = damage; + Usermanager.Instance.expectDamage.Item2 = 1; + break; case CardFunction.damagexy: string[] values = kvp.Value.Split("&"); int damageVal = int.Parse(values[0]); diff --git a/ColorlessWorld-2024-4-2/Assets/StreamingAssets/card_data_5.csv b/ColorlessWorld-2024-4-2/Assets/StreamingAssets/card_data_5.csv index c9275a65..8270f095 100644 --- a/ColorlessWorld-2024-4-2/Assets/StreamingAssets/card_data_5.csv +++ b/ColorlessWorld-2024-4-2/Assets/StreamingAssets/card_data_5.csv @@ -2,15 +2,15 @@ 1001,1,1,1,3_1,none,1,5,0_0;1_0;2_0,white;white;white,CardIcon/1010,鎸ョ爫,1 1002,1,1,1,3_1,none,2,4,0_0;-1_1;-1_-1,white;white;white,CardIcon/1010,鏍兼尅,1 1003,1,1,0,3_1,none,40,1,1_0;0_1;0_-1;-1_0;-1_1;-1_-1,white;white;white;white;white;white,CardIcon/1010,鐑熷湀,1 -1004,1,2,1,3_1,none,12;13,2;2,0_0;1_0;0_-1;0_1,blue;blue;red;red,CardIcon/1011,鎼滅储,1 +1004,1,1,1,3_1,none,12;13,2;2,0_0;1_0;0_-1;0_1,blue;blue;red;red,CardIcon/1011,鎼滅储,1 1005,1,1,0,3_1,none,1;12,8;1,1_0;0_1;0_-1;-1_0;-1_1;-1_-1,red;red;red;red;red;red,CardIcon/1012,鍒鎵,2 1006,1,0,1,3_1,none,13,2,1_0;0_-1;0_1;2_0;1_-1;1_1,red;red;red;blue;blue;blue,CardIcon/1013,鍠峰悙,2 1009,1,1,1,3_1,none,23,1,0_0;1_0;2_0,green;green;green,CardIcon/1016,绐佸埡,2 -1010,1,2,1,3_1,none,19,2,0_0;1_0;2_0;1_1;1_-1,blue;blue;blue;blue;blue,CardIcon/1017,閲嶉敜,1 +1010,1,1,1,3_1,none,19,2,0_0;1_0;2_0;1_1;1_-1,blue;blue;blue;blue;blue,CardIcon/1017,閲嶉敜,1 1011,1,1,1,3_1,none,5,1,0_0;1_0;2_0;3_0;4_0,blue;blue;blue;blue;blue,CardIcon/1018,闀块灜,2 1012,1,0,1,3_1,none,none,none,0_0;1_0;0_1,yellow;red;blue,CardIcon/1019,褰╃悆,1 -1013,1,2,1,3_1,none,2,10,1_0;0_-1;0_1;2_0;1_-1;1_1;3_0;2_1;2_-1,red;red;red;blue;blue;blue;yellow;yellow;yellow,CardIcon/1020,涔濆鏍,2 -1014,1,2,1,3_1,none,1,7,1_0;2_0;3_0;-1_1;-1_2;-2_3;-1_-1;-1_-2;-2_-3,red;red;red;yellow;yellow;yellow;blue;blue;blue,CardIcon/1021,涓夎壊绾,2 +1013,1,1,1,3_1,none,13;2,1;8,1_0;0_-1;0_1;2_0;1_-1;1_1;3_0;2_1;2_-1,red;red;red;blue;blue;blue;yellow;yellow;yellow,CardIcon/1020,涔濆鏍,2 +1014,1,1,1,3_1,none,1,5,1_0;2_0;3_0;-1_1;-1_2;-2_3;-1_-1;-1_-2;-2_-3,red;red;red;yellow;yellow;yellow;blue;blue;blue,CardIcon/1021,涓夎壊绾,2 1016,1,1,1,3_1,none,53,2&3,0_0;1_0;2_0;0_1;0_-1;1_2;1_-2,red;red;red;red;red;red;red,CardIcon/1021,鏁e皠,1 -1017,1,2,1,3_1,none,17,1,0_0;1_0;2_0;3_0;2_1;2_-1;2_2;2_-2,blue;blue;blue;blue;blue;blue;blue;blue,CardIcon/1021,鍗曞悜绠ご,2 -1007,1,3,1,3_1,none,1,32,0_0;1_0;0_1;0_-1;1_1;1_-1;1_2;1_-2,black;black;black;black;black;black;black;black,CardIcon/1021,榛戠伀鑽,3 +1017,1,1,1,3_1,none,17,1,0_0;1_0;2_0;3_0;2_1;2_-1;2_2;2_-2,blue;blue;blue;blue;blue;blue;blue;blue,CardIcon/1021,鍗曞悜绠ご,2 +1007,1,2,1,3_1,none,1,20,0_0;1_0;0_1;0_-1;1_1;1_-1;1_2;1_-2,black;black;black;black;black;black;black;black,CardIcon/1021,榛戠伀鑽,3 diff --git a/ColorlessWorld-2024-4-2/Assets/StreamingAssets/card_data_effect_4.csv b/ColorlessWorld-2024-4-2/Assets/StreamingAssets/card_data_effect_4.csv index d56678f1..f51ca302 100644 --- a/ColorlessWorld-2024-4-2/Assets/StreamingAssets/card_data_effect_4.csv +++ b/ColorlessWorld-2024-4-2/Assets/StreamingAssets/card_data_effect_4.csv @@ -28,3 +28,11 @@ 2036,1,1,65;66,5;1,yellow>10,67,1,66,0_0,EffectCardIcon/琛铔,1,3,1,琛铔,缈讳笁鍊 2038,1,2,97,1,blue<9,33,1,none,0_0,EffectCardIcon/鐚涚儓涓鍑,1,2,0,鐚涚儓涓鍑,none 2039,1,0,65;11,5;2,red>19,11,3,11,0_0,EffectCardIcon/鎴樺惣,0,3,1,鎴樺惣,none +2040,1,1,98,5,yellow>6,9,2,none,0_0,EffectCardIcon/鎴樺惣,1,1,0,浼ゅ彛,棰濆鏂藉姞2灞傛祦琛 +2041,1,1,53,7&2,red>12,12,1,none,0_0,EffectCardIcon/鎴樺惣,1,2,0,椋為晼,none +2042,1,1,99,3,none,none,none,none,0_0,EffectCardIcon/鎴樺惣,1,2,0,鍓戦樀,none +2043,1,0,12;16;120,3;3;1,red>10,11,1,none,0_0,EffectCardIcon/鎴樺惣,0,3,1,瀛ゆ敞涓鎺,none +2044,1,1,12;102,1;10,none,none,none,none,0_0,EffectCardIcon/鎴樺惣,1,1,0,鑳屽埡,none +2045,1,1,101,7,blue>5,12,1,none,0_0,EffectCardIcon/鎴樺惣,1,1,0,璺佃笍,none +2046,1,1,100,1,yellow>7,16,2,none,0_0,EffectCardIcon/鎴樺惣,0,2,0,鐙傛垬,none +2047,1,1,1,22,blue>9,103,22&2,1,0_0,EffectCardIcon/鎴樺惣,1,2,0,鏂╂潃,濡傛灉鍑绘潃锛屽洖澶2鐐硅兘閲