public override bool OnBeginSpellCast( Mobile m, ISpell s )
        {
            if (!CTFGame.Running)
            {
                m.SendMessage( CTFGame.HuePerson, "You cannot cast spells until the game has started." );
                return false;
            }
            else if( CTFGame.GetFlag( m ) != null && s is InvisibilitySpell)
            {
                m.SendMessage( CTFGame.HuePerson, "You cannot use invisibility spell while carrying a flag." );
                return false;
            }
            else if ( m.AccessLevel == AccessLevel.Player &&
                ( s is MarkSpell || s is RecallSpell || s is GateTravelSpell || s is PolymorphSpell ||
                s is SummonDaemonSpell || s is AirElementalSpell || s is EarthElementalSpell || s is EnergyVortexSpell ||
                s is FireElementalSpell || s is WaterElementalSpell || s is BladeSpiritsSpell || s is SummonCreatureSpell ||
                s is EnergyFieldSpell || s is ResurrectionSpell || s is LichFormSpell || s is HorrificBeastSpell || s is WraithFormSpell ||
                s is VengefulSpiritSpell || s is SummonFamiliarSpell || s is SacredJourneySpell
                ) )
            {
                m.SendMessage( CTFGame.HuePerson, "That spell is not allowed here." );
                return false;
            }

            else if (((Spell)s).Info.Name == "Ethereal Mount")
            {
                m.SendMessage("You cannot mount your ethereal here.");
                return false;
            }

            return base.OnBeginSpellCast( m, s );
        }
Пример #2
0
        public override bool OnBeginSpellCast(Mobile from, ISpell s)
        {
            if (from.IsPlayer())
                from.SendLocalizedMessage(502629); // You cannot cast spells here.

            return (from.IsStaff());
        }
        public override bool OnBeginSpellCast(Mobile from, ISpell s)
        {
            if (s is GateTravelSpell || s is RecallSpell || s is MarkSpell || s is InvisibilitySpell)
                return false;

            return true;
        }
Пример #4
0
        public override bool OnBeginSpellCast( Mobile from, ISpell s )
        {
            if ( from.AccessLevel == AccessLevel.Player )
                from.SendLocalizedMessage( 502629 ); // You cannot cast spells here.

            return ( from.AccessLevel > AccessLevel.Player );
        }
        public bool SpellAllowed(ISpell s)
        {
            Type stype = s.GetType();

            foreach (Type type in m_BeneficialTypes)
                if (type == stype)
                {
                    m_Spell = s.GetType();
                    return true;
                }

            if (s.GetType() == m_Spell)
                m_CastCount++;

            else
            {
                m_Spell = s.GetType();
                m_CastCount = 1;
            }

            if (m_CastCount > 3)
            {
                m_Part.SendMessage("You have already tried to cast that spell three times in a row!");
                return false;
            }

            return true;
        }
Пример #6
0
        protected void ValidateAttack(ISpell spellToCast)
        {
            if (this.Unit.EnergyPoints < spellToCast.EnergyCost)
                throw new NotEnoughEnergyException(string.Format("{0} does not have enough energy to cast {1}", unit.Name, spellToCast.GetType().Name));

            unit.EnergyPoints -= spellToCast.EnergyCost;
        }
 public void ValidateEnergyPoints(IUnit unit, ISpell spell)
 {
     if (unit.EnergyPoints < spell.EnergyCost)
     {
         throw new NotEnoughEnergyException(
             string.Format("{0} does not have enough energy to cast {1}", unit.Name, spell.GetType().Name));
     }
 }
Пример #8
0
 public bool CastSpell(ISpell spell, Point target)
 {
     m_engine.BeforePlayerAction();
     bool didAnything = m_engine.CastSpell(m_engine.Player, (Spell)spell, target);
     if (didAnything)
         m_engine.AfterPlayerAction();
     return didAnything;
 }
 public override bool OnBeginSpellCast( Mobile from, ISpell s )
 {
     if( from.AccessLevel > AccessLevel.Player )
     {
         return false;
     }
     return _BoardGameControlItem.CanCastSpells;
 }
