public float GetTotalDamage(float runeDamage, float pageDamage, ISpellGrid grid) { float totalDmg = 0; // Add up the cost of each pixel foreach (KeyValuePair <Ink, int> entry in grid.GetInkToNumberOfActiveInksOfThatType()) { totalDmg += (entry.Key.GetDamageMod() + runeDamage + pageDamage) * entry.Value / 3; } // Add up the cost of other spells this segment is casting foreach (SpellEvent sEvent in events) { if (sEvent is SpellCastEvent) { SpellCastEvent sce = (SpellCastEvent)sEvent; //totalDmg += sce.spell.cost; } } return(totalDmg); }
public float GetCost(float runeCost, float pageCost, ISpellGrid grid) { float totalCost = 0; // Add up the cost of each pixel foreach (KeyValuePair <Ink, int> entry in grid.GetInkToNumberOfActiveInksOfThatType()) { totalCost += (entry.Key.GetCost() + pageCost) * runeCost * entry.Value; } // Add up the cost of other spells this segment is casting foreach (SpellEvent sEvent in events) { if (sEvent is SpellCastEvent) { SpellCastEvent sce = (SpellCastEvent)sEvent; totalCost += sce.spell.cost; } } return(totalCost); }