• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# SpellEffect类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中SpellEffect的典型用法代码示例。如果您正苦于以下问题:C# SpellEffect类的具体用法?C# SpellEffect怎么用?C# SpellEffect使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SpellEffect类属于命名空间,在下文中一共展示了SpellEffect类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SummonEffectHandler

		public SummonEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
			// MiscValueB:
			// 41 -> NonCombat Companion
			// 
		}
开发者ID:NVN,项目名称:WCell,代码行数:7,代码来源:Summon.cs


示例2: NotImplementedEffect

		public NotImplementedEffect(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
			if (cast.Caster is Character)
			{
				(cast.Caster as Character).SendSystemMessage(
					"Spell {0} ({1}) has not implemented Effect {2}. Please report this to the developers",
					cast.Spell.Name, cast.Spell.Id, effect.EffectType);
			}
		}
开发者ID:ray2006,项目名称:WCell,代码行数:10,代码来源:NotImplementedEffect.cs


示例3: Equals

 //Use this to check whether an effect is already on someone, then just refresh the duration if it is
 public bool Equals(SpellEffect otherEffect)
 {
     if (instantDamage == otherEffect.instantDamage && instantKnockback == otherEffect.instantKnockback && maxHealthMod == otherEffect.maxHealthMod
         && healthRegenMod == otherEffect.healthRegenMod && damageReductionMod == otherEffect.damageReductionMod && maxManaMod == otherEffect.maxManaMod
         && manaRegenMod == otherEffect.manaRegenMod && damageMod == otherEffect.damageMod && attackTimeMod == otherEffect.attackTimeMod
         && knockbackMod == otherEffect.knockbackMod && speedMod == otherEffect.speedMod && jumpSpeedMod == otherEffect.jumpSpeedMod)
     {
         //All the effects are equal
         return true;
     } else {
         //One or more effects is not equal
         return false;
     }
 }
开发者ID:type1ninja,项目名称:Dwarfnarok,代码行数:15,代码来源:SpellEffect.cs


示例4: EquipEvent

 public override bool EquipEvent(int slotNo)
 {
     if ((slotNo ==9) || (slotNo ==10))
     {
         if (objInt().isEnchanted==true)
         {
             //cast enchantment.
             SpellEffectApplied = GameWorldController.instance.playerUW.PlayerMagic.CastEnchantment(GameWorldController.instance.playerUW.gameObject,null,GetActualSpellIndex(),Magic.SpellRule_TargetSelf);
             if (SpellEffectApplied!=null)
             {
                 SpellEffectApplied.SetPermanent(true);
             }
         }
     }
     return true;
 }
开发者ID:hankmorgan,项目名称:UnderworldExporter,代码行数:16,代码来源:Ring.cs


示例5: SetSpellEffect

    public void SetSpellEffect(Spell newSpell)
    {
        effect = new SpellEffect (newSpell.effect);
        targetsEnemies = newSpell.targetsEnemies;
        AoE = newSpell.AoE;
        rb.useGravity = newSpell.affectedByGravity;
        radius = newSpell.radius;
        deathTimer = newSpell.lifetime;

        GetComponent<SphereCollider> ().radius = newSpell.size;

        if (transform.Find ("Trail") && transform.Find ("Explosion")) {
            transform.Find ("Trail").GetComponent<ParticleSystem> ().startSize *= newSpell.size;
            transform.Find ("Trail").GetComponent<ParticleSystem> ().startColor = newSpell.col;
            transform.Find ("Explosion").GetComponent<ParticleSystem> ().startColor = newSpell.col;
        }
    }
开发者ID:type1ninja,项目名称:Dwarfnarok,代码行数:17,代码来源:ProjectileSpell.cs


示例6: SpellEffect

    //For creating spells from templates -- necessary because when I tried
    //setting ProjectileSpell's effect field equal to the template effect,
    //it was a reference instead of a variable
    public SpellEffect(SpellEffect templateEffect)
    {
        instantDamage = templateEffect.instantDamage;
        instantKnockback = templateEffect.instantKnockback;

        maxHealthMod = templateEffect.maxHealthMod;
        healthRegenMod = templateEffect.healthRegenMod;
        damageReductionMod = templateEffect.damageReductionMod;
        maxManaMod = templateEffect.maxManaMod;
        damageMod = templateEffect.damageMod;
        attackTimeMod = templateEffect.attackTimeMod;
        knockbackMod = templateEffect.knockbackMod;
        speedMod = templateEffect.speedMod;
        jumpSpeedMod = templateEffect.jumpSpeedMod;

        duration = templateEffect.duration;
    }