Пример #10
0
 public void ValidateEnergy(ISpell attack)
 {
     if (this.Unit.EnergyPoints - attack.EnergyCost < 0)
        {
        throw new NotEnoughEnergyException(String.Format(GlobalMessages.NotEnoughEnergy, this.Unit.Name,
            attack.GetType().Name));
        }
 }
 public override bool OnBeginSpellCast(Mobile m, ISpell s)
 {
     if (m.Player && m.AccessLevel < AccessLevel.GameMaster)
     {
         FizzleStrangely(m);
         return false;
     }
     return base.OnBeginSpellCast(m, s);
 }
 public override bool OnBeginSpellCast(Mobile from, ISpell s)
 {
     if (from.AccessLevel == AccessLevel.Player)
     {
         from.SendMessage("You cannot cast spells on a race track.");
         return false;
     }
     return base.OnBeginSpellCast(from, s);
 }
Пример #13
0
 public override bool OnBeginSpellCast(Mobile m, ISpell s)
 {
     if ((s is GateTravelSpell || s is RecallSpell || s is MarkSpell || s is SacredJourneySpell) && m.AccessLevel == AccessLevel.Player)
     {
         m.SendMessage("You cannot cast that spell here.");
         return false;
     }
     return base.OnBeginSpellCast(m, s);
 }
 public override bool OnBeginSpellCast(Mobile m, ISpell s)
 {
     if (s is MarkSpell || s is GateTravelSpell)
     {
         m.SendMessage("You can not cast that here");
         return false;
     }
     return base.OnBeginSpellCast(m, s);
 }
Пример #15
0
        public override bool OnBeginSpellCast(Mobile m, ISpell s)
        {
            if(m.AccessLevel == AccessLevel.Player) {
                if (s is Server.Spells.Sixth.MarkSpell || s is Server.Spells.Fourth.RecallSpell || s is Server.Spells.Seventh.GateTravelSpell
                || s is Server.Spells.Chivalry.SacredJourneySpell)
                return false;
            }

            return true;
        }
Пример #16
0
		public override bool OnBeginSpellCast( Mobile m, ISpell s )
		{
			if ( s is MarkSpell && m.AccessLevel == AccessLevel.Player )
			{
				m.SendLocalizedMessage( 501800 ); // You cannot mark an object at that location.
				return false;
			}

			return base.OnBeginSpellCast( m, s );
		}
Пример #17
0
        public static bool HasEnoughEnergy(IUnit unit, ISpell spell)
        {
            if (unit.EnergyPoints - spell.EnergyCost < 0)
            {
                var message = string.Format(GlobalMessages.NotEnoughEnergy, unit.Name, spell.GetType().Name);
                throw new NotEnoughEnergyException(message);
            }

            return true;
        }
Пример #18
0
		public override bool OnBeginSpellCast( Mobile from, ISpell s )
		{
			Console.WriteLine( "Checking spellcast!" );
			if( from.AccessLevel > AccessLevel.Player )
			{
				return true;
			}
			return _BoardGameControlItem.CanCastSpells;
			
		}
Пример #19
0
		public override bool OnBeginSpellCast( Mobile m, ISpell s )
		{
			if ( s is RecallSpell || s is SacredJourneySpell )
			{
				m.SendLocalizedMessage( 501802 ); // Thy spell doth not appear to work...
				return false;
			}

			return base.OnBeginSpellCast( m, s );
		}
