public void SpawnEffect(Vector3 pos) { obj = Instantiate(TeleportEffect.gameObject).GetComponent <TeleportEffect>(); obj.TeleportingObj = this.gameObject; obj.gameObject.transform.position = this.transform.position; obj.MoveTowards(pos); }
private void OnParticle(Entity sender, ParticleEffectAddedEventArgs args) { var name = args.Name; if (name.Contains("teleport_start") || name.Contains("teleport_end")) { DelayAction.Add(10, () => { var isStart = name.Contains("teleport_start"); var effect = args.ParticleEffect; var a = effect.GetControlPoint(0); var b = effect.GetControlPoint(2); var tp = new TeleportEffect(effect, a, b, isStart, this); Effects.Add(tp); }); } }
private void Start() { effect = GetComponent <TeleportEffect>(); }
//Change card.effectType and this public Effect[] GetEffects(Card.EffectType[] effectNames) { Effect[] effects = new Effect[effectNames.Length]; for (int i = 0; i < effectNames.Length; i++) { switch (effectNames[i]) { case Card.EffectType.VitDamage: effects[i] = new VitDamageEffect(); break; case Card.EffectType.ShieldDamage: effects[i] = new ShieldDamageEffect(); break; case Card.EffectType.VitDamageAll: effects[i] = new VitDamageAll(); break; case Card.EffectType.ShieldDamageAll: effects[i] = new ShieldDamageAll(); break; case Card.EffectType.PiercingDamage: effects[i] = new PiercingDamageEffect(); break; case Card.EffectType.PiercingDamageAll: effects[i] = new PiercingDamageAll(); break; case Card.EffectType.SetKnockBackDamage: effects[i] = new SetKnockBackDamage(); break; case Card.EffectType.ForcedMovement: effects[i] = new ForcedMovementEffect(); break; case Card.EffectType.TauntEffect: effects[i] = new TauntEffect(); break; case Card.EffectType.GetMissingHealth: effects[i] = new GetMissingHealth(); break; case Card.EffectType.Buff: effects[i] = new ApplyBuffEffect(); break; case Card.EffectType.Cleanse: effects[i] = new CleanseEffect(); break; case Card.EffectType.CreateObject: effects[i] = new CreateObjectEffect(); break; case Card.EffectType.GetCurrentAttack: effects[i] = new GetCurrentAttackEffect(); break; case Card.EffectType.DrawCards: effects[i] = new DrawCardEffect(); break; case Card.EffectType.GetCurrentShield: effects[i] = new GetCurrentShield(); break; case Card.EffectType.GetBonusShield: effects[i] = new GetBonusArmorEffect(); break; case Card.EffectType.GetNumberOfTargetsInRangeEffect: effects[i] = new GetNumberOfTargetsInRangeEffect(); break; case Card.EffectType.GetDamageDoneEffect: effects[i] = new GetDamageDoneEffect(); break; case Card.EffectType.GetNumberOfCardsPlayedInTurn: effects[i] = new GetNumberOfCardsPlayedEffect(); break; case Card.EffectType.Swap: effects[i] = new SwapEffect(); break; case Card.EffectType.Teleport: effects[i] = new TeleportEffect(); break; case Card.EffectType.ManaGain: effects[i] = new ManaGainEffect(); break; case Card.EffectType.EnergyGain: effects[i] = new EnergyGainEffect(); break; case Card.EffectType.SetDuration: effects[i] = new SetDurationEffect(); break; case Card.EffectType.GetNumberInStack: effects[i] = new GetNumberInStackEffect(); break; case Card.EffectType.GravityEffect: effects[i] = new GravityEffect(); break; case Card.EffectType.CardCostReductionDrawn: effects[i] = new CardCostReductionDrawn(); break; case Card.EffectType.DrawManaCards: effects[i] = new DrawManaCardEffect(); break; case Card.EffectType.Sacrifice: effects[i] = new SacrificeEffect(); break; case Card.EffectType.GetNumberOfAttackers: effects[i] = new GetNumberOfAttackersEffect(); break; case Card.EffectType.ModifyTempValue: effects[i] = new ModifyTempValueEffect(); break; default: effects[i] = null; break; } } return(effects); }
void Awake() { if (Instanse == null) { Instanse = this; } else { Destroy(this); return; } SpellInfo = new SpellInfo(0, ""); PlayerUnit = GameObject.FindGameObjectWithTag("Player").GetComponent <Unit>(); PlayerUnit.id = 1; Trash = GameObject.Find("Trash"); Effects = GameObject.Find("Effects"); #region Spell Scripts #region Buff Expired Spell Trigger: Cast arg[0] spell after buff expired : Script Id = 1 SpellScripts = new Dictionary <int, SpellScriptDelegate>(); SpellScripts.Add(1, delegate(SpellScriptInfoArgs scriptInfo, SpellScriptInvokeArgs spellArgs, float[] args) { Spell spell = spellArgs.caster.character.Spells.GetSpell((int)args[0]); SpellData spellData = spellArgs.world.SpellLibrary.GetSpell((int)args[0]); spellArgs.world.ApplySpell(spellArgs.caster, spellArgs.target, spell, spellData); }); #endregion #endregion #region Spell Modifiers #region Shatter: If target is frozen deal arg[0] times more damage, with arg[2] time more plus arg[1] % crit chance : Modifier Id = 1 SpellModifiers = new Dictionary <int, ModifierApplier>(); SpellModifiers.Add(1, delegate(Unit caster, Unit target, SpellInfo spellInfo, Spell spell, ArenaManager world, float[] args) { if (target.Character.states[EntityStateType.Freeze].InEffect) { spellInfo.parameters[ParameterType.DamageDealing][ParameterValue.BonusMultiplier] *= args[0]; spellInfo.parameters[ParameterType.CritChance][ParameterValue.FinalBonusAddition] += args[1]; spellInfo.parameters[ParameterType.CritChance][ParameterValue.BonusMultiplier] *= args[2]; return(true); } return(false); }); #endregion #endregion #region Spells SpellLibrary = new SpellDataStorage(); DamageEffect damageEffect; TeleportEffect teleportEffect; KnockBackEffect knockBackEffect; ApplyBuffEffect applyBuffEffect; BuffRemovalEffect buffRemovalEffect; AoeEffect aoeEffect; SpellData newSpellData; Buff buff; // #TODO ! Resources.LoadAll <Sprite>("Icons/Mage/"); Resources.LoadAll <AudioClip>("Sound/Spells/Mage/"); Resources.LoadAll <GameObject>("Prefabs/Spells/"); //Mage #region Fire Blast : Spell Id = 1 / Buff Id = None // Fire Blast Spell Data newSpellData = new SpellData(); newSpellData.id = 1; newSpellData.spellName = "Fire Blast"; newSpellData.iconName = "Icons/Mage/Spell_Mage_InfernoBlast"; newSpellData.effectName = null; newSpellData.castSoundName = null; newSpellData.hitSoundName = "Sound/Spells/Mage/FireBlast"; newSpellData.spellProjectileName = null; newSpellData.range = 5; newSpellData.activationCost = 10; newSpellData.baseCooldown = 0.5f; newSpellData.baseCastTime = 0; newSpellData.spellCastType = SpellCastType.Instant; newSpellData.spellTargetMode = SpellTargetMode.SingleTarget; newSpellData.spellGlobal = SpellGlobalCooldownMode.Normal; newSpellData.spellProjectileType = SpellProjectileEffect.Instant; //Enemy, Single Target ,40-50 Fire Damage damageEffect = new DamageEffect(DamageType.Fire, 30, 40); newSpellData.Effects.Add(damageEffect); //Add Fire Blast Spell SpellLibrary.AddSpellData(newSpellData); #endregion #region Frost Nova : Spell Id = 2 / Buff Id = 1 //New Spell newSpellData = new SpellData(); newSpellData.id = 2; newSpellData.spellName = "Frost Nova"; newSpellData.iconName = "Icons/Mage/Spell_Frost_FrostNova"; newSpellData.effectName = "Frost Nova"; newSpellData.castSoundName = "Sound/Spells/Mage/FrostNova"; newSpellData.hitSoundName = "Sound/Spells/Mage/IceImpact"; newSpellData.spellProjectileName = null; newSpellData.range = 0; newSpellData.activationCost = 20; newSpellData.baseCooldown = 0; newSpellData.baseCastTime = 0; newSpellData.spellCastType = SpellCastType.Instant; newSpellData.spellTargetMode = SpellTargetMode.NoTarget; newSpellData.spellGlobal = SpellGlobalCooldownMode.NoCooldown; newSpellData.spellProjectileType = SpellProjectileEffect.Instant; //Enemy, Self Area:4 , Frost Damage 15-15 damageEffect = new DamageEffect(DamageType.Frost, 15, 15); aoeEffect = new AoeEffect(damageEffect, AoeMode.Self, 4); newSpellData.Effects.Add(aoeEffect); //Magic Debuff for 3 sec buff = new Buff(1, 2, "Frost Nova", "Icons/Mage/Spell_Frost_FrostNova", BuffType.Debuff, AbilityType.Magic, 3, 0, 0, false, false); buff.buffEffectType = BuffEffectType.StaticEffect; buff.buffEffectName = "Frost Nova Freeze State"; //Aura Root buff.Auras.Add(new StateModifier(EntityStateType.Root)); //Area Freeze buff.Auras.Add(new StateModifier(EntityStateType.Freeze)); applyBuffEffect = new ApplyBuffEffect(buff); aoeEffect = new AoeEffect(applyBuffEffect, AoeMode.Self, 4); newSpellData.Effects.Add(aoeEffect); //Add Frost Nova Spell SpellLibrary.AddSpellData(newSpellData); #endregion #region Blazing Speed : Spell Id = 3 / Buff Id = 2 //New Spell newSpellData = new SpellData(); newSpellData.id = 3; newSpellData.spellName = "Blazing Speed"; newSpellData.iconName = "Icons/Mage/Spell_Fire_BurningSpeed"; newSpellData.effectName = null; newSpellData.castSoundName = "Sound/Spells/Mage/BlazingSpeed"; newSpellData.hitSoundName = null; newSpellData.spellProjectileName = null; newSpellData.range = 0; newSpellData.activationCost = 0; newSpellData.baseCooldown = 5; newSpellData.baseCastTime = 0; newSpellData.spellCastType = SpellCastType.Instant; newSpellData.spellTargetMode = SpellTargetMode.Self; newSpellData.spellGlobal = SpellGlobalCooldownMode.NoCooldown; newSpellData.spellProjectileType = SpellProjectileEffect.Instant; //Magic Buff for 3 sec buff = new Buff(2, 3, "Blazing Speed", "Icons/Mage/Spell_Fire_BurningSpeed", BuffType.Buff, AbilityType.Magic, 3, 0, 0, true, true); buff.buffEffectType = BuffEffectType.None; //Aura 150% Speed buff.Auras.Add(new ParameterModifier(ParameterType.Speed, ParameterValue.BonusMultiplier, 2f)); //Area Freeze applyBuffEffect = new ApplyBuffEffect(buff); newSpellData.Effects.Add(applyBuffEffect); //Add Frost Nova Spell SpellLibrary.AddSpellData(newSpellData); #endregion #region Pyroblast : Spell Id = 4 / Buff Id = 8 // Fire Blast Spell Data newSpellData = new SpellData(); newSpellData.id = 4; newSpellData.spellName = "Pyroblast"; newSpellData.iconName = "Icons/Mage/Spell_Fire_Fireball02"; newSpellData.effectName = null; newSpellData.castSoundName = null; newSpellData.hitSoundName = "Sound/Spells/Mage/FireBlast"; newSpellData.spellProjectileName = "Pyroblast"; newSpellData.range = 10; newSpellData.activationCost = 10; newSpellData.baseCooldown = 0.5f; newSpellData.baseCastTime = 1.5f; newSpellData.spellCastType = SpellCastType.Casted; newSpellData.spellTargetMode = SpellTargetMode.SingleTarget; newSpellData.spellGlobal = SpellGlobalCooldownMode.Normal; newSpellData.spellProjectileType = SpellProjectileEffect.TargetedProjectile; //Enemy, Single Target ,40-50 Fire Damage damageEffect = new DamageEffect(DamageType.Fire, 60, 120); newSpellData.Effects.Add(damageEffect); buff = new Buff(8, 4, "Pyroblast", "Icons/Mage/Spell_Fire_Fireball02", BuffType.Debuff, AbilityType.Magic, 6, 0, 0, false, false); buff.buffEffectType = BuffEffectType.None; buff.buffEffectName = null; damageEffect = new DamageEffect(DamageType.Fire, 20, 30); buff.Auras.Add(new PeriodicEffectAura(1, damageEffect, buff)); //Area Freeze applyBuffEffect = new ApplyBuffEffect(buff); newSpellData.Effects.Add(applyBuffEffect); //Add Fire Blast Spell SpellLibrary.AddSpellData(newSpellData); #endregion #region Ice Barrier : Spell Id = 5 / Buff Id = 3 //New Spell newSpellData = new SpellData(); newSpellData.id = 5; newSpellData.spellName = "Ice Barrier"; newSpellData.iconName = "Icons/Mage/spell_ice_lament"; newSpellData.effectName = null; newSpellData.castSoundName = "Sound/Spells/Mage/IceBarrirerImpact"; newSpellData.hitSoundName = null; newSpellData.spellProjectileName = null; newSpellData.range = 0; newSpellData.activationCost = 0; newSpellData.baseCooldown = 0.5f; newSpellData.baseCastTime = 0; newSpellData.spellCastType = SpellCastType.Instant; newSpellData.spellTargetMode = SpellTargetMode.Self; newSpellData.spellGlobal = SpellGlobalCooldownMode.Normal; newSpellData.spellProjectileType = SpellProjectileEffect.Instant; //Magic Buff for 30 sec buff = new Buff(3, 5, "Ice Barrier", "Icons/Mage/spell_ice_lament", BuffType.Buff, AbilityType.Magic, 30, 0, 0, true, true); buff.buffEffectType = BuffEffectType.StaticEffect; buff.buffEffectName = "Ice Barrier"; //Aura 100 absorb buff.Auras.Add(new AbsorbAura(100, buff)); //Area Freeze applyBuffEffect = new ApplyBuffEffect(buff); newSpellData.Effects.Add(applyBuffEffect); //Add Frost Nova Spell SpellLibrary.AddSpellData(newSpellData); #endregion #region Frost Bolt : Spell Id = 6 / Buff Id = 4 // Fire Blast Spell Data newSpellData = new SpellData(); newSpellData.id = 6; newSpellData.spellName = "Frost Bolt"; newSpellData.iconName = "Icons/Mage/Spell_Frost_FrostBolt02"; newSpellData.effectName = null; newSpellData.castSoundName = null; newSpellData.hitSoundName = "Sound/Spells/Mage/IceImpact"; newSpellData.spellProjectileName = "Frost Bolt"; newSpellData.range = 10; newSpellData.activationCost = 10; newSpellData.baseCooldown = 0; newSpellData.baseCastTime = 1.0f; newSpellData.spellCastType = SpellCastType.Casted; newSpellData.spellTargetMode = SpellTargetMode.SingleTarget; newSpellData.spellGlobal = SpellGlobalCooldownMode.Normal; newSpellData.spellProjectileType = SpellProjectileEffect.TargetedProjectile; //Enemy, Single Target 20-50 Frost Damage damageEffect = new DamageEffect(DamageType.Fire, 30, 50); damageEffect.Modifiers.Add(new SpellModifier(1, 2, 50, 2)); newSpellData.Effects.Add(damageEffect); //Magic Buff for 5 sec buff = new Buff(4, 6, "Frost Bolt", "Icons/Mage/Spell_Frost_FrostBolt02", BuffType.Debuff, AbilityType.Magic, 5, 0, 0, false, false); buff.buffEffectType = BuffEffectType.None; buff.buffEffectName = null; buff.Auras.Add(new ParameterModifier(ParameterType.Speed, ParameterValue.PenaltyMultiplier, 0.6f)); //Area Freeze applyBuffEffect = new ApplyBuffEffect(buff); newSpellData.Effects.Add(applyBuffEffect); //Add Fire Blast Spell SpellLibrary.AddSpellData(newSpellData); #endregion #region Invicibility : Spell Id = 7 / Buff Id = 5 //New Spell newSpellData = new SpellData(); newSpellData.id = 7; newSpellData.spellName = "Invicibility"; newSpellData.iconName = "Icons/Mage/ability_mage_GreaterInvisibility"; newSpellData.effectName = null; newSpellData.castSoundName = "Sound/Spells/Mage/Invisibility_Impact_Chest"; newSpellData.hitSoundName = null; newSpellData.spellProjectileName = null; newSpellData.range = 0; newSpellData.activationCost = 0; newSpellData.baseCooldown = 5f; newSpellData.baseCastTime = 0; newSpellData.spellCastType = SpellCastType.Instant; newSpellData.spellTargetMode = SpellTargetMode.Self; newSpellData.spellGlobal = SpellGlobalCooldownMode.NoCooldown; newSpellData.spellProjectileType = SpellProjectileEffect.Instant; //Magic Buff for 3 sec buff = new Buff(5, 7, "Invicibility", "Icons/Mage/ability_mage_GreaterInvisibility", BuffType.Buff, AbilityType.Magic, 3, 0, 0, true, true); buff.buffEffectType = BuffEffectType.None; //Aura Invicible + Fade buff.Auras.Add(new FadeAura(0.2f)); buff.Auras.Add(new StateModifier(EntityStateType.Invisible)); //Area Freeze applyBuffEffect = new ApplyBuffEffect(buff); newSpellData.Effects.Add(applyBuffEffect); //Add Frost Nova Spell SpellLibrary.AddSpellData(newSpellData); #endregion #region Deep Freeze : Spell Id = 8 / Buff Id = 6 //New Spell newSpellData = new SpellData(); newSpellData.id = 8; newSpellData.spellName = "Deep Freeze"; newSpellData.iconName = "Icons/Mage/Ability_Mage_DeepFreeze"; newSpellData.effectName = null; newSpellData.castSoundName = null; newSpellData.hitSoundName = "Sound/Spells/Mage/DeepFreeze"; newSpellData.spellProjectileName = null; newSpellData.range = 10; newSpellData.activationCost = 20; newSpellData.baseCooldown = 10; newSpellData.baseCastTime = 0; newSpellData.spellCastType = SpellCastType.Instant; newSpellData.spellTargetMode = SpellTargetMode.SingleTarget; newSpellData.spellGlobal = SpellGlobalCooldownMode.NoCooldown; newSpellData.spellProjectileType = SpellProjectileEffect.Instant; //Magic Debuff for 3 sec buff = new Buff(6, 8, "Deep Freeze", "Icons/Mage/Ability_Mage_DeepFreeze", BuffType.Debuff, AbilityType.Magic, 3, 0, 0, false, false); buff.buffEffectType = BuffEffectType.StaticEffect; buff.buffEffectName = "Deep Freeze"; //Aura Root buff.Auras.Add(new StateModifier(EntityStateType.Stun)); //Area Freeze buff.Auras.Add(new StateModifier(EntityStateType.Freeze)); applyBuffEffect = new ApplyBuffEffect(buff); newSpellData.Effects.Add(applyBuffEffect); //Add Deep Freeze Spell SpellLibrary.AddSpellData(newSpellData); #endregion #region Blink : Spell Id = 9 / Buff Id = None //New Spell newSpellData = new SpellData(); newSpellData.id = 9; newSpellData.spellName = "Blink"; newSpellData.iconName = "Icons/Mage/Spell_Arcane_Blink"; newSpellData.effectName = null; newSpellData.castSoundName = "Sound/Spells/Mage/Teleport"; newSpellData.hitSoundName = null; newSpellData.spellProjectileName = null; newSpellData.range = 0; newSpellData.activationCost = 0; newSpellData.baseCooldown = 0.5f; newSpellData.baseCastTime = 0; newSpellData.spellCastType = SpellCastType.Instant; newSpellData.spellTargetMode = SpellTargetMode.Self; newSpellData.spellGlobal = SpellGlobalCooldownMode.NoCooldown; newSpellData.spellProjectileType = SpellProjectileEffect.Instant; newSpellData.flags = SpellFlags.CastableWhileStunned; //Teleport forward 5 buffRemovalEffect = new BuffRemovalEffect(delegate(Buff removalBuff, Unit caster, Unit target, Spell spell, ArenaManager world) { for (int i = 0; i < removalBuff.Auras.Count; i++) { if (removalBuff.Auras[i] is StateModifier) { StateModifier aura = removalBuff.Auras[i] as StateModifier; if (aura.stateId == EntityStateType.Stun || aura.stateId == EntityStateType.Root) { return(true); } } } return(false); }); newSpellData.Effects.Add(buffRemovalEffect); teleportEffect = new TeleportEffect(15); newSpellData.Effects.Add(teleportEffect); //Add Frost Nova Spell SpellLibrary.AddSpellData(newSpellData); #endregion #region Blast Wave : Spell Id = 10 / Buff Id = 7 //New Spell newSpellData = new SpellData(); newSpellData.id = 10; newSpellData.spellName = "Blast Wave"; newSpellData.iconName = "Icons/Mage/spell_holy_excorcism_02"; newSpellData.effectName = "Blast Wave"; newSpellData.castSoundName = "Sound/Spells/Mage/FireNova"; newSpellData.hitSoundName = null; newSpellData.spellProjectileName = null; newSpellData.range = 0; newSpellData.activationCost = 20; newSpellData.baseCooldown = 5; newSpellData.baseCastTime = 0; newSpellData.spellCastType = SpellCastType.Instant; newSpellData.spellTargetMode = SpellTargetMode.NoTarget; newSpellData.spellGlobal = SpellGlobalCooldownMode.Normal; newSpellData.spellProjectileType = SpellProjectileEffect.Instant; //Enemy, Self Area:4 , Frost Damage 15-15 damageEffect = new DamageEffect(DamageType.Fire, 15, 15); aoeEffect = new AoeEffect(damageEffect, AoeMode.Self, 5); newSpellData.Effects.Add(aoeEffect); knockBackEffect = new KnockBackEffect(4, 3); aoeEffect = new AoeEffect(knockBackEffect, AoeMode.Self, 5); newSpellData.Effects.Add(aoeEffect); //Magic Debuff for 1 sec buff = new Buff(7, 10, "Blast Wave", "Icons/Mage/spell_holy_excorcism_02", BuffType.Debuff, AbilityType.Magic, 1f, 0, 0, false, false); buff.buffEffectType = BuffEffectType.None; buff.buffEffectName = null; //Aura Root buff.Auras.Add(new StateModifier(EntityStateType.Knockback)); buff.Auras.Add(new ParameterModifier(ParameterType.Speed, ParameterValue.PenaltyMultiplier, 0.3f)); applyBuffEffect = new ApplyBuffEffect(buff); aoeEffect = new AoeEffect(applyBuffEffect, AoeMode.Self, 5); newSpellData.Effects.Add(aoeEffect); //Add Frost Nova Spell SpellLibrary.AddSpellData(newSpellData); #endregion #region Living Bomb : Spell Id = 11 / Buff Id = 9 // Fire Blast Spell Data newSpellData = new SpellData(); newSpellData.id = 11; newSpellData.spellName = "Living Bomb"; newSpellData.iconName = "Icons/Mage/Ability_Mage_LivingBomb"; newSpellData.effectName = null; newSpellData.castSoundName = null; newSpellData.hitSoundName = "Sound/Spells/Mage/LivingBombCast"; newSpellData.spellProjectileName = null; newSpellData.range = 10; newSpellData.activationCost = 10; newSpellData.baseCooldown = 0.5f; newSpellData.baseCastTime = 0; newSpellData.spellCastType = SpellCastType.Instant; newSpellData.spellTargetMode = SpellTargetMode.SingleTarget; newSpellData.spellGlobal = SpellGlobalCooldownMode.Normal; newSpellData.spellProjectileType = SpellProjectileEffect.Instant; //Enemy, Single Target ,40-50 Fire Damage damageEffect = new DamageEffect(DamageType.Fire, 20, 30); newSpellData.Effects.Add(damageEffect); buff = new Buff(9, 11, "Living Bomb", "Icons/Mage/Ability_Mage_LivingBomb", BuffType.Debuff, AbilityType.Magic, 2, 0, 0, false, false); buff.buffEffectType = BuffEffectType.None; buff.buffEffectName = null; damageEffect = new DamageEffect(DamageType.Fire, 10, 25); buff.Auras.Add(new PeriodicEffectAura(0.5f, damageEffect, buff)); buff.Auras.Add(new SpellScriptAura(new SpellScriptInfoArgs(11, CharacterEventTypes.OnBuffExpired, 1, null, null), buff, 12)); //Area Freeze applyBuffEffect = new ApplyBuffEffect(buff); newSpellData.Effects.Add(applyBuffEffect); //Add Fire Blast Spell SpellLibrary.AddSpellData(newSpellData); #endregion #region Living Bomb Explosion : Spell Id = 12 / Buff Id = None //New Spell newSpellData = new SpellData(); newSpellData.id = 12; newSpellData.spellName = "Living Bomb Explosion"; newSpellData.iconName = "Icons/Mage/Ability_Mage_LivingBomb"; newSpellData.effectName = null; newSpellData.castSoundName = null; newSpellData.hitSoundName = "Sound/Spells/Mage/LivingBombArea"; newSpellData.spellProjectileName = null; newSpellData.range = 0; newSpellData.activationCost = 0; newSpellData.baseCooldown = 0; newSpellData.baseCastTime = 0; newSpellData.spellCastType = SpellCastType.Instant; newSpellData.spellTargetMode = SpellTargetMode.SingleTarget; newSpellData.spellGlobal = SpellGlobalCooldownMode.NoCooldown; newSpellData.spellProjectileType = SpellProjectileEffect.Instant; //Enemy, Self Area:4 , Frost Damage 15-15 damageEffect = new DamageEffect(DamageType.Fire, 150, 150); aoeEffect = new AoeEffect(damageEffect, AoeMode.Splash, 5); newSpellData.Effects.Add(aoeEffect); //Add Frost Nova Spell SpellLibrary.AddSpellData(newSpellData); #endregion #region Ice Lance: Spell Id = 13 / Buff Id = 10 // Fire Blast Spell Data newSpellData = new SpellData(); newSpellData.id = 13; newSpellData.spellName = "Ice Lance"; newSpellData.iconName = "Icons/Mage/Spell_Frost_ChillingBlast"; newSpellData.effectName = null; newSpellData.castSoundName = null; newSpellData.hitSoundName = "Sound/Spells/Mage/IceLanceImpact"; newSpellData.spellProjectileName = "Ice Lance"; newSpellData.range = 10; newSpellData.activationCost = 10; newSpellData.baseCooldown = 0; newSpellData.baseCastTime = 0; newSpellData.spellCastType = SpellCastType.Instant; newSpellData.spellTargetMode = SpellTargetMode.SingleTarget; newSpellData.spellGlobal = SpellGlobalCooldownMode.Normal; newSpellData.spellProjectileType = SpellProjectileEffect.TargetedProjectile; //Enemy, Single Target 20-50 Frost Damage damageEffect = new DamageEffect(DamageType.Fire, 10, 20); damageEffect.Modifiers.Add(new SpellModifier(1, 4, 50, 2)); newSpellData.Effects.Add(damageEffect); //Add Fire Blast Spell SpellLibrary.AddSpellData(newSpellData); #endregion //Warrior #region Charge : Spell Id = 100/ Buff Id = 100 //New Spell newSpellData = new SpellData(); newSpellData.id = 100; newSpellData.spellName = "Charge"; newSpellData.iconName = "Icons/Warrior/Ability_Warrior_Charge"; newSpellData.effectName = null; newSpellData.castSoundName = "Sound/Spells/Warrior/HeroricLeap"; newSpellData.hitSoundName = null; newSpellData.spellProjectileName = null; newSpellData.range = 0; newSpellData.activationCost = 0; newSpellData.baseCooldown = 4f; newSpellData.baseCastTime = 0; newSpellData.spellCastType = SpellCastType.Instant; newSpellData.spellTargetMode = SpellTargetMode.Self; newSpellData.spellGlobal = SpellGlobalCooldownMode.NoCooldown; newSpellData.spellProjectileType = SpellProjectileEffect.Instant; //Magic Buff for 3 sec buff = new Buff(100, 100, "Charge", "Icons/Warrior/Ability_Warrior_Charge", BuffType.Buff, AbilityType.Physical, 3, 0, 0, true, true); buff.buffEffectType = BuffEffectType.None; //Aura 150% Speed buff.Auras.Add(new ParameterModifier(ParameterType.Speed, ParameterValue.BonusMultiplier, 2f)); //Area Freeze applyBuffEffect = new ApplyBuffEffect(buff); newSpellData.Effects.Add(applyBuffEffect); //Add Frost Nova Spell SpellLibrary.AddSpellData(newSpellData); #endregion #region Mortal Strike : Spell Id = 101 / Buff Id = None // Fire Blast Spell Data newSpellData = new SpellData(); newSpellData.id = 101; newSpellData.spellName = "Mortal Strike"; newSpellData.iconName = "Icons/Warrior/Ability_Warrior_SavageBlow"; newSpellData.effectName = null; newSpellData.castSoundName = null; newSpellData.hitSoundName = "Sound/Spells/Warrior/m2hSwordHitFlesh1c"; newSpellData.spellProjectileName = null; newSpellData.range = 1.5f; newSpellData.activationCost = 10; newSpellData.baseCooldown = 0.5f; newSpellData.baseCastTime = 0; newSpellData.spellCastType = SpellCastType.Instant; newSpellData.spellTargetMode = SpellTargetMode.SingleTarget; newSpellData.spellGlobal = SpellGlobalCooldownMode.Normal; newSpellData.spellProjectileType = SpellProjectileEffect.Instant; //Enemy, Single Target ,40-50 Fire Damage damageEffect = new DamageEffect(DamageType.Fire, 20, 40); newSpellData.Effects.Add(damageEffect); //Add Fire Blast Spell SpellLibrary.AddSpellData(newSpellData); #endregion #endregion #region Spell Icons SpellIcons = new Dictionary <string, Sprite>(); for (int i = 0; i < SpellLibrary.Count; i++) { if (!SpellIcons.ContainsKey(SpellLibrary[i].iconName)) { SpellIcons.Add(SpellLibrary[i].iconName, Resources.Load <Sprite>(SpellLibrary[i].iconName)); } } SpellIcons.Add("Default", Resources.Load <Sprite>("Icons/Mage/Spell_Arcane_StudentOfMagic")); #endregion }