开发者ID:type1ninja,项目名称:Dwarfnarok,代码行数:20,代码来源:SpellEffect.cs


示例7: EquipEvent

    public override bool EquipEvent(int slotNo)
    {
        if (((slotNo ==7) && (GameWorldController.instance.playerUW.isLefty==true)) || ((slotNo ==8) && (GameWorldController.instance.playerUW.isLefty==false)))//Only on off hand
        {
            UpdateQuality();
            if (objInt().isEnchanted==true)
            {
                int EffectId=GetActualSpellIndex ();
                switch (EffectId)
                {
                case SpellEffect.UW1_Spell_Effect_MinorProtection:
                case SpellEffect.UW1_Spell_Effect_Protection:
                case SpellEffect.UW1_Spell_Effect_AdditionalProtection:
                case SpellEffect.UW1_Spell_Effect_MajorProtection:
                case SpellEffect.UW1_Spell_Effect_GreatProtection:
                case SpellEffect.UW1_Spell_Effect_VeryGreatProtection:
                case SpellEffect.UW1_Spell_Effect_TremendousProtection:
                case SpellEffect.UW1_Spell_Effect_UnsurpassedProtection:
                    ProtectionBonus=EffectId-463;
                    break;
                case SpellEffect.UW1_Spell_Effect_MinorToughness:
                case SpellEffect.UW1_Spell_Effect_Toughness:
                case SpellEffect.UW1_Spell_Effect_AdditionalToughness:
                case SpellEffect.UW1_Spell_Effect_MajorToughness:
                case SpellEffect.UW1_Spell_Effect_GreatToughness:
                case SpellEffect.UW1_Spell_Effect_VeryGreatToughness:
                case SpellEffect.UW1_Spell_Effect_TremendousToughness:
                case SpellEffect.UW1_Spell_Effect_UnsurpassedToughness:
                    ToughnessBonus=EffectId-471;
                    break;

                default:
                    //cast enchantment.
                    SpellEffectApplied = GameWorldController.instance.playerUW.PlayerMagic.CastEnchantment(GameWorldController.instance.playerUW.gameObject,null,GetActualSpellIndex(),Magic.SpellRule_TargetSelf);
                    if (SpellEffectApplied!=null)
                    {
                        SpellEffectApplied.SetPermanent(true);
                    }
                    break;
                }
            }
        }
        return true;
    }
开发者ID:hankmorgan,项目名称:UnderworldExporter,代码行数:44,代码来源:Shield.cs


示例8: AddEffect

    public void AddEffect(SpellEffect newEffect)
    {
        //If you already have the effect, just refresh the timer
        bool hasEffect = false;
        for (int i = 0; i < effects.Count; i++) {
            if (effects [i].Equals (newEffect)) {
                hasEffect = true;
                effects [i].SetDuration (newEffect.duration);
            }
        }
        //If not, add the effect
        if (!hasEffect) {
            effects.Add (newEffect);
        }

        //Do damage regardless
        healthmana.ModHealth (-1 * newEffect.instantDamage);
        //Knockback is applied within the "projectile spell" code
    }
开发者ID:type1ninja,项目名称:Dwarfnarok,代码行数:19,代码来源:CharacterEffects.cs


示例9: DisenchantEffectHandler

		public DisenchantEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
		}
开发者ID:pallmall,项目名称:WCell,代码行数:4,代码来源:Disenchant.cs


示例10: AddExtraAttacksEffectHandler

		public AddExtraAttacksEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:4,代码来源:AddExtraAttacks.cs


示例11: MillingEffectHandler

		public MillingEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
		}
开发者ID:ray2006,项目名称:WCell,代码行数:4,代码来源:Milling.cs


示例12: SummonObjectEffectHandler

		public SummonObjectEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
		}