Пример #20
0
        public override bool OnBeginSpellCast(Mobile m, ISpell s)
        {
            if (s is Server.Spells.Sixth.MarkSpell)
            {
                m.SendMessage("Voce nao pode marcar runa aqui!");
                return false;
            }

            return base.OnBeginSpellCast(m, s);
        }
 protected void IsThereEnoughEnergy(ISpell attack)
 {
     if (this.Unit.EnergyPoints < attack.EnergyCost)
     {
         throw new NotEnoughEnergyException(string.Format(
             GlobalMessages.NotEnoughEnergy,
             this.Unit.Name,
             attack.GetType().Name));
     }
 }
Пример #22
0
		public override bool OnBeginSpellCast( Mobile m, ISpell s )
		{
			if ( !s.OnCastInTown( this ) )
			{
				m.SendLocalizedMessage( 500946 ); // You cannot cast this in town!
				
				return false;
			}
			
			return base.OnBeginSpellCast( m, s );
		}
Пример #23
0
        public override bool OnBeginSpellCast(Mobile m, ISpell s)
        {
            if ((s is GateTravelSpell || s is MarkSpell) && m.IsPlayer())
            {
                m.SendLocalizedMessage(501802); // Thy spell doth not appear to work...
				
                return false;
            }
			
            return base.OnBeginSpellCast(m, s);
        }
Пример #24
0
        public override bool OnBeginSpellCast(Mobile m, ISpell s)///////////////////////////////////////////////
        {
            if (( this.Map == Map.Felucca && s is EnchantedGroveSpell) && m.AccessLevel == AccessLevel.Player)
            {
                m.SendLocalizedMessage(501802); // Thy spell doth not appear to work...

                return false;
            }

            return base.OnBeginSpellCast(m, s);
        }
Пример #25
0
 public ISpell Fuse(ISpell other)
 {
     var val = _spell.FuseWith(other);
     if (val != null)
     {
         Debug.Log(_spell.ToString() + " -- fused");
         _parent.SpellFused();
         CleanUp();
     }
     return val;
 }
Пример #26
0
		public override bool OnBeginSpellCast( Mobile m, ISpell s )
		{
			if ( ( s is GateTravelSpell || s is RecallSpell || s is MarkSpell || s is SacredJourneySpell ) && m.AccessLevel == AccessLevel.Player )
			{
				m.SendLocalizedMessage( 501802 ); // Thy spell doth not appear to work...
				
				return false;
			}
			
			return base.OnBeginSpellCast( m, s );
		}
Пример #27
0
        public bool Equals(ISpell other)
        {
            var otherNonCombatSpell = other as NonCombatSpell;
            if (otherNonCombatSpell == null)
            {
                return false;
            }

            return Name == otherNonCombatSpell.Name
                && Level == otherNonCombatSpell.Level
                && Effects.HaveSameItems(otherNonCombatSpell.Effects);
        }
Пример #28
0
		public override bool OnBeginSpellCast(Mobile m, ISpell s)
		{
			if ( s is Server.Spells.Sixth.InvisibilitySpell )
			{
				m.SendMessage( 0x40, "You can't cast that spell when you're close to a chessboard" );
				return false;
			}
			else
			{
				return base.OnBeginSpellCast (m, s);
			}
		}
Пример #29
0
    public static SpellReticule Create(GameObject reticule, Vector3 pos, Quaternion rot, ISpell spell, SpellRegistry registry, Parent parent)
    {
        GameObject newObject = Instantiate(reticule, pos, rot) as GameObject;
        SpellReticule ret = newObject.GetComponent<SpellReticule>();

        ret._spell = spell;
        ret._registry = registry;
        ret._registryId = registry.Register(ret);
        ret._parent = parent;

        return ret;
    }
