|
|
|
@ -169,7 +169,7 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
|
|
|
|
public GameObject getRandomWeaponNodeForPlayer() |
|
|
|
{ |
|
|
|
string level= MathTool.GetRandomElements(Name.WeaponNodeLevel.WeaponNodeLevelSet,1).ElementAt(0); |
|
|
|
string level= MathTool.GetRandomElements(Name.WeaponNodeLevel.WeaponNodeLevelSetWithoutBasic, 1).ElementAt(0); |
|
|
|
return getRandomWeaponNodeForPlayerWithLevel(level); |
|
|
|
} |
|
|
|
|
|
|
|
@ -177,20 +177,23 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
{ |
|
|
|
GameObject gem = Instantiate(Resources.Load<GameObject>(Name.WeaponNode.PrefabPath + Name.WeaponNode.PrefabName)); |
|
|
|
string condition = ""; |
|
|
|
HashSet<string> resultSet = new HashSet<string>(); |
|
|
|
Dictionary<string, float> resultSet = new Dictionary<string, float>(); |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerBasicConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerBasicConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerSimpleConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerElementaryConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerElementaryConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerIntermediateConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerIntermediateConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerAdvancedConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerAdvancedConditionSet); |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
@ -203,6 +206,9 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
resultSet = Name.WeaponNodeFunction.PlayerBasicResultSet; |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
resultSet = Name.WeaponNodeFunction.PlayerSimpleResultSet; |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
resultSet = Name.WeaponNodeFunction.PlayerElementaryResultSet; |
|
|
|
break; |
|
|
|
@ -217,7 +223,7 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
string resultValue = ""; |
|
|
|
conditionValue = getConditionValueWithLevel(level,ref condition, ref nodesMark, ref nodesColor); |
|
|
|
checkResultSetRationality(ref resultSet, condition); |
|
|
|
result = MathTool.GetRandomElements(resultSet, 1).ElementAt(0); |
|
|
|
result = MathTool.GetRandomString(resultSet); |
|
|
|
resultValue = getResultValueWithLevel(level,ref result, condition, conditionValue); |
|
|
|
WeaponNode weaponNode = gem.GetComponent<WeaponNode>(); |
|
|
|
weaponNode.result = result; |
|
|
|
@ -229,7 +235,7 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
return gem; |
|
|
|
} |
|
|
|
|
|
|
|
public string getEveryNodeAddScoreValue(string level) |
|
|
|
public string getEveryNodeAddScoreValue(string level,string condition) |
|
|
|
{ |
|
|
|
string resultValue = ""; |
|
|
|
HashSet<string> resultSet = new HashSet<string>(); |
|
|
|
@ -237,6 +243,10 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
resultSet = Name.EveryNodeAddScoreResultSet.BasiclSet; |
|
|
|
if (condition.Equals(Name.none)) |
|
|
|
{ |
|
|
|
resultSet = Name.EveryNodeAddScoreResultSet.BasiclWithoutConditionSet; |
|
|
|
} |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
resultSet = Name.EveryNodeAddScoreResultSet.ElementarySet; |
|
|
|
@ -252,7 +262,7 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
resultValue = MathTool.GetRandomElements(resultSet, 1).ElementAt(0); |
|
|
|
return resultValue; |
|
|
|
} |
|
|
|
public void checkResultSetRationality(ref HashSet<string> set,string condition) |
|
|
|
public void checkResultSetRationality(ref Dictionary<string, float> set,string condition) |
|
|
|
{ |
|
|
|
Match match = System.Text.RegularExpressions.Regex.Match(condition, Name.Regex.cardConditionPattern); |
|
|
|
if (match.Success) |
|
|
|
@ -327,7 +337,7 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
} |
|
|
|
} |
|
|
|
//屏蔽策略
|
|
|
|
public void resultBlockingPolicy(string firstPart, ref HashSet<string> set) |
|
|
|
public void resultBlockingPolicy(string firstPart, ref Dictionary<string, float> set) |
|
|
|
{ |
|
|
|
switch (firstPart) |
|
|
|
{ |
|
|
|
@ -373,16 +383,19 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerBasicConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerBasicConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerSimpleConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerElementaryConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerElementaryConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerIntermediateConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerIntermediateConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerAdvancedConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerAdvancedConditionSet); |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
@ -402,12 +415,15 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
{ |
|
|
|
WeaponNodeDataPair resultData = new WeaponNodeDataPair(); |
|
|
|
//string result = "";
|
|
|
|
HashSet<string> resultSet = new HashSet<string>(); |
|
|
|
Dictionary<string, float> resultSet = new Dictionary<string, float>(); |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
resultSet = Name.WeaponNodeFunction.PlayerBasicResultSet; |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
resultSet = Name.WeaponNodeFunction.PlayerSimpleResultSet; |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
resultSet = Name.WeaponNodeFunction.PlayerElementaryResultSet; |
|
|
|
break; |
|
|
|
@ -419,7 +435,7 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
break; |
|
|
|
} |
|
|
|
checkResultSetRationality(ref resultSet, condition); |
|
|
|
string result = MathTool.GetRandomElements(resultSet, 1).ElementAt(0); |
|
|
|
string result = MathTool.GetRandomString(resultSet); |
|
|
|
string resultValue = getResultValueWithLevel(level, ref result, condition, Name.none); |
|
|
|
resultData.conditionOrResult = result; |
|
|
|
resultData.value = resultValue; |
|
|
|
@ -430,20 +446,23 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
{ |
|
|
|
GameObject gem = Instantiate(Resources.Load<GameObject>(Name.WeaponNode.PrefabPath + Name.WeaponNode.PrefabName)); |
|
|
|
string condition = ""; |
|
|
|
HashSet<string> resultSet= new HashSet<string>(); |
|
|
|
Dictionary<string, float> resultSet = new Dictionary<string, float>(); |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerBasicConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerBasicConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerSimpleConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerElementaryConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerElementaryConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerIntermediateConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerIntermediateConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerAdvancedConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerAdvancedConditionSet); |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
@ -455,7 +474,7 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
string resultValue = ""; |
|
|
|
conditionValue = getConditionValueWithLevel(level, ref condition, ref nodesMark, ref nodesColor); |
|
|
|
checkResultSetRationality(ref resultSet, condition); |
|
|
|
result = MathTool.GetRandomElements(resultSet, 1).ElementAt(0); |
|
|
|
result = MathTool.GetRandomString(resultSet); |
|
|
|
resultValue = getResultValueWithLevel(level, ref result, condition, conditionValue); |
|
|
|
WeaponNode weaponNode = gem.GetComponent<WeaponNode>(); |
|
|
|
weaponNode.result = result; |
|
|
|
@ -466,7 +485,7 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
weaponNode.nodesColor = nodesColor.ToArray(); |
|
|
|
return gem; |
|
|
|
} |
|
|
|
public GameObject getRandomWeaponNodeForPlayerWithLevelDiff(int levelDiff) |
|
|
|
/*public GameObject getRandomWeaponNodeForPlayerWithLevelDiff(int levelDiff) |
|
|
|
{ |
|
|
|
GameObject gem = Instantiate(Resources.Load<GameObject>(Name.WeaponNode.PrefabPath + Name.WeaponNode.PrefabName)); |
|
|
|
string condition = ""; |
|
|
|
@ -496,7 +515,7 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (conditionLevel) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerBasicConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerBasicConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerElementaryConditionSet, 1).ElementAt(0); |
|
|
|
@ -515,16 +534,16 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (levelDiff) |
|
|
|
{ |
|
|
|
case 0: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerBasicResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerBasicResultSet); |
|
|
|
break; |
|
|
|
case 1: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerElementaryResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerElementaryResultSet); |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerIntermediateResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerIntermediateResultSet); |
|
|
|
break; |
|
|
|
case 3: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerAdvancedResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerAdvancedResultSet); |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
@ -533,16 +552,16 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (levelDiff) |
|
|
|
{ |
|
|
|
case -1: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerBasicResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerBasicResultSet); |
|
|
|
break; |
|
|
|
case 0: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerElementaryResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerElementaryResultSet); |
|
|
|
break; |
|
|
|
case 1: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerIntermediateResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerIntermediateResultSet); |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerAdvancedResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerAdvancedResultSet); |
|
|
|
break; |
|
|
|
} |
|
|
|
break; |
|
|
|
@ -550,16 +569,16 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (levelDiff) |
|
|
|
{ |
|
|
|
case -2: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerBasicResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerBasicResultSet); |
|
|
|
break; |
|
|
|
case -1: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerElementaryResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerElementaryResultSet); |
|
|
|
break; |
|
|
|
case 0: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerIntermediateResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerIntermediateResultSet); |
|
|
|
break; |
|
|
|
case 1: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerAdvancedResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerAdvancedResultSet); |
|
|
|
break; |
|
|
|
} |
|
|
|
break; |
|
|
|
@ -567,16 +586,16 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (levelDiff) |
|
|
|
{ |
|
|
|
case -3: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerBasicResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerBasicResultSet); |
|
|
|
break; |
|
|
|
case -2: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerElementaryResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerElementaryResultSet); |
|
|
|
break; |
|
|
|
case -1: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerIntermediateResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerIntermediateResultSet); |
|
|
|
break; |
|
|
|
case 0: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerAdvancedResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerAdvancedResultSet); |
|
|
|
break; |
|
|
|
} |
|
|
|
break; |
|
|
|
@ -592,16 +611,16 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (resultLevel) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
result = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerBasicResultSet, 1).ElementAt(0); |
|
|
|
result = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerBasicResultSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
result = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerElementaryResultSet, 1).ElementAt(0); |
|
|
|
result = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerElementaryResultSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
result = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerIntermediateResultSet, 1).ElementAt(0); |
|
|
|
result = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerIntermediateResultSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
result = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerAdvancedResultSet, 1).ElementAt(0); |
|
|
|
result = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerAdvancedResultSet); |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
@ -617,7 +636,7 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
weaponNode.nodesMark = nodesMark.ToArray(); |
|
|
|
weaponNode.nodesColor = nodesColor.ToArray(); |
|
|
|
return gem; |
|
|
|
} |
|
|
|
}*/ |
|
|
|
|
|
|
|
public GameObject getRandomWeaponNodeForPlayerWithLevelDiffAndConditionlevel(int levelDiff,string conditionLevel) |
|
|
|
{ |
|
|
|
@ -629,16 +648,19 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (conditionLevel) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerBasicConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerBasicConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerSimpleConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerElementaryConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerElementaryConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerIntermediateConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerIntermediateConditionSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerAdvancedConditionSet, 1).ElementAt(0); |
|
|
|
condition = MathTool.GetRandomString(Name.WeaponNodeCondition.PlayerAdvancedConditionSet); |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
@ -648,16 +670,16 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (levelDiff) |
|
|
|
{ |
|
|
|
case 0: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerBasicResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerBasicResultSet); |
|
|
|
break; |
|
|
|
case 1: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerElementaryResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerElementaryResultSet); |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerIntermediateResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerIntermediateResultSet); |
|
|
|
break; |
|
|
|
case 3: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerAdvancedResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerAdvancedResultSet); |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
@ -666,16 +688,16 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (levelDiff) |
|
|
|
{ |
|
|
|
case -1: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerBasicResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerBasicResultSet); |
|
|
|
break; |
|
|
|
case 0: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerElementaryResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerElementaryResultSet); |
|
|
|
break; |
|
|
|
case 1: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerIntermediateResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerIntermediateResultSet); |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerAdvancedResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerAdvancedResultSet); |
|
|
|
break; |
|
|
|
} |
|
|
|
break; |
|
|
|
@ -683,16 +705,16 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (levelDiff) |
|
|
|
{ |
|
|
|
case -2: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerBasicResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerBasicResultSet); |
|
|
|
break; |
|
|
|
case -1: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerElementaryResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerElementaryResultSet); |
|
|
|
break; |
|
|
|
case 0: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerIntermediateResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerIntermediateResultSet); |
|
|
|
break; |
|
|
|
case 1: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerAdvancedResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerAdvancedResultSet); |
|
|
|
break; |
|
|
|
} |
|
|
|
break; |
|
|
|
@ -700,16 +722,16 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (levelDiff) |
|
|
|
{ |
|
|
|
case -3: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerBasicResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerBasicResultSet); |
|
|
|
break; |
|
|
|
case -2: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerElementaryResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerElementaryResultSet); |
|
|
|
break; |
|
|
|
case -1: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerIntermediateResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerIntermediateResultSet); |
|
|
|
break; |
|
|
|
case 0: |
|
|
|
resultLevel = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerAdvancedResultSet, 1).ElementAt(0); |
|
|
|
resultLevel = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerAdvancedResultSet); |
|
|
|
break; |
|
|
|
} |
|
|
|
break; |
|
|
|
@ -725,16 +747,16 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (resultLevel) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
result = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerBasicResultSet, 1).ElementAt(0); |
|
|
|
result = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerBasicResultSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
result = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerElementaryResultSet, 1).ElementAt(0); |
|
|
|
result = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerElementaryResultSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
result = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerIntermediateResultSet, 1).ElementAt(0); |
|
|
|
result = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerIntermediateResultSet); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
result = MathTool.GetRandomElements(Name.WeaponNodeFunction.PlayerAdvancedResultSet, 1).ElementAt(0); |
|
|
|
result = MathTool.GetRandomString(Name.WeaponNodeFunction.PlayerAdvancedResultSet); |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
@ -753,133 +775,7 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public string getConditionValueWithLevel(string level,ref string condition, ref List<string> nodesMark, ref List<string> nodesColor) |
|
|
|
{ |
|
|
|
string conditionValue = ""; |
|
|
|
switch (condition) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeCondition.position: |
|
|
|
conditionValue = MathTool.GetRandomElements(new HashSet<string> { "0", "1", "2", "3", "4" }, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.positionUnused: |
|
|
|
conditionValue = MathTool.GetRandomElements(new HashSet<string> { "0", "1", "2", "3", "4" }, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.positionUsed: |
|
|
|
conditionValue = MathTool.GetRandomElements(new HashSet<string> { "0", "1", "2", "3", "4" }, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.diffSettle: |
|
|
|
conditionValue = Name.none; |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.usedCard: |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
conditionValue = MathTool.GetRandomElements(new HashSet<string> { "1" }, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
conditionValue = MathTool.GetRandomElements(new HashSet<string> { "2", }, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
conditionValue = MathTool.GetRandomElements(new HashSet<string> { "3" }, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
conditionValue = MathTool.GetRandomElements(new HashSet<string> { "4"}, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
} |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.threeColorDiffMoreThan: |
|
|
|
conditionValue = MathTool.GetRandomElements(new HashSet<string> { "3", "4", "5" }, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.everyNumNodeConvert: |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(10, 11), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(7, 9), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(5, 6), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(3, 4), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
} |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.everyColorNodeConvert: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerColorConvertSet, 1).ElementAt(0); |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(6, 6), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(5, 5), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(4, 4), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(3, 3), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
} |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.bombbomb: |
|
|
|
conditionValue = Name.none; |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.node: |
|
|
|
conditionValue = Name.none; |
|
|
|
HashSet<string> nodesA = new HashSet<string>(); |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
nodesA = MathTool.GetRandomElements(new HashSet<string> { "1_0", "-1_0", "0_1", "0_-1", "-1_1", "-1_-1" }, 3); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
nodesA = MathTool.GetRandomElements(new HashSet<string> { "1_0", "-1_0", "0_1", "0_-1", "-1_1", "-1_-1" }, 4); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
nodesA = MathTool.GetRandomElements(new HashSet<string> { "1_0", "-1_0", "0_1", "0_-1", "-1_1", "-1_-1" }, 5); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
nodesA = MathTool.GetRandomElements(new HashSet<string> { "1_0", "-1_0", "0_1", "0_-1", "-1_1", "-1_-1" }, 6); |
|
|
|
break; |
|
|
|
} |
|
|
|
nodesA.Add("0_0"); |
|
|
|
nodesMark = nodesA.ToList(); |
|
|
|
for (int i = 0; i < nodesA.Count; i++) |
|
|
|
{ |
|
|
|
nodesColor.Add(MathTool.GetRandomElements(new HashSet<string> { Name.Color.Red, Name.Color.Blue, Name.Color.Yellow }, 1).ElementAt(0)); |
|
|
|
} |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.cardConditionPattern: |
|
|
|
conditionValue = Name.none; |
|
|
|
StringBuilder sb = new StringBuilder(); |
|
|
|
sb.Append(MathTool.GetRandomElements(new HashSet<string> { Name.Color.Red, Name.Color.Blue, Name.Color.Yellow }, 1).ElementAt(0)) |
|
|
|
.Append(MathTool.GetRandomElements(new HashSet<string> { "<", ">" }, 1).ElementAt(0)); |
|
|
|
string part3 = ""; |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
part3 = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(6, 9), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
part3 = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(10, 15), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
part3 = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(18, 24), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
part3 = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(35, 45), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
} |
|
|
|
sb.Append(part3); |
|
|
|
condition = sb.ToString(); |
|
|
|
break; |
|
|
|
} |
|
|
|
return conditionValue; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public string getConditionValueWithLevelForForge(string level, ref string condition, ref List<string> nodesMark, ref List<string> nodesColor,string result) |
|
|
|
{ |
|
|
|
@ -924,6 +820,9 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(10, 11), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(9, 9), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(7, 9), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
@ -940,6 +839,9 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(7, 7), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(6, 6), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
@ -962,6 +864,9 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
nodesA = MathTool.GetRandomElements(new HashSet<string> { "1_0", "-1_0", "0_1", "0_-1", "-1_1", "-1_-1" }, 2); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
nodesA = MathTool.GetRandomElements(new HashSet<string> { "1_0", "-1_0", "0_1", "0_-1", "-1_1", "-1_-1" }, 3); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
@ -991,7 +896,10 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
part3 = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(6, 9), 1).ElementAt(0); |
|
|
|
part3 = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(5, 7), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
part3 = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(8, 9), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
part3 = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(10, 15), 1).ElementAt(0); |
|
|
|
@ -1010,7 +918,25 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
return conditionValue; |
|
|
|
} |
|
|
|
|
|
|
|
public string getResultValueWithLevel(string level,ref string result, string condition, string conditionValue) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void loadEnemyWeaponNode(int position, GameObject weaponNode) |
|
|
|
{ |
|
|
|
|
|
|
|
Transform weaponSlot = enemyWeaponNodeList.GetChild(position); |
|
|
|
if (weaponSlot != null) |
|
|
|
{ |
|
|
|
ClearAllChildren(weaponSlot); |
|
|
|
weaponNode.transform.SetParent(weaponSlot.transform, true); |
|
|
|
weaponNode.transform.localPosition = Vector3.zero; |
|
|
|
weaponNode.transform.localEulerAngles = Vector3.zero; |
|
|
|
weaponNode.transform.localScale = Vector3.one; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public string getResultValueWithLevel(string level, ref string result, string condition, string conditionValue) |
|
|
|
{ |
|
|
|
string resultValue = ""; |
|
|
|
HashSet<string> resultSet = new HashSet<string>(); |
|
|
|
@ -1020,13 +946,20 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(5, 7), 1).ElementAt(0); |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(5, 6), 1).ElementAt(0); |
|
|
|
if (condition.Equals(Name.none)) |
|
|
|
{ |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(4, 4), 1).ElementAt(0); |
|
|
|
} |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(7, 9), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(8, 12), 1).ElementAt(0); |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(10, 13), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(13, 18), 1).ElementAt(0); |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(14, 18), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(23, 30), 1).ElementAt(0); |
|
|
|
@ -1056,6 +989,13 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(6, 8), 1).ElementAt(0); |
|
|
|
if (condition.Equals(Name.none)) |
|
|
|
{ |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(5, 5), 1).ElementAt(0); |
|
|
|
} |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(9, 10), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(11, 17), 1).ElementAt(0); |
|
|
|
@ -1072,10 +1012,17 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(3, 4), 1).ElementAt(0); |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(3, 3), 1).ElementAt(0); |
|
|
|
if (condition.Equals(Name.none)) |
|
|
|
{ |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(2, 2), 1).ElementAt(0); |
|
|
|
} |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(4, 5), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(5, 7), 1).ElementAt(0); |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(6, 7), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(8, 10), 1).ElementAt(0); |
|
|
|
@ -1089,20 +1036,20 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(1, 2), 1).ElementAt(0); |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(1, 1), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(3, 3), 1).ElementAt(0); |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(2, 2), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(4, 5), 1).ElementAt(0); |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(3, 3), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
} |
|
|
|
break; |
|
|
|
case Name.WeaponNodeFunction.everyRedNodeAddScore: |
|
|
|
case Name.WeaponNodeFunction.everyYellowNodeAddScore: |
|
|
|
case Name.WeaponNodeFunction.everyBlueNodeAddScore: |
|
|
|
resultValue = getEveryNodeAddScoreValue(level); |
|
|
|
resultValue = getEveryNodeAddScoreValue(level,condition); |
|
|
|
break; |
|
|
|
case Name.NodeItem.Volcano: |
|
|
|
switch (level) |
|
|
|
@ -1110,6 +1057,9 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(1, 1), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(1, 1), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
resultValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(2, 2), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
@ -1130,62 +1080,50 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
resultValue = MathTool.GetRandomElements(targets, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
} |
|
|
|
if (Name.WeaponNodeCondition.PlayerConvertSet.Contains(condition)&&result.Equals(Name.WeaponNodeFunction.addScore)) |
|
|
|
if (Name.WeaponNodeCondition.PlayerConvertSet.Contains(condition) && result.Equals(Name.WeaponNodeFunction.addScore)) |
|
|
|
{ |
|
|
|
result = Name.WeaponNodeFunction.addScoreThisTurn; |
|
|
|
} |
|
|
|
return resultValue; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void loadEnemyWeaponNode(int position, GameObject weaponNode) |
|
|
|
{ |
|
|
|
|
|
|
|
Transform weaponSlot = enemyWeaponNodeList.GetChild(position); |
|
|
|
if (weaponSlot != null) |
|
|
|
{ |
|
|
|
ClearAllChildren(weaponSlot); |
|
|
|
weaponNode.transform.SetParent(weaponSlot.transform, true); |
|
|
|
weaponNode.transform.localPosition = Vector3.zero; |
|
|
|
weaponNode.transform.localEulerAngles = Vector3.zero; |
|
|
|
weaponNode.transform.localScale = Vector3.one; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public string getWeaponNodeResultRarity(string result, string resultValue) |
|
|
|
{ |
|
|
|
string rarity=Name.none; |
|
|
|
Dictionary<string,HashSet<string>> addScoreDict = new Dictionary<string, HashSet<string>> |
|
|
|
{ { Name.WeaponNodeLevel.Basic, MathTool.GenerateIntegerSet(5, 7) }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(8, 12) }, |
|
|
|
{ Name.WeaponNodeLevel.Intermediate, MathTool.GenerateIntegerSet(13, 18) }, |
|
|
|
{ { Name.WeaponNodeLevel.Basic, MathTool.GenerateIntegerSet(4, 6) }, |
|
|
|
{ Name.WeaponNodeLevel.Simple, MathTool.GenerateIntegerSet(7, 9) }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(10, 13) }, |
|
|
|
{ Name.WeaponNodeLevel.Intermediate, MathTool.GenerateIntegerSet(14, 18) }, |
|
|
|
{ Name.WeaponNodeLevel.Advanced, MathTool.GenerateIntegerSet(23, 30) }}; |
|
|
|
Dictionary<string, HashSet<string>> mulScoreDict = new Dictionary<string, HashSet<string>>{ |
|
|
|
{ Name.WeaponNodeLevel.Intermediate, MathTool.GenerateIntegerSet(1, 3) }, |
|
|
|
{ Name.WeaponNodeLevel.Advanced, MathTool.GenerateIntegerSet(4, 6) }}; |
|
|
|
Dictionary<string, HashSet<string>> nodeCountDict = new Dictionary<string, HashSet<string>> |
|
|
|
{ { Name.WeaponNodeLevel.Basic, MathTool.GenerateIntegerSet(6, 8) }, |
|
|
|
{ { Name.WeaponNodeLevel.Basic, MathTool.GenerateIntegerSet(5, 8) }, |
|
|
|
{ Name.WeaponNodeLevel.Simple, MathTool.GenerateIntegerSet(9, 10) }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(11, 17) }, |
|
|
|
{ Name.WeaponNodeLevel.Intermediate, MathTool.GenerateIntegerSet(20, 24) }, |
|
|
|
{ Name.WeaponNodeLevel.Advanced, MathTool.GenerateIntegerSet(30, 35) }}; |
|
|
|
Dictionary<string, HashSet<string>> allNodeCountDict = new Dictionary<string, HashSet<string>>{ |
|
|
|
{ Name.WeaponNodeLevel.Basic, MathTool.GenerateIntegerSet(3, 4) }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(5, 7) }, |
|
|
|
{ Name.WeaponNodeLevel.Basic, MathTool.GenerateIntegerSet(2, 3) }, |
|
|
|
{ Name.WeaponNodeLevel.Simple, MathTool.GenerateIntegerSet(4, 5) }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(6, 7) }, |
|
|
|
{ Name.WeaponNodeLevel.Intermediate, MathTool.GenerateIntegerSet(8, 10) }, |
|
|
|
{ Name.WeaponNodeLevel.Advanced, MathTool.GenerateIntegerSet(11, 15) }}; |
|
|
|
Dictionary<string, HashSet<string>> drawCardDict = new Dictionary<string, HashSet<string>>{ |
|
|
|
{ Name.WeaponNodeLevel.Basic, MathTool.GenerateIntegerSet(1, 2) }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(3, 3) }, |
|
|
|
{ Name.WeaponNodeLevel.Intermediate, MathTool.GenerateIntegerSet(4, 5) }}; |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(1, 1) }, |
|
|
|
{ Name.WeaponNodeLevel.Intermediate, MathTool.GenerateIntegerSet(2, 2) }, |
|
|
|
{ Name.WeaponNodeLevel.Advanced, MathTool.GenerateIntegerSet(3, 3) }}; |
|
|
|
Dictionary<string, HashSet<string>> everyNodeAddScoreDict = new Dictionary<string, HashSet<string>>{ |
|
|
|
{ Name.WeaponNodeLevel.Basic, Name.EveryNodeAddScoreResultSet.BasiclSet }, |
|
|
|
{ Name.WeaponNodeLevel.Simple, Name.EveryNodeAddScoreResultSet.SimpleSet }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, Name.EveryNodeAddScoreResultSet.ElementarySet }, |
|
|
|
{ Name.WeaponNodeLevel.Intermediate, Name.EveryNodeAddScoreResultSet.IntermediateSet }, |
|
|
|
{ Name.WeaponNodeLevel.Advanced, Name.EveryNodeAddScoreResultSet.AdvancedSet }}; |
|
|
|
Dictionary<string, HashSet<string>> isIgnoreConditionDict = new Dictionary<string, HashSet<string>>(); |
|
|
|
Dictionary<string, HashSet<string>> VolcanoDict = new Dictionary<string, HashSet<string>>{ |
|
|
|
{ Name.WeaponNodeLevel.Basic, MathTool.GenerateIntegerSet(1, 1) }, |
|
|
|
{ Name.WeaponNodeLevel.Simple, MathTool.GenerateIntegerSet(1, 1) }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(2, 2) }, |
|
|
|
{ Name.WeaponNodeLevel.Intermediate, MathTool.GenerateIntegerSet(3, 3) }, |
|
|
|
{ Name.WeaponNodeLevel.Advanced, MathTool.GenerateIntegerSet(4, 4) }}; |
|
|
|
@ -1270,25 +1208,166 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
} |
|
|
|
return rarity; |
|
|
|
} |
|
|
|
|
|
|
|
public string getConditionValueWithLevel(string level, ref string condition, ref List<string> nodesMark, ref List<string> nodesColor) |
|
|
|
{ |
|
|
|
string conditionValue = ""; |
|
|
|
switch (condition) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeCondition.position: |
|
|
|
conditionValue = MathTool.GetRandomElements(new HashSet<string> { "0", "1", "2", "3", "4" }, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.positionUnused: |
|
|
|
conditionValue = MathTool.GetRandomElements(new HashSet<string> { "0", "1", "2", "3", "4" }, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.positionUsed: |
|
|
|
conditionValue = MathTool.GetRandomElements(new HashSet<string> { "0", "1", "2", "3", "4" }, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.diffSettle: |
|
|
|
conditionValue = Name.none; |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.usedCard: |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
conditionValue = MathTool.GetRandomElements(new HashSet<string> { "1" }, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
conditionValue = MathTool.GetRandomElements(new HashSet<string> { "2", }, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
conditionValue = MathTool.GetRandomElements(new HashSet<string> { "3" }, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
conditionValue = MathTool.GetRandomElements(new HashSet<string> { "4" }, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
} |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.threeColorDiffMoreThan: |
|
|
|
conditionValue = MathTool.GetRandomElements(new HashSet<string> { "3", "4", "5" }, 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.everyNumNodeConvert: |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(10, 11), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(9, 9), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(7, 8), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(5, 6), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(3, 4), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
} |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.everyColorNodeConvert: |
|
|
|
condition = MathTool.GetRandomElements(Name.WeaponNodeCondition.PlayerColorConvertSet, 1).ElementAt(0); |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(7, 7), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(6, 6), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(5, 5), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(4, 4), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
conditionValue = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(3, 3), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
} |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.bombbomb: |
|
|
|
conditionValue = Name.none; |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.node: |
|
|
|
conditionValue = Name.none; |
|
|
|
HashSet<string> nodesA = new HashSet<string>(); |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
nodesA = MathTool.GetRandomElements(new HashSet<string> { "1_0", "-1_0", "0_1", "0_-1", "-1_1", "-1_-1" }, 2); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
nodesA = MathTool.GetRandomElements(new HashSet<string> { "1_0", "-1_0", "0_1", "0_-1", "-1_1", "-1_-1" }, 3); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
nodesA = MathTool.GetRandomElements(new HashSet<string> { "1_0", "-1_0", "0_1", "0_-1", "-1_1", "-1_-1" }, 4); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
nodesA = MathTool.GetRandomElements(new HashSet<string> { "1_0", "-1_0", "0_1", "0_-1", "-1_1", "-1_-1" }, 5); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
nodesA = MathTool.GetRandomElements(new HashSet<string> { "1_0", "-1_0", "0_1", "0_-1", "-1_1", "-1_-1" }, 6); |
|
|
|
break; |
|
|
|
} |
|
|
|
nodesA.Add("0_0"); |
|
|
|
nodesMark = nodesA.ToList(); |
|
|
|
for (int i = 0; i < nodesA.Count; i++) |
|
|
|
{ |
|
|
|
nodesColor.Add(MathTool.GetRandomElements(new HashSet<string> { Name.Color.Red, Name.Color.Blue, Name.Color.Yellow }, 1).ElementAt(0)); |
|
|
|
} |
|
|
|
break; |
|
|
|
case Name.WeaponNodeCondition.cardConditionPattern: |
|
|
|
conditionValue = Name.none; |
|
|
|
StringBuilder sb = new StringBuilder(); |
|
|
|
sb.Append(MathTool.GetRandomElements(new HashSet<string> { Name.Color.Red, Name.Color.Blue, Name.Color.Yellow }, 1).ElementAt(0)) |
|
|
|
.Append(MathTool.GetRandomElements(new HashSet<string> { "<", ">" }, 1).ElementAt(0)); |
|
|
|
string part3 = ""; |
|
|
|
switch (level) |
|
|
|
{ |
|
|
|
case Name.WeaponNodeLevel.Basic: |
|
|
|
part3 = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(4, 5), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Simple: |
|
|
|
part3 = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(6, 8), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Elementary: |
|
|
|
part3 = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(10, 15), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Intermediate: |
|
|
|
part3 = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(18, 24), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
case Name.WeaponNodeLevel.Advanced: |
|
|
|
part3 = MathTool.GetRandomElements(MathTool.GenerateIntegerSet(35, 45), 1).ElementAt(0); |
|
|
|
break; |
|
|
|
} |
|
|
|
sb.Append(part3); |
|
|
|
condition = sb.ToString(); |
|
|
|
break; |
|
|
|
} |
|
|
|
return conditionValue; |
|
|
|
} |
|
|
|
public string getWeaponNodeConditionRarity(string condition, string conditionValue, string[] nodesColor) |
|
|
|
{ |
|
|
|
string rarity = Name.none; |
|
|
|
Dictionary<string, HashSet<string>> everyNumNodeConvertDict = new Dictionary<string, HashSet<string>> |
|
|
|
{ { Name.WeaponNodeLevel.Basic, MathTool.GenerateIntegerSet(10, 11) }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(7, 9) }, |
|
|
|
{ Name.WeaponNodeLevel.Simple, MathTool.GenerateIntegerSet(9, 9) }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(7, 8) }, |
|
|
|
{ Name.WeaponNodeLevel.Intermediate, MathTool.GenerateIntegerSet(5, 6) }, |
|
|
|
{ Name.WeaponNodeLevel.Advanced, MathTool.GenerateIntegerSet(3, 4) }}; |
|
|
|
Dictionary<string, HashSet<string>> everyColorNodeConvertDict = new Dictionary<string, HashSet<string>> |
|
|
|
{ { Name.WeaponNodeLevel.Basic, MathTool.GenerateIntegerSet(7, 8) }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(5, 6) }, |
|
|
|
{ { Name.WeaponNodeLevel.Basic, MathTool.GenerateIntegerSet(7, 7) }, |
|
|
|
{ Name.WeaponNodeLevel.Simple, MathTool.GenerateIntegerSet(6, 6) }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(5, 5) }, |
|
|
|
{ Name.WeaponNodeLevel.Intermediate, MathTool.GenerateIntegerSet(4, 4) }, |
|
|
|
{ Name.WeaponNodeLevel.Advanced, MathTool.GenerateIntegerSet(3, 3) }}; |
|
|
|
Dictionary<string, HashSet<string>> cardConditionPatternDict = new Dictionary<string, HashSet<string>> |
|
|
|
{ { Name.WeaponNodeLevel.Basic, MathTool.GenerateIntegerSet(3, 5) }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(6, 8) }, |
|
|
|
{ Name.WeaponNodeLevel.Intermediate, MathTool.GenerateIntegerSet(9, 12) }, |
|
|
|
{ Name.WeaponNodeLevel.Advanced, MathTool.GenerateIntegerSet(14, 18) }}; |
|
|
|
{ { Name.WeaponNodeLevel.Basic, MathTool.GenerateIntegerSet(4, 5) }, |
|
|
|
{ Name.WeaponNodeLevel.Simple, MathTool.GenerateIntegerSet(6, 8) }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(10, 15) }, |
|
|
|
{ Name.WeaponNodeLevel.Intermediate, MathTool.GenerateIntegerSet(18, 24) }, |
|
|
|
{ Name.WeaponNodeLevel.Advanced, MathTool.GenerateIntegerSet(35, 45) }}; |
|
|
|
Dictionary<string, HashSet<string>> nodeCountDict = new Dictionary<string, HashSet<string>> |
|
|
|
{ { Name.WeaponNodeLevel.Basic, MathTool.GenerateIntegerSet(3, 5) }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(6, 12) }, |
|
|
|
@ -1299,10 +1378,6 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(4, 6) }, |
|
|
|
{ Name.WeaponNodeLevel.Intermediate, MathTool.GenerateIntegerSet(7, 9) }, |
|
|
|
{ Name.WeaponNodeLevel.Advanced, MathTool.GenerateIntegerSet(10, 12) }}; |
|
|
|
Dictionary<string, HashSet<string>> drawCardDict = new Dictionary<string, HashSet<string>>{ |
|
|
|
{ Name.WeaponNodeLevel.Basic, MathTool.GenerateIntegerSet(1, 2) }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(3, 3) }, |
|
|
|
{ Name.WeaponNodeLevel.Intermediate, MathTool.GenerateIntegerSet(4, 5) }}; |
|
|
|
Dictionary<string, HashSet<string>> everyNodeAddScoreDict = new Dictionary<string, HashSet<string>>{ |
|
|
|
{ Name.WeaponNodeLevel.Basic, MathTool.GenerateIntegerSet(1, 1) }, |
|
|
|
{ Name.WeaponNodeLevel.Elementary, MathTool.GenerateIntegerSet(2, 3) }, |
|
|
|
@ -1362,13 +1437,17 @@ public class WeaponManager : Singleton<WeaponManager> |
|
|
|
} |
|
|
|
else if (nodesColor.Length == 4) |
|
|
|
{ |
|
|
|
rarity = Name.WeaponNodeLevel.Elementary; |
|
|
|
rarity = Name.WeaponNodeLevel.Simple; |
|
|
|
} |
|
|
|
else if (nodesColor.Length == 5) |
|
|
|
{ |
|
|
|
rarity = Name.WeaponNodeLevel.Intermediate; |
|
|
|
rarity = Name.WeaponNodeLevel.Elementary; |
|
|
|
} |
|
|
|
else if (nodesColor.Length == 6) |
|
|
|
{ |
|
|
|
rarity = Name.WeaponNodeLevel.Intermediate; |
|
|
|
} |
|
|
|
else if (nodesColor.Length == 7) |
|
|
|
{ |
|
|
|
rarity = Name.WeaponNodeLevel.Advanced; |
|
|
|
} |
|
|
|
|