void SpellCast(SpellCastEvent e) { if (Selected) { Selected = false; } }
public void Cast() { SpellCastEvent e = new SpellCastEvent(); e.FireEvent(); castingBehaviour.Cast(spellParams); }
private void SpellCast(SpellCastEvent obj) { if (obj.Projectile != null) { obj.Projectile.Scale *= 1.75f; obj.Projectile.Damage *= 2; } }
void SpellCast(SpellCastEvent e) { stamina -= staminaCost; staminaCost = -1; float percent = (float)stamina / maxStamina; //lastIndex = pixelList.Count - (int)(percent * pixelList.Count); changed = true; //clearTexture(); }
void initializeEventCallbacks() { StartedCastingEvent.RegisterListener(castingStarted); StoppedCastingEvent.RegisterListener(castingStopped); SpellSelectedEvent.RegisterListener(SpellSelected); SpellCastEvent.RegisterListener(SpellCast); SpellUnSelectedEvent.RegisterListener(SpellUnselected); CastingProjectionDestroyedEvent.RegisterListener(CastingProjectionDestroyed); CastingProjectionCreatedEvent.RegisterListener(CastingProjectionCreated); CastingLocationChangedEvent.RegisterListener(CastingLocationChanged); }
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); }
private void OnSpellCasted(object sender, SpellCastEvent e) { _spellEvent.SpellCasted -= OnSpellCasted; if (e.Sucess) { _totalSpellLauch++; if (_totalSpellLauch < _currentSpell.Relaunchs) { ExecuteSpell(); } else { _totalSpellLauch = 0; _account.Character.Fight.EndTurn(); } } else { _totalSpellLauch = 0; _account.Character.Fight.EndTurn(); } }
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); }
void unRegisterCallbacks() { StoppedCastingEvent.UnregisterListener(StoppedCasting); SpellCastEvent.UnregisterListener(SpellCast); }
void initializeCallbacks() { StoppedCastingEvent.RegisterListener(StoppedCasting); SpellCastEvent.RegisterListener(SpellCast); }