Пример #30
0
 public override bool OnBeginSpellCast( Mobile m, ISpell s )
 {
     if ( m.AccessLevel == AccessLevel.Player )
     {
         m.SendMessage( "Mysterious Energies prohibit spell casting." );
         return false;
     }
     else
     {
         return base.OnBeginSpellCast( m, s );
     }
 }
 /// <summary>
 /// Registers a spell-like ability.  The caster level is assumed to be equal to the character's level.
 /// </summary>
 /// <param name="usesPerDay">The number of times per day the spell-like ability can be used.</param>
 /// <param name="spell">The spell this spell-like ability imitates.</param>
 /// <param name="keyAbilityScore">The ability score associated with the spell-like ability.</param>
 /// <exception cref="System.ArgumentNullException">Thrown when an argument is null.</exception>
 public ISpellLikeAbility Register(byte usesPerDay, ISpell spell, IAbilityScore keyAbilityScore)
 {
     return(this.Register(usesPerDay, spell, keyAbilityScore, () => this.Character.Level));
 }
Пример #32
0
 public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target)
 {
     AddParticleTarget(owner, "ezreal_bow_yellow.troy", owner, 1, "L_HAND");
 }
Пример #33
0
        private void PlayTurn(IPlayer player, IPlayer opponent)
        {
            Console.WriteLine(constants.StartOfTurnOptions);

            while (true)
            {
                string input = Console.ReadLine();
                if (input == "8")
                {
                    break;
                }
                switch (input)
                {
                case "1":
                    Console.WriteLine(constants.AskToEnterCreatureName);
                    player.PrintCreaturesInHand();
                    ICreature creature = player.SelectACreature(Console.ReadLine());
                    if (creature.ManaCost > player.ManaCrystals)
                    {
                        Console.WriteLine(constants.NotEnoughManaCrystal);
                        break;
                    }
                    player.PlayCreature(creature);
                    break;

                case "2":
                    Console.WriteLine(constants.AskToEnterSpellName);
                    player.PrintSpellsInHand();
                    ISpell spell = player.SelectASpell(Console.ReadLine());
                    if (spell.ManaCost > player.ManaCrystals)
                    {
                        Console.WriteLine(constants.NotEnoughManaCrystal);
                        break;
                    }
                    player.ManaCrystals -= spell.ManaCost;
                    player.PlayerHand.Remove(spell);
                    Console.WriteLine(constants.MenuWhenCastingSpell);
                    switch (Console.ReadLine())
                    {
                    case "1":
                        spell.CastSpell(opponent);
                        break;

                    case "2":
                        CastSpellOnOpponentsCreature(player, opponent, spell);
                        break;
                    }
                    break;

                case "3":
                    if (opponent.BattleField.Count == 0)
                    {
                        Console.WriteLine(constants.EnemyDoesntHaveACreature);
                        PlayTurn(player, opponent);
                    }
                    else
                    {
                        Console.WriteLine(constants.AskToEnterCreatureName);
                        player.PrintCreaturesOnBattleField();
                        string    attackingCreature = Console.ReadLine().ToLower();
                        ICreature myCreature        = (ICreature)player.BattleField.FirstOrDefault(x => x.Name.ToLower() == attackingCreature);

                        Console.WriteLine(constants.EnterCreatureNameToBeAttacked);
                        opponent.PrintCreaturesOnBattleField();
                        string    defendingCreature = Console.ReadLine().ToLower();
                        ICreature oppoCreature      = (ICreature)opponent.BattleField.FirstOrDefault(x => x.Name.ToLower() == defendingCreature);
                        myCreature.Attack(oppoCreature);
                        if (oppoCreature.IsDead)
                        {
                            opponent.BattleField.Remove(oppoCreature);
                        }
                    }
                    break;

                case "4":
                    Console.WriteLine(constants.EnterCreatureName);
                    player.PrintCreaturesOnBattleField();
                    ICreature myCreature2 = (ICreature)player.BattleField.FirstOrDefault(x => x.Name.ToLower() == Console.ReadLine().ToLower());
                    myCreature2.Attack(opponent);
                    break;
                }
            }
        }
 public void OnStartCasting(IObjAiBase owner, ISpell spell, IAttackableUnit target)
 {
     AddParticleTarget(owner, "Kassadin_Base_cas.troy", owner, 1, "L_HAND");
 }