开发者ID:remixod,项目名称:netServer,代码行数:4,代码来源:SummonObject.cs


示例13: ForgetSpecializationEffectHandler

		public ForgetSpecializationEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
		}
开发者ID:remixod,项目名称:netServer,代码行数:4,代码来源:ForgetSpecialization.cs


示例14: CannibalizeEffectHandler

		public CannibalizeEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
		}
开发者ID:ray2006,项目名称:WCell,代码行数:4,代码来源:Cannibalize.cs


示例15: OnEquip

        public override bool OnEquip(Mobile from)
        {
            if ( base.OnEquip(from) )
            {
                if ( SpellEffectOnEquip && from.Alive && !from.Deleted && m_Effect != SpellEffect.None && SpellCharges > 0 )
                {
                    if ( SpellCastEffect.InvokeEffect( m_Effect, from, from ) )
                    {
                        SpellCharges--;
                        if ( SpellCharges <= 0 )
                        {
                            if ( m_Timer != null )
                            {
                                m_Timer.Stop();
                                m_Timer = null;
                            }

                            m_Effect = SpellEffect.None;
                            from.SendAsciiMessage( "This magic item is out of charges." );
                        }
                    }

                    if ( SpellCharges > 0 && SpellCastEffect.IsRepeatingEffect( m_Effect ) )
                    {
                        if ( m_Timer == null )
                            m_Timer = new CheckTimer( this );
                        if ( !m_Timer.Running )
                            m_Timer.Start();
                    }
                }

                return true;
            }
            else
            {
                return false;
            }
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:38,代码来源:BaseClothing.cs


示例16: DrawCurrentEffects

        public void DrawCurrentEffects()
        {
            if (CurrentEffect == SpellEffect.MagicShieldUp && !MagicShield)
            {
                MagicShield = true;
                Effects.Add(ShieldEffect = new Effect(Libraries.Magic, 3890, 3, 600, this) { Repeat = true });
                CurrentEffect = SpellEffect.None;
            }

            if (CurrentEffect == SpellEffect.ElementalBarrierUp && !ElementalBarrier)
            {
                ElementalBarrier = true;
                Effects.Add(ElementalBarrierEffect = new Effect(Libraries.Magic3, 1890, 16, 3200, this) { Repeat = true });
                CurrentEffect = SpellEffect.None;
            }

            if (ElementEffect > 0 && !HasElements)
            {
                HasElements = true;
                if (ElementEffect == 4)
                    Effects.Add(new ElementsEffect(Libraries.Magic3, 1660, 10, 10 * 100, this, true, 4, ElementOrbMax));
                else
                {
                    if (ElementEffect >= 1)
                        Effects.Add(new ElementsEffect(Libraries.Magic3, 1630, 10, 10 * 100, this, true, 1, ElementOrbMax));
                    if (ElementEffect >= 2)
                        Effects.Add(new ElementsEffect(Libraries.Magic3, 1640, 10, 10 * 100, this, true, 2, ElementOrbMax));
                    if (ElementEffect == 3)
                        Effects.Add(new ElementsEffect(Libraries.Magic3, 1650, 10, 10 * 100, this, true, 3, ElementOrbMax));
                }
                ElementEffect = 0;
            }
        }
开发者ID:nerestaren,项目名称:mir2,代码行数:33,代码来源:PlayerObject.cs


示例17: HealEffectHandler

		public HealEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
		}
开发者ID:WCellFR,项目名称:WCellFR,代码行数:4,代码来源:Heal.cs


示例18: InstantKillEffectHandler

		public InstantKillEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
		}
开发者ID:ray2006,项目名称:WCell,代码行数:4,代码来源:InstantKill.cs


示例19: DismissPetEffectHandler

		public DismissPetEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
		}
开发者ID:remixod,项目名称:netServer,代码行数:4,代码来源:DismissPet.cs


示例20: WMODamage

 public WMODamage(SpellCast cast, SpellEffect effect)
     : base(cast, effect)
 {
 }
开发者ID:ebakkedahl,项目名称:WCell,代码行数:4,代码来源:WMODamage.cs



注:本文中的SpellEffect类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SpellFailedReason类代码示例发布时间:2022-05-24
下一篇:
C# SpellData类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap