Fix crafting stats cap + updated summon ability
- Crafting stats cap now properly counts only the new added stats from stones instead of all stats from stones - Summon abilities now each have its own scaling with owners stats - Summon abilities time between attacks reduced (faster attacks overall)
This commit is contained in:
parent
601add830b
commit
24a1af4563
@ -111,10 +111,12 @@ public class CraftingStatStone : ItemInstance
|
|||||||
if (field.GetValue(this) is int intValue && intValue != 0 && field.Name.ToLower().Contains("bonus"))
|
if (field.GetValue(this) is int intValue && intValue != 0 && field.Name.ToLower().Contains("bonus"))
|
||||||
{
|
{
|
||||||
nonZeroStats.Add(field.Name);
|
nonZeroStats.Add(field.Name);
|
||||||
|
//Debug.Log("ç-CraftingStone GotNonZeroStat: " + field.Name);
|
||||||
}
|
}
|
||||||
else if (field.GetValue(this) is float floatValue && !Mathf.Approximately(floatValue, 0f) && field.Name.ToLower().Contains("bonus"))
|
else if (field.GetValue(this) is float floatValue && !Mathf.Approximately(floatValue, 0f) && field.Name.ToLower().Contains("bonus"))
|
||||||
{
|
{
|
||||||
nonZeroStats.Add(field.Name);
|
nonZeroStats.Add(field.Name);
|
||||||
|
//Debug.Log("ç-CraftingStone GotNonZeroStat: " + field.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,10 +133,9 @@ public class EquippableItemInstance : ItemInstance
|
|||||||
if (!CraftableBase) return false;
|
if (!CraftableBase) return false;
|
||||||
|
|
||||||
var stoneStats = GetNonZeroStats(stone);
|
var stoneStats = GetNonZeroStats(stone);
|
||||||
|
var itemNonZeroStats = GetNonZeroStats(this);
|
||||||
|
|
||||||
// Calculate overlapping and new unique stats
|
int newUniqueStats = stoneStats.Except(itemNonZeroStats).Count();
|
||||||
int overlappingStats = AddedStoneStats.Intersect(stoneStats).Count();
|
|
||||||
int newUniqueStats = stoneStats.Except(AddedStoneStats).Count();
|
|
||||||
|
|
||||||
// Ensure we don't exceed the max unique stats cap
|
// Ensure we don't exceed the max unique stats cap
|
||||||
if (AddedStoneStats.Count + newUniqueStats > MaxTotalUniqueStatsIncreasedByStones)
|
if (AddedStoneStats.Count + newUniqueStats > MaxTotalUniqueStatsIncreasedByStones)
|
||||||
@ -150,10 +149,11 @@ public class EquippableItemInstance : ItemInstance
|
|||||||
if (!CanAddCraftingStone(stone)) return false;
|
if (!CanAddCraftingStone(stone)) return false;
|
||||||
|
|
||||||
var stoneStats = GetNonZeroStats(stone);
|
var stoneStats = GetNonZeroStats(stone);
|
||||||
|
var itemStats = GetNonZeroStats(this);
|
||||||
|
|
||||||
for (int i = 0; i < stoneStats.Count; i++)
|
for (int i = 0; i < stoneStats.Count; i++)
|
||||||
{
|
{
|
||||||
if (!AddedStoneStats.Contains(stoneStats[i]))
|
if (!itemStats.Contains(stoneStats[i]) && !AddedStoneStats.Contains(stoneStats[i]))
|
||||||
AddedStoneStats.Add(stoneStats[i]);
|
AddedStoneStats.Add(stoneStats[i]);
|
||||||
}
|
}
|
||||||
// Add stats from the stone to the item
|
// Add stats from the stone to the item
|
||||||
|
@ -133,6 +133,10 @@ PrefabInstance:
|
|||||||
propertyPath: meleeRange
|
propertyPath: meleeRange
|
||||||
value: 2.85
|
value: 2.85
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4296156910025484504, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
||||||
|
propertyPath: timeBetweenAttacks
|
||||||
|
value: 1.25
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4296156910025484506, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
- target: {fileID: 4296156910025484506, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
value: 0
|
value: 0
|
||||||
|
@ -222,6 +222,10 @@ PrefabInstance:
|
|||||||
propertyPath: sceneViewId
|
propertyPath: sceneViewId
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4296156910025484504, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
||||||
|
propertyPath: timeBetweenAttacks
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4296156910025484506, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
- target: {fileID: 4296156910025484506, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
value: 0
|
value: 0
|
||||||
|
@ -101,6 +101,10 @@ PrefabInstance:
|
|||||||
propertyPath: sceneViewId
|
propertyPath: sceneViewId
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4296156910025484504, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
||||||
|
propertyPath: timeBetweenAttacks
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4296156910025484506, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
- target: {fileID: 4296156910025484506, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
value: 0
|
value: 0
|
||||||
|
@ -33,7 +33,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4296156910025484504, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
- target: {fileID: 4296156910025484504, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
||||||
propertyPath: timeBetweenAttacks
|
propertyPath: timeBetweenAttacks
|
||||||
value: 1
|
value: 0.5
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4296156910025484506, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
- target: {fileID: 4296156910025484506, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
|
@ -25,7 +25,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4296156910025484504, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
- target: {fileID: 4296156910025484504, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
||||||
propertyPath: timeBetweenAttacks
|
propertyPath: timeBetweenAttacks
|
||||||
value: 1.5
|
value: 0.75
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4296156910025484506, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
- target: {fileID: 4296156910025484506, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
|
@ -262,6 +262,10 @@ PrefabInstance:
|
|||||||
propertyPath: sceneViewId
|
propertyPath: sceneViewId
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4296156910025484504, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
||||||
|
propertyPath: timeBetweenAttacks
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4296156910025484506, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
- target: {fileID: 4296156910025484506, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
value: 0
|
value: 0
|
||||||
|
@ -101,6 +101,10 @@ PrefabInstance:
|
|||||||
propertyPath: sceneViewId
|
propertyPath: sceneViewId
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4296156910025484504, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
||||||
|
propertyPath: timeBetweenAttacks
|
||||||
|
value: 1.25
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4296156910025484506, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
- target: {fileID: 4296156910025484506, guid: faa4fe928f5c2d34280baa419f0819bc, type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
value: 0
|
value: 0
|
||||||
|
@ -107,6 +107,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: Vendor_Template_Resourceful_Variant
|
value: Vendor_Template_Resourceful_Variant
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5539393934865746281, guid: 2917f88fe47ef314b99fb469b1e46824, type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 3
|
||||||
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 2917f88fe47ef314b99fb469b1e46824, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 2917f88fe47ef314b99fb469b1e46824, type: 3}
|
||||||
--- !u!4 &1300955679331848717 stripped
|
--- !u!4 &1300955679331848717 stripped
|
||||||
@ -137,6 +141,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_Materials.Array.data[0]
|
propertyPath: m_Materials.Array.data[0]
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 2100000, guid: ff1860c2ed83e1847840dcb9a3845883, type: 2}
|
objectReference: {fileID: 2100000, guid: ff1860c2ed83e1847840dcb9a3845883, type: 2}
|
||||||
|
- target: {fileID: 3423531745090271819, guid: c95df78dc0ded9e4b968240d2473f034, type: 3}
|
||||||
|
propertyPath: m_Materials.Array.data[0]
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 2100000, guid: ff1860c2ed83e1847840dcb9a3845883, type: 2}
|
||||||
- target: {fileID: 4176238160307556629, guid: c95df78dc0ded9e4b968240d2473f034, type: 3}
|
- target: {fileID: 4176238160307556629, guid: c95df78dc0ded9e4b968240d2473f034, type: 3}
|
||||||
propertyPath: m_Materials.Array.data[0]
|
propertyPath: m_Materials.Array.data[0]
|
||||||
value:
|
value:
|
||||||
|
@ -21,6 +21,8 @@ MonoBehaviour:
|
|||||||
manaCost: 30
|
manaCost: 30
|
||||||
healthCost: 0
|
healthCost: 0
|
||||||
classResourceCost: 0
|
classResourceCost: 0
|
||||||
|
percentMaxManaCost: 0
|
||||||
|
percentMaxHealthCost: 0
|
||||||
cooldown: 5
|
cooldown: 5
|
||||||
castableWhileMoving: 0
|
castableWhileMoving: 0
|
||||||
animationType: 4
|
animationType: 4
|
||||||
@ -28,3 +30,15 @@ MonoBehaviour:
|
|||||||
numberOfSpawns: 3
|
numberOfSpawns: 3
|
||||||
instantlyReady: 1
|
instantlyReady: 1
|
||||||
isImage: 1
|
isImage: 1
|
||||||
|
StrengthPercentFromMaster: 0.08
|
||||||
|
AgilityPercentFromMaster: 0.08
|
||||||
|
IntelligencePercentFromMaster: 0.08
|
||||||
|
SpiritPercentFromMaster: 0.08
|
||||||
|
VitalityPercentFromMaster: 0.08
|
||||||
|
AttackDamagePercentFromMaster: 0.08
|
||||||
|
SpellDamagePercentFromMaster: 0.08
|
||||||
|
CritChancePercentFromMaster: 0.08
|
||||||
|
CritDamagePercentFromMaster: 0.08
|
||||||
|
MaxHealthPercentFromMaster: 0.3
|
||||||
|
ArmorPercentFromMaster: 0.3
|
||||||
|
MagicResistancePercentFromMaster: 0.3
|
||||||
|
@ -21,7 +21,24 @@ MonoBehaviour:
|
|||||||
manaCost: 20
|
manaCost: 20
|
||||||
healthCost: 0
|
healthCost: 0
|
||||||
classResourceCost: 0
|
classResourceCost: 0
|
||||||
|
percentMaxManaCost: 0
|
||||||
|
percentMaxHealthCost: 0
|
||||||
cooldown: 20
|
cooldown: 20
|
||||||
castableWhileMoving: 0
|
castableWhileMoving: 0
|
||||||
animationType: 4
|
animationType: 4
|
||||||
minionPrefab: {fileID: 6321488985172632352, guid: 421cfe4470c6f304b8f30f9451f8467c, type: 3}
|
minionPrefab: {fileID: 6321488985172632352, guid: 421cfe4470c6f304b8f30f9451f8467c, type: 3}
|
||||||
|
numberOfSpawns: 1
|
||||||
|
instantlyReady: 0
|
||||||
|
isImage: 0
|
||||||
|
StrengthPercentFromMaster: 0.1
|
||||||
|
AgilityPercentFromMaster: 0.08
|
||||||
|
IntelligencePercentFromMaster: 0.08
|
||||||
|
SpiritPercentFromMaster: 0.08
|
||||||
|
VitalityPercentFromMaster: 0.1
|
||||||
|
AttackDamagePercentFromMaster: 0.15
|
||||||
|
SpellDamagePercentFromMaster: 0.15
|
||||||
|
CritChancePercentFromMaster: 0.08
|
||||||
|
CritDamagePercentFromMaster: 0.08
|
||||||
|
MaxHealthPercentFromMaster: 0.35
|
||||||
|
ArmorPercentFromMaster: 0.35
|
||||||
|
MagicResistancePercentFromMaster: 0.35
|
||||||
|
@ -21,7 +21,24 @@ MonoBehaviour:
|
|||||||
manaCost: 5
|
manaCost: 5
|
||||||
healthCost: 0
|
healthCost: 0
|
||||||
classResourceCost: 10
|
classResourceCost: 10
|
||||||
|
percentMaxManaCost: 0
|
||||||
|
percentMaxHealthCost: 0
|
||||||
cooldown: 8
|
cooldown: 8
|
||||||
castableWhileMoving: 0
|
castableWhileMoving: 0
|
||||||
animationType: 1
|
animationType: 1
|
||||||
minionPrefab: {fileID: 5182193148598858814, guid: a23c3bbe3a299bc4fb87a4645ea4a8c2, type: 3}
|
minionPrefab: {fileID: 5182193148598858814, guid: a23c3bbe3a299bc4fb87a4645ea4a8c2, type: 3}
|
||||||
|
numberOfSpawns: 1
|
||||||
|
instantlyReady: 0
|
||||||
|
isImage: 0
|
||||||
|
StrengthPercentFromMaster: 0.08
|
||||||
|
AgilityPercentFromMaster: 0.08
|
||||||
|
IntelligencePercentFromMaster: 0.1
|
||||||
|
SpiritPercentFromMaster: 0.08
|
||||||
|
VitalityPercentFromMaster: 0.08
|
||||||
|
AttackDamagePercentFromMaster: 0.08
|
||||||
|
SpellDamagePercentFromMaster: 0.15
|
||||||
|
CritChancePercentFromMaster: 0.08
|
||||||
|
CritDamagePercentFromMaster: 0.08
|
||||||
|
MaxHealthPercentFromMaster: 0.15
|
||||||
|
ArmorPercentFromMaster: 0.15
|
||||||
|
MagicResistancePercentFromMaster: 0.15
|
||||||
|
@ -21,7 +21,24 @@ MonoBehaviour:
|
|||||||
manaCost: 5
|
manaCost: 5
|
||||||
healthCost: 0
|
healthCost: 0
|
||||||
classResourceCost: 10
|
classResourceCost: 10
|
||||||
|
percentMaxManaCost: 0
|
||||||
|
percentMaxHealthCost: 0
|
||||||
cooldown: 8
|
cooldown: 8
|
||||||
castableWhileMoving: 0
|
castableWhileMoving: 0
|
||||||
animationType: 1
|
animationType: 1
|
||||||
minionPrefab: {fileID: 3704396325418192251, guid: baa2ee7657d7f4f48b3f5ae8dab11efe, type: 3}
|
minionPrefab: {fileID: 3704396325418192251, guid: baa2ee7657d7f4f48b3f5ae8dab11efe, type: 3}
|
||||||
|
numberOfSpawns: 1
|
||||||
|
instantlyReady: 0
|
||||||
|
isImage: 0
|
||||||
|
StrengthPercentFromMaster: 0.08
|
||||||
|
AgilityPercentFromMaster: 0.1
|
||||||
|
IntelligencePercentFromMaster: 0.08
|
||||||
|
SpiritPercentFromMaster: 0.08
|
||||||
|
VitalityPercentFromMaster: 0.08
|
||||||
|
AttackDamagePercentFromMaster: 0.15
|
||||||
|
SpellDamagePercentFromMaster: 0.08
|
||||||
|
CritChancePercentFromMaster: 0.15
|
||||||
|
CritDamagePercentFromMaster: 0.15
|
||||||
|
MaxHealthPercentFromMaster: 0.15
|
||||||
|
ArmorPercentFromMaster: 0.15
|
||||||
|
MagicResistancePercentFromMaster: 0.15
|
||||||
|
@ -21,7 +21,24 @@ MonoBehaviour:
|
|||||||
manaCost: 5
|
manaCost: 5
|
||||||
healthCost: 0
|
healthCost: 0
|
||||||
classResourceCost: 10
|
classResourceCost: 10
|
||||||
|
percentMaxManaCost: 0
|
||||||
|
percentMaxHealthCost: 0
|
||||||
cooldown: 8
|
cooldown: 8
|
||||||
castableWhileMoving: 0
|
castableWhileMoving: 0
|
||||||
animationType: 1
|
animationType: 1
|
||||||
minionPrefab: {fileID: 4457675943992054240, guid: aba296cc1f703a74fb09bb0f6b31e2ba, type: 3}
|
minionPrefab: {fileID: 4457675943992054240, guid: aba296cc1f703a74fb09bb0f6b31e2ba, type: 3}
|
||||||
|
numberOfSpawns: 1
|
||||||
|
instantlyReady: 0
|
||||||
|
isImage: 0
|
||||||
|
StrengthPercentFromMaster: 0.1
|
||||||
|
AgilityPercentFromMaster: 0.08
|
||||||
|
IntelligencePercentFromMaster: 0.08
|
||||||
|
SpiritPercentFromMaster: 0.08
|
||||||
|
VitalityPercentFromMaster: 0.08
|
||||||
|
AttackDamagePercentFromMaster: 0.2
|
||||||
|
SpellDamagePercentFromMaster: 0.08
|
||||||
|
CritChancePercentFromMaster: 0.08
|
||||||
|
CritDamagePercentFromMaster: 0.08
|
||||||
|
MaxHealthPercentFromMaster: 0.15
|
||||||
|
ArmorPercentFromMaster: 0.15
|
||||||
|
MagicResistancePercentFromMaster: 0.15
|
||||||
|
@ -21,7 +21,24 @@ MonoBehaviour:
|
|||||||
manaCost: 5
|
manaCost: 5
|
||||||
healthCost: 0
|
healthCost: 0
|
||||||
classResourceCost: 10
|
classResourceCost: 10
|
||||||
|
percentMaxManaCost: 0
|
||||||
|
percentMaxHealthCost: 0
|
||||||
cooldown: 8
|
cooldown: 8
|
||||||
castableWhileMoving: 0
|
castableWhileMoving: 0
|
||||||
animationType: 1
|
animationType: 1
|
||||||
minionPrefab: {fileID: 5113932649102621176, guid: 205e3d0d6f1a8b94fb06103f9a47bb27, type: 3}
|
minionPrefab: {fileID: 5113932649102621176, guid: 205e3d0d6f1a8b94fb06103f9a47bb27, type: 3}
|
||||||
|
numberOfSpawns: 1
|
||||||
|
instantlyReady: 0
|
||||||
|
isImage: 0
|
||||||
|
StrengthPercentFromMaster: 0.08
|
||||||
|
AgilityPercentFromMaster: 0.08
|
||||||
|
IntelligencePercentFromMaster: 0.08
|
||||||
|
SpiritPercentFromMaster: 0.08
|
||||||
|
VitalityPercentFromMaster: 0.1
|
||||||
|
AttackDamagePercentFromMaster: 0.08
|
||||||
|
SpellDamagePercentFromMaster: 0.08
|
||||||
|
CritChancePercentFromMaster: 0.08
|
||||||
|
CritDamagePercentFromMaster: 0.08
|
||||||
|
MaxHealthPercentFromMaster: 0.25
|
||||||
|
ArmorPercentFromMaster: 0.25
|
||||||
|
MagicResistancePercentFromMaster: 0.25
|
||||||
|
@ -30,3 +30,15 @@ MonoBehaviour:
|
|||||||
numberOfSpawns: 1
|
numberOfSpawns: 1
|
||||||
instantlyReady: 1
|
instantlyReady: 1
|
||||||
isImage: 1
|
isImage: 1
|
||||||
|
StrengthPercentFromMaster: 0.1
|
||||||
|
AgilityPercentFromMaster: 0.1
|
||||||
|
IntelligencePercentFromMaster: 0.1
|
||||||
|
SpiritPercentFromMaster: 0
|
||||||
|
VitalityPercentFromMaster: 0
|
||||||
|
AttackDamagePercentFromMaster: 0.24
|
||||||
|
SpellDamagePercentFromMaster: 0.24
|
||||||
|
CritChancePercentFromMaster: 0.24
|
||||||
|
CritDamagePercentFromMaster: 0.24
|
||||||
|
MaxHealthPercentFromMaster: 0.3
|
||||||
|
ArmorPercentFromMaster: 0
|
||||||
|
MagicResistancePercentFromMaster: 0
|
||||||
|
@ -14,6 +14,24 @@ public class SummonAbility : BaseAbility
|
|||||||
public bool instantlyReady = false;
|
public bool instantlyReady = false;
|
||||||
public bool isImage = false;
|
public bool isImage = false;
|
||||||
|
|
||||||
|
[Space]
|
||||||
|
public float StrengthPercentFromMaster;
|
||||||
|
public float AgilityPercentFromMaster;
|
||||||
|
public float IntelligencePercentFromMaster;
|
||||||
|
public float SpiritPercentFromMaster;
|
||||||
|
public float VitalityPercentFromMaster;
|
||||||
|
|
||||||
|
[Space]
|
||||||
|
public float AttackDamagePercentFromMaster;
|
||||||
|
public float SpellDamagePercentFromMaster;
|
||||||
|
public float CritChancePercentFromMaster;
|
||||||
|
public float CritDamagePercentFromMaster;
|
||||||
|
public float MaxHealthPercentFromMaster;
|
||||||
|
public float ArmorPercentFromMaster;
|
||||||
|
public float MagicResistancePercentFromMaster;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private GameObject instantiatedMinion;
|
private GameObject instantiatedMinion;
|
||||||
private CharacterStats ownerStats;
|
private CharacterStats ownerStats;
|
||||||
private CharacterStats minionStats;
|
private CharacterStats minionStats;
|
||||||
@ -67,44 +85,21 @@ public class SummonAbility : BaseAbility
|
|||||||
ownerStats = user.GetComponent<CharacterStats>();
|
ownerStats = user.GetComponent<CharacterStats>();
|
||||||
minionStats = instantiatedMinion.GetComponent<CharacterStats>();
|
minionStats = instantiatedMinion.GetComponent<CharacterStats>();
|
||||||
|
|
||||||
if (isImage)
|
minionStats.Strength.AddModifier(new StatModifier(ownerStats.Strength.Value * StrengthPercentFromMaster, StatModType.Flat, ownerStats));
|
||||||
{
|
minionStats.Agility.AddModifier(new StatModifier(ownerStats.Agility.Value * AgilityPercentFromMaster, StatModType.Flat, ownerStats));
|
||||||
minionStats.Strength.AddModifier(new StatModifier(ownerStats.Strength.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForImages, StatModType.Flat, ownerStats));
|
minionStats.Intelligence.AddModifier(new StatModifier(ownerStats.Intelligence.Value * IntelligencePercentFromMaster, StatModType.Flat, ownerStats));
|
||||||
minionStats.Agility.AddModifier(new StatModifier(ownerStats.Agility.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForImages, StatModType.Flat, ownerStats));
|
minionStats.Spirit.AddModifier(new StatModifier(ownerStats.Spirit.Value * SpiritPercentFromMaster, StatModType.Flat, ownerStats));
|
||||||
minionStats.Intelligence.AddModifier(new StatModifier(ownerStats.Intelligence.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForImages, StatModType.Flat, ownerStats));
|
minionStats.Vitality.AddModifier(new StatModifier(ownerStats.Vitality.Value * VitalityPercentFromMaster, StatModType.Flat, ownerStats));
|
||||||
minionStats.Spirit.AddModifier(new StatModifier(ownerStats.Spirit.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForImages, StatModType.Flat, ownerStats));
|
|
||||||
minionStats.Vitality.AddModifier(new StatModifier(ownerStats.Vitality.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForImages, StatModType.Flat, ownerStats));
|
|
||||||
|
|
||||||
minionStats.AttackDamage.AddModifier(new StatModifier(ownerStats.AttackDamage.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForImages, StatModType.Flat, ownerStats));
|
minionStats.AttackDamage.AddModifier(new StatModifier(ownerStats.AttackDamage.Value * AttackDamagePercentFromMaster, StatModType.Flat, ownerStats));
|
||||||
minionStats.SpellDamage.AddModifier(new StatModifier(ownerStats.SpellDamage.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForImages, StatModType.Flat, ownerStats));
|
minionStats.SpellDamage.AddModifier(new StatModifier(ownerStats.SpellDamage.Value * SpellDamagePercentFromMaster, StatModType.Flat, ownerStats));
|
||||||
|
|
||||||
minionStats.CritChance.AddModifier(new StatModifier(ownerStats.CritChance.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForImages, StatModType.Flat, ownerStats));
|
minionStats.CritChance.AddModifier(new StatModifier(ownerStats.CritChance.Value * CritChancePercentFromMaster, StatModType.Flat, ownerStats));
|
||||||
minionStats.CritDamage.AddModifier(new StatModifier(ownerStats.CritDamage.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForImages, StatModType.Flat, ownerStats));
|
minionStats.CritDamage.AddModifier(new StatModifier(ownerStats.CritDamage.Value * CritDamagePercentFromMaster, StatModType.Flat, ownerStats));
|
||||||
|
|
||||||
minionStats.MaxHealth.AddModifier(new StatModifier(ownerStats.MaxHealth.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForImages, StatModType.Flat, ownerStats));
|
minionStats.MaxHealth.AddModifier(new StatModifier(ownerStats.MaxHealth.Value * MaxHealthPercentFromMaster, StatModType.Flat, ownerStats));
|
||||||
minionStats.Armor.AddModifier(new StatModifier(ownerStats.Armor.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForImages, StatModType.Flat, ownerStats));
|
minionStats.Armor.AddModifier(new StatModifier(ownerStats.Armor.Value * ArmorPercentFromMaster, StatModType.Flat, ownerStats));
|
||||||
minionStats.MagicResistance.AddModifier(new StatModifier(ownerStats.MagicResistance.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForImages, StatModType.Flat, ownerStats));
|
minionStats.MagicResistance.AddModifier(new StatModifier(ownerStats.MagicResistance.Value * MagicResistancePercentFromMaster, StatModType.Flat, ownerStats));
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
minionStats.Strength.AddModifier(new StatModifier(ownerStats.Strength.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForMinions, StatModType.Flat, ownerStats));
|
|
||||||
minionStats.Agility.AddModifier(new StatModifier(ownerStats.Agility.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForMinions, StatModType.Flat, ownerStats));
|
|
||||||
minionStats.Intelligence.AddModifier(new StatModifier(ownerStats.Intelligence.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForMinions, StatModType.Flat, ownerStats));
|
|
||||||
minionStats.Spirit.AddModifier(new StatModifier(ownerStats.Spirit.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForMinions, StatModType.Flat, ownerStats));
|
|
||||||
minionStats.Vitality.AddModifier(new StatModifier(ownerStats.Vitality.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForMinions, StatModType.Flat, ownerStats));
|
|
||||||
|
|
||||||
minionStats.AttackDamage.AddModifier(new StatModifier(ownerStats.AttackDamage.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForMinions, StatModType.Flat, ownerStats));
|
|
||||||
minionStats.SpellDamage.AddModifier(new StatModifier(ownerStats.SpellDamage.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForMinions, StatModType.Flat, ownerStats));
|
|
||||||
|
|
||||||
minionStats.CritChance.AddModifier(new StatModifier(ownerStats.CritChance.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForMinions, StatModType.Flat, ownerStats));
|
|
||||||
minionStats.CritDamage.AddModifier(new StatModifier(ownerStats.CritDamage.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForMinions, StatModType.Flat, ownerStats));
|
|
||||||
|
|
||||||
minionStats.MaxHealth.AddModifier(new StatModifier(ownerStats.MaxHealth.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForMinions, StatModType.Flat, ownerStats));
|
|
||||||
minionStats.Armor.AddModifier(new StatModifier(ownerStats.Armor.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForMinions, StatModType.Flat, ownerStats));
|
|
||||||
minionStats.MagicResistance.AddModifier(new StatModifier(ownerStats.MagicResistance.Value * GameConstants.CharacterStatsBalancing.PercentageStatScaleForMinions, StatModType.Flat, ownerStats));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
minionStats.onUpdateStatValues.Invoke();
|
minionStats.onUpdateStatValues.Invoke();
|
||||||
|
|
||||||
|
@ -117,8 +117,6 @@ public static class GameConstants
|
|||||||
|
|
||||||
public const int StatPointsPerLevel = 3;
|
public const int StatPointsPerLevel = 3;
|
||||||
|
|
||||||
public const float PercentageStatScaleForMinions = 0.8f;
|
|
||||||
public const float PercentageStatScaleForImages = 0.1f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class CharacterBalancing
|
public static class CharacterBalancing
|
||||||
|
@ -94,7 +94,7 @@ Material:
|
|||||||
- _Mode: 0
|
- _Mode: 0
|
||||||
- _OcclusionStrength: 1
|
- _OcclusionStrength: 1
|
||||||
- _Parallax: 0.02
|
- _Parallax: 0.02
|
||||||
- _Rotation: 6.1646295
|
- _Rotation: 9.865139
|
||||||
- _SmoothnessTextureChannel: 0
|
- _SmoothnessTextureChannel: 0
|
||||||
- _SpecularHighlights: 1
|
- _SpecularHighlights: 1
|
||||||
- _SrcBlend: 1
|
- _SrcBlend: 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user