Пример #35
0
 public override bool OnBeginSpellCast(Mobile m, ISpell s)
 {
     m.SendMessage("This magic does not seem to work here.");
     return(false);
 }
Пример #36
0
 public void OnStartCasting(IObjAiBase owner, ISpell spell, IAttackableUnit target)
 {
 }
Пример #37
0
 public void ApplyEffects(IObjAiBase owner, IAttackableUnit target, ISpell spell, IProjectile projectile)
 {
 }
Пример #38
0
 public void OnActivate(IObjAiBase unit, ISpell ownerSpell)
 {
     unit.ApplyCrowdControl(_crowd);
 }
 public void OnActivate(IObjAiBase unit, IBuff buff, ISpell ownerSpell)
 {
     StatsModifier.MoveSpeed.PercentBonus = 1.25f;
     unit.AddStatModifier(StatsModifier);
 }
 public void OnFinishCasting(IObjAiBase owner, ISpell spell, IAttackableUnit target)
 {
     spell.AddProjectileTarget("NullLance", target, true);
 }
Пример #41
0
        public void AfterAttack(RoundResult rr, ISpell spell)
        {
            var attack = rr.Attacks.FirstOrDefault(s => s.Spell == spell);

            if (attack == null || !attack.IsHit || attack.Damage <= 0)
            {
                return;
            }

            var weapon = _player.GetWeaponFromSpell(attack.Spell);

            if (weapon == null)
            {
                return;
            }

            if (attack.IsCrit)
            {
                switch (_player.Settings.Neck)
                {
                case NeckTalisman.EgonPendant:
                    _player.AddBonusAttack(rr, new EgonPendant(_player));
                    break;

                case NeckTalisman.ChokerOfSheedBlood:
                    _player.AddBonusAttack(rr, new ChokerOfShedBlood(_player));
                    break;
                }

                switch (_player.Settings.Luck)
                {
                case LuckTalisman.GamblersSoul:
                    _player.AddBonusAttack(rr, new GamblersSoul(_player));
                    break;

                // Cold Silver Dice 22% on Crit +1 Energy.
                case LuckTalisman.ColdSilverDice when Helper.RNG() >= 0.78:
                    weapon.Energy++;

                    _player.AddBonusAttack(rr, new ColdSilver());
                    break;
                }
            }

            // Hit 11% (<50% BossHP) +1 Energy.
            if (_player.Settings.Neck == NeckTalisman.SeedOfAgression && Helper.RNG() >= 0.945)
            {
                weapon.Energy++;
                _player.AddBonusAttack(rr, new SeedOfAggression());
            }

            // Ashes Proc from Spells dealing X*CombatPower (NOT ON GCD)
            if (_player.Settings.Head == HeadTalisman.Ashes && RepeatHits == 3)
            {
                _player.AddBonusAttack(rr, new Ashes());
                RepeatHits = 0;
            }
            else if (RepeatHits < 3 && _player.Settings.Head == HeadTalisman.Ashes)
            {
                RepeatHits++;
            }

            if (_player.Settings.PrimaryWeaponProc == WeaponProc.AnimaTouched && _rnd.Next(1, 4) == 3)
            {
                _player.AddBonusAttack(rr, new AnimaTouched(_player));
            }

            if (_player.Settings.PrimaryWeaponProc == WeaponProc.FlameWreathed && _rnd.Next(1, 101) <= 15)
            {
                _player.AddBonusAttack(rr, new FlameWreathed(_player));
            }

            if (_player.Settings.PrimaryWeaponProc == WeaponProc.PlasmaForged && _rnd.Next(1, 5) == 4)
            {
                switch (_lastPlasma)
                {
                case 0:
                    _player.AddBonusAttack(rr, new PlasmaForgedOne());
                    _lastPlasma = 1;
                    break;

                case 1:
                    _player.AddBonusAttack(rr, new PlasmaForgedTwo());
                    _lastPlasma = 2;
                    break;

                case 2:
                    _player.AddBonusAttack(rr, new PlasmaForgedThree());
                    _lastPlasma = 0;
                    break;
                }
            }

            if (_player.Settings.PrimaryWeaponProc == WeaponProc.Shadowbound && _rnd.Next(1, 6) == 5)
            {
                _player.AddBonusAttack(rr, new Shadowbound());
            }

            // Gadget
            if (_player.Settings.Gadget == Gadget.ShardOfSesshoSeki)
            {
                _player.AddBonusAttack(rr, new ShardOfSesshoSeki(_player));
            }
        }
Пример #42
0
 public void AddSpell(ISpell spell)
 {
     spellBook.Add(spell);
 }
Пример #43
0
 public void ApplyEffects(IObjAiBase owner, IAttackableUnit target, ISpell spell, IProjectile projectile)
 {
     //projectile.SetToRemove();
 }
Пример #44
0
        public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target)
        {
            bool game = owner.RefGame.IsRunning;
            int  poof = rand.Next(1, 2);

            var health       = 150;
            var fearduration = 0.5f + (0.25 * (spell.Level - 1));
            var apbonus      = owner.Stats.AbilityPower.Total * 0.2f;
            var damage       = 35 + ((15 * (spell.Level - 1)) + apbonus);
            var attspeed     = 1 / 1.8f; // 1.8 attacks a second = .55... seconds per attack
            var castrange    = spell.SpellData.CastRange[0];
            var triggrange   = 300;
            var sightrange   = 600;
            var armor        = 50;
            var magresist    = 100;
            var spellPos     = new Vector2(spell.X, spell.Y);
            var ownerPos     = new Vector2(owner.X, owner.Y);

            if (owner.WithinRange(ownerPos, spellPos, castrange))
            {
                IMinion Jack = new Minion(owner.RefGame, owner, spell.X, spell.Y, "ShacoBox", "ShacoBox", sightrange, 0);
                owner.RefGame.ObjectManager.AddObject(Jack);
                Jack.SetVisibleByTeam(owner.Team, true);
                if (poof == 1)
                {
                    AddParticle(owner, "JackintheboxPoof.troy", spell.X, spell.Y);
                }
                else if (poof == 2)
                {
                    AddParticle(owner, "JackintheboxPoof2.troy", spell.X, spell.Y);
                }

                if (Jack.IsVisibleByTeam(owner.Team))
                {
                    try
                    {
                        CreateTimer(attspeed, () =>
                        {
                            if (!Jack.IsDead)
                            {
                                var units = GetUnitsInRange(Jack, sightrange, true);
                                foreach (var value in units)
                                {
                                    if (owner.Team != value.Team && value is AttackableUnit)
                                    {
                                        Jack.SetTargetUnit(value);
                                        Jack.AutoAttackTarget          = value;
                                        Jack.AutoAttackProjectileSpeed = 1450;
                                        Jack.AutoAttackHit(value);
                                        spell.AddProjectile("ShacoBoxBasicAttack", value.X, value.Y);
                                        value.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_MAGICAL, DamageSource.DAMAGE_SOURCE_ATTACK, false);
                                    }
                                }
                            }
                        });
                        CreateTimer(5, () =>
                        {
                            if (!Jack.IsDead)
                            {
                                Jack.Die(Jack);
                            }
                            LogInfo("Jack dead.");
                        });
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.ToString());
                    }
                }
            }
        }
Пример #45
0
 public void OnStartCasting(IObjAiBase owner, ISpell spell, IAttackableUnit target)
 {
     AddParticleTarget(owner, pcastname, owner);
 }
Пример #46
0
 public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile)
 {
 }
Пример #47
0
 public abstract ISpell Decorate(ISpell spell);
Пример #48
0
        static ICharacter CreateMainCharacter(string characterName)
        {
            ICharacter Character = CharacterFactory.CreateCharacter(new PlayerCharacter
            {
                Name           = characterName,
                Level          = 1,
                RaceType       = RaceType.Human,
                ClassType      = ClassType.Fighter,
                MainCharacter  = true,
                RandomizeStats = true,
                OwnerName      = "Jonathan Favorite"
            });

            IWeapon Sword = EquipmentFactory.CreateWeapon(new Weapon
            {
                Name       = "Testing Sword (One hand)",
                AttackType = WeaponAttackType.S,
                Category   = WeaponCategory.BastardSwordOneHanded,
                TwoHanded  = false,
                Price      = { Gold = 1, Silver = 50 },
                Damage     = { Amount = 1, SidedDie = 8, Bonus = 1 },
                Weareable  = true,
                SlotType   = EquipmentSlot.PRIMARY
            });

            IGear Shield = EquipmentFactory.CreateGear(new Gear
            {
                Name      = "Testing Shield",
                ArmorType = ArmorTypeList.Shield,
                SlotType  = EquipmentSlot.SECONDARY,
                AC        = 0,
                StatMods  = { new StatModifier {
                                  Modifier = ItemBonusList.AC, Value = 2
                              } }
            });

            IGear Head = EquipmentFactory.CreateGear(new Gear
            {
                Name          = "Testing Head",
                AC            = 6,
                EquipmentType = EquipmentType.Clothing,
                Price         = { Silver = 50 },
                SlotType      = EquipmentSlot.HEAD,
                ArmorType     = ArmorTypeList.ChainMail,
            });

            IGear NewHead = EquipmentFactory.CreateGear(new Gear
            {
                Name          = "Testing Head #1",
                AC            = 1,
                EquipmentType = EquipmentType.Clothing,
                Price         = { Silver = 50 },
                SlotType      = EquipmentSlot.HEAD,
                ArmorType     = ArmorTypeList.PlateMail,
            });

            IGear Shoulder = EquipmentFactory.CreateGear(new Gear
            {
                Name          = "Testing Shoulder",
                AC            = 6,
                EquipmentType = EquipmentType.Clothing,
                Price         = { Gold = 123 },
                SlotType      = EquipmentSlot.SHOULDER,
                ArmorType     = ArmorTypeList.Leather
            });
            IGear Chest = EquipmentFactory.CreateGear(new Gear
            {
                Name          = "Testing Chest",
                AC            = 6,
                EquipmentType = EquipmentType.Clothing,
                Price         = { Gold = 123 },
                SlotType      = EquipmentSlot.CHEST,
                ArmorType     = ArmorTypeList.Leather
            });
            IGear Wrists = EquipmentFactory.CreateGear(new Gear
            {
                Name          = "Testing Wrist",
                AC            = 6,
                EquipmentType = EquipmentType.Clothing,
                Price         = { Gold = 123 },
                SlotType      = EquipmentSlot.WRIST,
                ArmorType     = ArmorTypeList.Leather
            });
            IGear Hands = EquipmentFactory.CreateGear(new Gear
            {
                Name          = "Testing Hands",
                AC            = 6,
                EquipmentType = EquipmentType.Clothing,
                Price         = { Gold = 123 },
                SlotType      = EquipmentSlot.HANDS,
                ArmorType     = ArmorTypeList.Leather
            });
            IGear Legs = EquipmentFactory.CreateGear(new Gear
            {
                Name          = "Testing Legs",
                AC            = 6,
                EquipmentType = EquipmentType.Clothing,
                Price         = { Gold = 123 },
                SlotType      = EquipmentSlot.LEGS,
                ArmorType     = ArmorTypeList.Leather
            });
            IGear Feet = EquipmentFactory.CreateGear(new Gear
            {
                Name          = "Testing Feet",
                AC            = 6,
                EquipmentType = EquipmentType.Clothing,
                Price         = { Gold = 123 },
                SlotType      = EquipmentSlot.FEET,
                ArmorType     = ArmorTypeList.Leather
            });

            Character.AddItem(Head, 1);
            Character.AddItem(NewHead, 1);
            Character.AddItem(Shoulder, 1);
            Character.AddItem(Chest, 1);
            Character.AddItem(Wrists, 1);
            Character.AddItem(Hands, 1);
            Character.AddItem(Legs, 1);
            Character.AddItem(Feet, 1);
            Character.AddItem(Sword, 1);
            Character.AddItem(Shield, 1);

            Character.EquipItem(Head);
            Character.EquipItem(NewHead);
            Character.EquipItem(Shoulder);
            Character.EquipItem(Chest);
            Character.EquipItem(Wrists);
            Character.EquipItem(Hands);
            Character.EquipItem(Legs);
            Character.EquipItem(Feet);
            Character.EquipItem(Sword);
            Character.EquipItem(Shield);



            ISpell MagicMissle = SpellFactory.CreateSpell(new Spell
            {
                SpellID = "magic_missles_level_1",
                Name    = "Magic Missle",
                Level   = 1,
                School  =
                {
                    SpellSchool.Evocation
                },
                Range       = { RangeType = SpellRangeType.Yards, yards = 60 },
                Compontents = { SpellCompontents.V, SpellCompontents.S },
                Duration    = new SpellDurationInfo {
                    DurationType = SpellDurationType.Instantaneous
                },
                CastingTime = 1,
                Classes     =
                {
                    ClassType.Wizard
                },
                AOE = new AreaOfEffect
                {
                    Type    = AOETypes.CUBE,
                    AOESize = 10,
                    Ruler   = RulerTypes.Feet
                },
                SavingThrows =
                {
                    SavingThrowType.None
                },
                Description = "Use of magic missles spell creates up to five missles of magical energy that dart forth from the wizard's fingertip and unerringly strike their target. This includes enemy creatures in a melee."
            });

            Character.AddSpell(MagicMissle);

            return(Character);
        }
Пример #49
0
 public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target)
 {
 }
Пример #50
0
 public ISpell CreateSpell(IWizard caster)
 {
     projectileSpell = new ProjectileSpell(name, cost, animation, caster, (IEnumerable <ICommand>)effects);
     return(projectileSpell);
 }
 public void OnFinishCasting(IObjAiBase owner, ISpell spell, IAttackableUnit target)
 {
     spell.AddProjectileTarget("CaitlynAceintheHoleMissile", target);
 }
Пример #52
0
 public static int GetRegistryNumber(ISpell s)
 {
     return(GetRegistryNumber(s.GetType()));
 }
Пример #53
0
 /// <summary>
 /// Hides spell object and adds it to nonactive spells list
 /// </summary>
 /// <param name="spell"></param>
 private void HideSpell(ISpell spell)
 {
     _activeSpells.Remove(spell);
     _nonactiveSpells.Add(spell);
 }
Пример #54
0
 public static SpellInfo GetSpellInfo(ISpell s)
 {
     return(s != null?GetSpellInfo(s.GetType()) : null);
 }
Пример #55
0
 public void AddSpell(ISpell spell)
 {
     Spells.Add(spell);
 }
Пример #56
0
 public static int GetItemIcon(ISpell s)
 {
     return(s != null?GetItemIcon(s.GetType()) : 0);
 }
Пример #57
0
 public static string GetCircleName(ISpell s)
 {
     return(s != null?GetCircleName(s.GetType()) : String.Empty);
 }
Пример #58
0
 public static int GetCircle(ISpell s)
 {
     return(s != null?GetCircle(s.GetType()) : 0);
 }
Пример #59
0
 public override void OnCastSuccess(ISpell spell)
 {
     this.SetMind(this.MindMax);
 }
Пример #60
0
 public static void SpellCastM(Character caster, ISpell spell)
 {
     Console.WriteLine($"{caster.ToString()} uses {spell.Name}!");
 }