Beispiel #1
0
        static AEffect AddEffect()
        {
            Console.Clear();

            string  input;
            AEffect NewEfectA = new AEffect();

            NewEfectA = EfectCreator();

            Console.WriteLine("Duration t/f");
            input = Console.ReadLine();
            if (input.Equals("t"))
            {
                Effect_Duration NewEfect = new Effect_Duration();
                NewEfect.Name        = NewEfectA.Name;
                NewEfect.Description = NewEfectA.Description;
                NewEfect.FixedStats  = NewEfectA.FixedStats;
                NewEfect.MStats      = NewEfectA.MStats;

                Console.WriteLine("Duration");
                input             = Console.ReadLine();
                NewEfect.Duration = Int32.Parse(input);

                return(NewEfect);
            }
            else
            {
                return(NewEfectA);
            }
        }
Beispiel #2
0
 public void AddEffect(AEffect e)
 {
     if (!e)
     {
         return;
     }
     if (!effect)
     {
         foreach (var VARIABLE in immunityList)
         {
             if (VARIABLE == e.type)
             {
                 return;
             }
         }
         effect        = Instantiate(e);
         effect.target = GetComponent <AEnemy>();
         StartCoroutine(Tick());
     }
     else if (e.type == effect.type)
     {
         effect.duration_timer = 0;
         return;
     }
 }
        private void ItemEffect_Click(object sender, RoutedEventArgs e)
        {
            bool removed = false;

            Button ItemSender = (Button)sender;


            AEffect effect = (AEffect)ItemSender.Tag;


            if (SelectedItem.Efects.Count() != 0)
            {
                for (int i = 0; i < SelectedItem.Efects.Count(); i++)
                {
                    if (SelectedItem.Efects[i].Description.Equals(effect.Description))
                    {
                        SelectedItem.Efects.RemoveAt(i);
                        removed = true;
                    }
                }
            }
            if (!removed)
            {
                SelectedItem.Efects.Add((Effect_Duration)ItemSender.Tag);
            }
            fileHandle.SaveData(AllItems);
            PrintEffects(AllEffects, SelectedItem);
        }
Beispiel #4
0
 public static void GetSortValues(AEntity e, out int z, out int type, out int threshold, out int tiebreaker)
 {
     if (e is AEffect)
     {
         AEffect effect = e as AEffect;
         z          = effect.Z;
         type       = 4;
         threshold  = 2;
         tiebreaker = 0;
     }
     else if (e is DeferredEntity)
     {
         DeferredEntity mobile = (DeferredEntity)e;
         z          = mobile.Z;
         type       = 2;
         threshold  = 1;
         tiebreaker = 0;
     }
     else if (e is Mobile)
     {
         Mobile mobile = (Mobile)e;
         z          = mobile.Z;
         type       = mobile.IsSitting ? 0 : 3;
         threshold  = 2;
         tiebreaker = mobile.IsClientEntity ? 0x40000000 : (int)mobile.Serial;
     }
     else if (e is Ground)
     {
         Ground tile = (Ground)e;
         z          = tile.GetView().SortZ;
         type       = 0;
         threshold  = 0;
         tiebreaker = 0;
     }
     else if (e is StaticItem)
     {
         StaticItem item = (StaticItem)e;
         z          = item.Z;
         type       = 1;
         threshold  = (item.ItemData.Height > 0 ? 1 : 0) + (item.ItemData.IsBackground ? 0 : 1);
         tiebreaker = item.SortInfluence;
     }
     else if (e is Item)
     {
         Item item = (Item)e;
         z          = item.Z;
         type       = ((item.ItemID & 0x3fff) == 0x2006) ? 4 : 2; // corpses show on top of mobiles and items.
         threshold  = (item.ItemData.Height > 0 ? 1 : 0) + (item.ItemData.IsBackground ? 0 : 1);
         tiebreaker = item.Serial;
     }
     else
     {
         z          = 0;
         threshold  = 0;
         type       = 0;
         tiebreaker = 0;
     }
 }
Beispiel #5
0
        public Mgc_futejia()
        {
            base.Name        = "伏特加";
            base.cardImage   = Image.FromFile(".\\pic\\Magic_pic\\magic_futejia.png");
            base.Description = "①:本回合接下来自己受到的伤害为0。\r\n\r\n“ ————吨吨吨……嗝” ";
            AEffect effect1 = new AEffect(this, "①:本回合接下来自己受到的伤害为0");

            effect1.effectCheck   = EffectCheck;
            effect1.effect        = Effect;
            effect1.effectBlocked = base.EffectBlocked;
            base.EffectListToShow.Add(effect1);
        }
        protected virtual VstIntPtr AudioMaster(ref AEffect effect, VstInt32 opcode, VstInt32 index, VstIntPtr value, IntPtr ptr, float opt)
        {
            VstIntPtr result = 0;

            switch (opcode)
            {
            case AudioMasterOpcodes.audioMasterVersion: {
                result = Constants.kVstVersion;
                break;
            }
            }
            return(result);
        }
 public Pit_shenpanlvling()
 {
     this.WhenEffectOn_ToBlock = false;
     base.Name        = "审判律令";
     base.cardImage   = Image.FromFile(".\\pic\\Pit_pic\\pit_shenpanlvling.png");
     base.Description = "①:对方的魔法·陷阱卡效果发动时才能发动,那个效果无效并且破坏。" +
                        "\r\n\r\n“ ————吾在此守护,吾在此审判” ";
     effect1               = new AEffect(this, "①:对方的魔法·陷阱卡效果发动时才能发动,那个效果无效并且破坏。");
     effect1.effect        = Effect;
     effect1.effectCheck   = base.EffectCheck;
     effect1.effectBlocked = base.EffectBlocked;
     base.EffectListToShow.Add(effect1);
 }
 public override bool Trigger_WhenEffectOn(AEffect eff)
 {
     Player.MainPlaceInfo.Block_WhenEffectOn(eff);
     if (eff.WhenEffectOn_BeBlocked)
     {
         return(true);
     }
     else
     {
         eff.effect();
         return(false);
     }
 }
Beispiel #9
0
 public IEnumerator Tick()
 {
     effect.EffectInit();
     while (effect.duration_timer <= effect.duration || effect.isInfinite)
     {
         Debug.Log("poison");
         effect.EffectUpdate();
         effect.duration_timer += effect.effect_interval;
         yield return(new WaitForSeconds(effect.effect_interval));
     }
     effect.EffectExit();
     Destroy(effect);
     effect = null;
 }
Beispiel #10
0
 public Token(Type type, string name, Morality morals, AEffect effect, int lifespan, int upPoints, int tokenID, float rarity, string desc)
 {
     children = new List <Token> ();
     Type     = type;
     Name     = name;
     morality = morals;
     UpPoints = upPoints;
     Lifespan = lifespan - 1;
     Desc     = desc;
     Effect   = effect;
     Effect.SetParent(this);
     TokenID  = tokenID;
     Rarity   = rarity;
     Unlocked = false;
 }
 //-------------------------------------
 public override bool Trigger_WhenEffectBlocked(AEffect eff, ICatcher_WhenEffectOn catcher)
 {
     Player.MainPlaceInfo.Block_WhenEffectBlocked(this);
     if (eff.WhenEffectBlocked_BeBlocked)
     {
         eff.WhenEffectBlocked_BeBlocked = false;
         return(true);
     }
     else
     {
         eff.Catcher_WhenEffectOn   = catcher;
         eff.WhenEffectOn_BeBlocked = true;
         EffectBlocked(eff);
         return(false);
     }
 }
Beispiel #12
0
    internal virtual AttackWrapper Compute(AttackInfos a_attackInfos)
    {
        AttackWrapper attack = new AttackWrapper();

        attack.conf        = this;
        attack.attackInfos = a_attackInfos;
        attack.effects     = new List <AEffect>();

        foreach (EffectConf each in onHitEffects)
        {
            AEffect computed = each.Compute(a_attackInfos);
            attack.effects.Add(computed);
        }

        return(attack);
    }
        public bool Catch(AEffect effectToblock)
        {
            WhenEffectOn_ToBlock = false;
            this.EffectToBlock   = effectToblock;
            if (EffectToBlock.Card is MgcPit_Card && EffectToBlock.Card.Player != this.Player)
            {
                MgcPit_Card temp        = (MgcPit_Card)EffectToBlock.Card;
                BlockDialog blockDialog = new BlockDialog(EffectToBlock, this, MainPlaceInfo.TriggerType.Trigger_WhenEffectOn);
                blockDialog.ShowDialog();
                if (WhenEffectOn_ToBlock)
                {
                    this.Player.MainPlaceInfo.Catch_WhenEffectOn.Remove(this.Catch);
                    Trigger_WhenEffectOn(effect1);
                }
            }

            return(WhenEffectOn_ToBlock);
        }
Beispiel #14
0
 public void Update(double frameMS)
 {
     for (int i = 0; i < m_Effects.Count; i++)
     {
         AEffect effect = m_Effects[i];
         effect.Update(frameMS);
         if (effect.IsDisposed)
         {
             m_Effects.RemoveAt(i);
             i--;
             if (effect.ChildrenCount > 0)
             {
                 for (int j = 0; j < effect.Children.Count; j++)
                 {
                     m_Effects.Add(effect.Children[j]);
                 }
             }
         }
     }
 }
Beispiel #15
0
        static AEffect EfectCreator()
        {
            Console.Clear();
            string  input;
            AEffect Efect = new AEffect();

            Console.WriteLine("Name");
            input      = Console.ReadLine();
            Efect.Name = input;

            Console.WriteLine("Description");
            input             = Console.ReadLine();
            Efect.Description = input;

            Console.WriteLine("Stats Fixed");
            Efect.FixedStats = CreateStats();

            Console.WriteLine("Stats multi");
            Efect.MStats = CreateStats();

            return(Efect);
        }
    public void OnEndDrag(PointerEventData eventData)
    {
        //Locked Check
        if (!Locked)
        {
            if (GameManager.BlockSelection != null)
            {
                if (GameManager.instance.ChargeACost(token.Name, token.Effect.getCost()))
                {
                    if (GameManager.BlockSelection.ActiveToken == null || token.Effect.getType() == 1)
                    {
                        if (token.Effect.getType() == 1 && GameManager.BlockSelection.ActiveToken != null)
                        {
                            GameManager.BlockSelection.ActiveToken.ForceDestroy();
                        }

                        worldPos = GameManager.BlockSelection.transform.position + new Vector3(0, (GameManager.BlockSelection.TowerHealth * 0.1f) + 3.5f);
                        Locked   = true;
                        ExpDate  = GameManager.Day + token.Lifespan;
                        GameManager.BlockSelection.ActiveToken  = this;
                        GameManager.BlockSelection.ActiveEffect = Instantiate <AEffect> (token.Effect);
                        activeeffect = GameManager.BlockSelection.ActiveEffect;
                        GameManager.BlockSelection.ActiveEffect.SetParent(token);
                        GameManager.BlockSelection.ActiveEffect.setData(token.Effect.getData());
                        GameManager.BlockSelection.ActiveEffect.OnDown(GameManager.BlockSelection);
                        GameManager.TokenPlayed = true;
                        UpdateDuration();
                        Dragged = true;

                        Debug.Log(GameManager.BlockSelection.ActiveEffect.getOutput().Length);
                        transform.FindChild("Floaters").localPosition = new Vector3(0, 150, 0);
                        foreach (string item in GameManager.BlockSelection.ActiveEffect.getOutput())
                        {
                            GameObject text = Instantiate <GameObject> (GameManager.instance.Floater);
                            text.transform.SetParent(transform.FindChild("Floaters"), false);
                            text.name = "Floater";
                        }
                    }
                    else
                    {
                        GameManager.instance.Alert.text = "<color=red>That block has a token.</color>";
                        GameManager.instance.Alert.CrossFadeAlpha(1f, 0.2f, true);
                    }
                }
                else
                {
                    GameManager.instance.Alert.text = "<color=red>You can not afford that token.</color>";
                    GameManager.instance.Alert.CrossFadeAlpha(1f, 0.2f, true);
                }
            }


            if (!Locked)
            {
                rect.position    = startPos;
                rect.localScale  = Vector3.one;
                cg.alpha         = 1f;
                transform.parent = parent;
            }
            else
            {
                rect.localScale = new Vector3(0.25f, 0.25f, 1f);
                cg.alpha        = 0.75f;
            }

            GameManager.TokenSelection = null;
        }
    }
 protected override void EffectBlocked(AEffect eff)
 {
     Player.MainPlaceInfo.MainFightPlace.textBox3.Text = "【" + eff.Card.Player.Name + "   " + eff.Card.Name + "】效果被【"
                                                         + eff.Catcher_WhenEffectOn.Player.Name + "    " + eff.Catcher_WhenEffectOn.Name + "】无效化";
 }
Beispiel #18
0
 public static void Add(AEffect e)
 {
     m_Effects.Add(e);
 }
Beispiel #19
0
        public static void Add(GraphicEffectPacket packet)
        {
            bool hasHueData   = (packet as GraphicEffectHuedPacket != null);
            bool hasParticles = (packet as GraphicEffectExtendedPacket != null); // we don't yet handle these.

            if (hasParticles)
            {
                Core.Diagnostics.Logger.Warn("Unhandled particles in an effects packet.");
            }

            AEffect effect = null;
            int     hue    = hasHueData ? ((GraphicEffectHuedPacket)packet).Hue : 0;
            int     blend  = hasHueData ? (int)((GraphicEffectHuedPacket)packet).BlendMode : 0;

            switch (packet.EffectType)
            {
            case GraphicEffectType.Moving:
                if (packet.ItemID <= 0)
                {
                    return;
                }
                effect = new MovingEffect(m_Model.Map, packet.SourceSerial, packet.TargetSerial,
                                          packet.SourceX, packet.SourceY, packet.SourceZ,
                                          packet.TargetX, packet.TargetY, packet.TargetZ,
                                          packet.ItemID, hue);
                effect.BlendMode = blend;
                if (packet.DoesExplode)
                {
                    effect.Children.Add(new AnimatedItemEffect(m_Model.Map, packet.TargetSerial,
                                                               packet.TargetX, packet.TargetY, packet.TargetZ,
                                                               0x36cb, hue, 9));
                }
                break;

            case GraphicEffectType.Lightning:
                effect = new LightningEffect(m_Model.Map, packet.SourceSerial,
                                             packet.SourceX, packet.SourceY, packet.SourceZ, hue);
                break;

            case GraphicEffectType.FixedXYZ:
                if (packet.ItemID <= 0)
                {
                    return;
                }
                effect = new AnimatedItemEffect(m_Model.Map,
                                                packet.SourceX, packet.SourceY, packet.SourceZ,
                                                packet.ItemID, hue, packet.Duration);
                effect.BlendMode = blend;
                break;

            case GraphicEffectType.FixedFrom:
                if (packet.ItemID <= 0)
                {
                    return;
                }
                effect = new AnimatedItemEffect(m_Model.Map, packet.SourceSerial,
                                                packet.SourceX, packet.SourceY, packet.SourceZ,
                                                packet.ItemID, hue, packet.Duration);
                effect.BlendMode = blend;
                break;

            case GraphicEffectType.ScreenFade:
                Core.Diagnostics.Logger.Warn("Unhandled screen fade effect.");
                break;

            default:
                Core.Diagnostics.Logger.Warn("Unhandled effect.");
                return;
            }

            if (effect != null)
            {
                Add(effect);
            }
        }
    void initTokens()
    {
        AEffect nEffect = ScriptableObject.CreateInstance <PopulationIncreaseEffect>();

        nEffect.setData(new float[] { 15f, 0.01f, 0.02f });
        Token child = new Token(Type.Buisness, "Tourism Board", Morality.Neutral, nEffect, 10, 10, 0, 1f, "");

        tokens.Add(child.Name, child);

        nEffect = ScriptableObject.CreateInstance <LocalTaxesIncreaseEffect>();
        nEffect.setData(new float[] { 0.02f, 0.04f, 0.01f });
        child = new Token(Type.Buisness, "Tax Office", Morality.Neutral, nEffect, 10, 10, 1, 1f, "");
        tokens.Add(child.Name, child);

        //PopIncreaseGroup
        nEffect = ScriptableObject.CreateInstance <PopulationIncreaseEffect>();
        nEffect.setData(new float[] { 50f, 0.02f, 0.04f });
        child = new Token(Type.Buisness, "Bus Station", Morality.Neutral, nEffect, 10, 10, 2, 1f, "");
        tokens.Add(child.Name, child);

        nEffect = ScriptableObject.CreateInstance <PopulationIncreaseEffect>();
        nEffect.setData(new float[] { 200f, 0.04f, 0.08f });
        child = new Token(Type.Buisness, "Railway", Morality.Neutral, nEffect, 10, 10, 2, 1f, "");
        tokens.Add(child.Name, child);

        nEffect = ScriptableObject.CreateInstance <PopulationIncreaseEffect>();
        nEffect.setData(new float[] { 1000f, 0.08f, 0.16f });
        child = new Token(Type.Buisness, "Airport", Morality.Neutral, nEffect, 10, 10, 2, 1f, "");
        tokens.Add(child.Name, child);

        //TaxesIncreaseGroup
        nEffect = ScriptableObject.CreateInstance <LocalTaxesIncreaseEffect>();
        nEffect.setData(new float[] { 0.04f, 0.08f, 0.02f });
        child = new Token(Type.Buisness, "The Printing Press", Morality.Neutral, nEffect, 20, 10, 2, 1f, "");
        tokens.Add(child.Name, child);

        nEffect = ScriptableObject.CreateInstance <AddCardsEffect>();
        nEffect.setData(new float[] { 10f, 2f });
        child = new Token(Type.Buisness, "General Store", Morality.Neutral, nEffect, 40, 10, 1, 0.1f, "");
        tokens.Add(child.Name, child);

        nEffect = ScriptableObject.CreateInstance <IncreasePopEffect>();
        nEffect.setData(new float[] { 10f, 2f, 1f });
        child = new Token(Type.Buisness, "Farms", Morality.Neutral, nEffect, 25, 10, 1, 0.75f, "");
        tokens.Add(child.Name, child);

        /*nEffect = ScriptableObject.CreateInstance<IncreasePopEffect>();
         * nEffect.setData (new float[]{0f, 80f, 1f});
         * child = new Token (Type.Buisness, "SuperBOON", Morality.Neutral, nEffect, 1, 0, 1, 1f, "");
         * tokens.Add (child.Name, child);
         * child.Unlocked = true;*/

        nEffect = ScriptableObject.CreateInstance <IncreaseMoney>();
        nEffect.setData(new float[] { 200f });
        child = new Token(Type.Buisness, "A Front", Morality.Neutral, nEffect, 30, 10, 1, 0.75f, "");
        tokens.Add(child.Name, child);

        nEffect = ScriptableObject.CreateInstance <ClearTilesEffect>();
        nEffect.setData(new float[] { 5f, 1f });
        child = new Token(Type.Buisness, "A Park", Morality.Neutral, nEffect, 2, 10, 1, 0.75f, "");
        tokens.Add(child.Name, child);

        //Sciences

        nEffect = ScriptableObject.CreateInstance <BasicScienceIncreaserEffect>();
        nEffect.setData(new float[] { 1f });
        child = new Token(Type.Science, "Writing", Morality.Neutral, nEffect, 10, 0, 1, 1f, "");
        tokens.Add(child.Name, child);
        child.Unlocked = true;

        nEffect = ScriptableObject.CreateInstance <BasicScienceIncreaserEffect>();
        nEffect.setData(new float[] { 1f });
        child = new Token(Type.Science, "The Wheel", Morality.Neutral, nEffect, 10, 0, 1, 1f, "");
        tokens.Add(child.Name, child);
        child.Unlocked = true;

        nEffect = ScriptableObject.CreateInstance <BasicScienceIncreaserEffect>();
        nEffect.setData(new float[] { 1f });
        child = new Token(Type.Science, "Metalworking", Morality.Neutral, nEffect, 10, 0, 1, 1f, "");
        tokens.Add(child.Name, child);
        child.Unlocked = true;

        nEffect = ScriptableObject.CreateInstance <BasicScienceIncreaserEffect>();
        nEffect.setData(new float[] { 1f });
        child = new Token(Type.Science, "Horse & Cart", Morality.Neutral, nEffect, 40, 10, 1, 1f, "");
        tokens.Add(child.Name, child);

        nEffect = ScriptableObject.CreateInstance <BasicScienceIncreaserEffect>();
        nEffect.setData(new float[] { 1f });
        child = new Token(Type.Science, "Engine", Morality.Neutral, nEffect, 40, 10, 1, 1f, "");
        tokens.Add(child.Name, child);

        nEffect = ScriptableObject.CreateInstance <BasicScienceIncreaserEffect>();
        nEffect.setData(new float[] { 1f });
        child = new Token(Type.Science, "Flight", Morality.Neutral, nEffect, 40, 10, 1, 1f, "");
        tokens.Add(child.Name, child);

        nEffect = ScriptableObject.CreateInstance <BasicScienceIncreaserEffect>();
        nEffect.setData(new float[] { 1f });
        child = new Token(Type.Science, "Farming", Morality.Neutral, nEffect, 40, 10, 1, 1f, "");
        tokens.Add(child.Name, child);
        child.Unlocked = true;

        nEffect = ScriptableObject.CreateInstance <BasicScienceIncreaserEffect>();
        nEffect.setData(new float[] { 1f });
        child = new Token(Type.Science, "Abacus", Morality.Neutral, nEffect, 40, 10, 1, 1f, "");
        tokens.Add(child.Name, child);
        child.Unlocked = true;

        nEffect = ScriptableObject.CreateInstance <BasicScienceIncreaserEffect>();
        nEffect.setData(new float[] { 1f });
        child = new Token(Type.Science, "Archeology", Morality.Neutral, nEffect, 40, 10, 1, 1f, "");
        tokens.Add(child.Name, child);
        child.Unlocked = true;

        //Inheritance
        Token par;

        if (tokens.TryGetValue("Horse & Cart", out child) && tokens.TryGetValue("The Wheel", out par))
        {
            child.setParent(par);
        }
        else
        {
            Debug.Log("ERR");
        }
        if (tokens.TryGetValue("Engine", out child) && tokens.TryGetValue("Horse & Cart", out par))
        {
            child.setParent(par);
        }
        else
        {
            Debug.Log("ERR");
        }
        if (tokens.TryGetValue("Flight", out child) && tokens.TryGetValue("Engine", out par))
        {
            child.setParent(par);
        }
        else
        {
            Debug.Log("ERR");
        }
        if (tokens.TryGetValue("Tax Office", out child) && tokens.TryGetValue("Writing", out par))
        {
            child.setParent(par);
        }
        else
        {
            Debug.Log("ERR");
        }
        if (tokens.TryGetValue("Tourism Board", out child) && tokens.TryGetValue("The Wheel", out par))
        {
            child.setParent(par);
        }
        else
        {
            Debug.Log("ERR");
        }
        if (tokens.TryGetValue("General Store", out child) && tokens.TryGetValue("Metalworking", out par))
        {
            child.setParent(par);
        }
        else
        {
            Debug.Log("ERR");
        }
        if (tokens.TryGetValue("Bus Station", out child) && tokens.TryGetValue("Horse & Cart", out par))
        {
            child.setParent(par);
        }
        else
        {
            Debug.Log("ERR");
        }
        if (tokens.TryGetValue("Railway", out child) && tokens.TryGetValue("Engine", out par))
        {
            child.setParent(par);
        }
        else
        {
            Debug.Log("ERR");
        }
        if (tokens.TryGetValue("Farms", out child) && tokens.TryGetValue("Farming", out par))
        {
            child.setParent(par);
        }
        else
        {
            Debug.Log("ERR");
        }
        if (tokens.TryGetValue("Airport", out child) && tokens.TryGetValue("Flight", out par))
        {
            child.setParent(par);
        }
        else
        {
            Debug.Log("ERR");
        }
        if (tokens.TryGetValue("A Front", out child) && tokens.TryGetValue("Abacus", out par))
        {
            child.setParent(par);
        }
        else
        {
            Debug.Log("ERR");
        }
        if (tokens.TryGetValue("A Park", out child) && tokens.TryGetValue("Archeology", out par))
        {
            child.setParent(par);
        }
        else
        {
            Debug.Log("ERR");
        }
    }
 public static void GetSortValues(AEntity e, out int z, out int threshold, out int type, out int tiebreaker)
 {
     if (e is AEffect)
     {
         AEffect effect = e as AEffect;
         z          = effect.Z;
         threshold  = 2;
         type       = 4;
         tiebreaker = 0;
     }
     else if (e is DeferredEntity)
     {
         DeferredEntity mobile = (DeferredEntity)e;
         z          = mobile.Z;
         threshold  = 1;
         type       = 2;
         tiebreaker = 0;
     }
     else if (e is Mobile)
     {
         Mobile mobile = (Mobile)e;
         z         = mobile.Z;
         threshold = 2;
         type      = 3;
         if (mobile.IsClientEntity)
         {
             tiebreaker = 0x40000000;
         }
         else
         {
             tiebreaker = mobile.Serial;
         }
     }
     else if (e is Ground)
     {
         Ground tile = (Ground)e;
         z          = tile.GetView().SortZ;
         threshold  = 0;
         type       = 0;
         tiebreaker = 0;
     }
     else if (e is StaticItem)
     {
         int        sort;
         StaticItem item = (StaticItem)e;
         z = item.Z;
         if (item.ItemData.IsBackground)
         {
             sort = 0;
         }
         else
         {
             sort = 1;
         }
         threshold  = (item.ItemData.Height == 0) ? sort : (sort + 1);
         type       = 1;
         tiebreaker = item.SortInfluence;
     }
     else if (e is Item) // this was previously dynamicitem - I think Kirros and I use the word 'Dynamic' for different purposes.
     {
         int  sort;
         Item item = (Item)e;
         z = item.Z;
         if (item.ItemData.IsBackground)
         {
             sort = 0;
         }
         else
         {
             sort = 1;
         }
         threshold  = (item.ItemData.Height == 0) ? sort : (sort + 1);
         type       = ((item.ItemID & 0x3fff) == 0x2006) ? 4 : 2; // is corpse? Corpse inherits from Container, which inherits from Item, so this works here.
         tiebreaker = item.Serial;
     }
     else
     {
         z          = 0;
         threshold  = 0;
         type       = 0;
         tiebreaker = 0;
     }
 }
Beispiel #22
0
 /// <summary>
 /// 发动效果时
 /// </summary>
 public virtual bool Trigger_WhenEffectOn(AEffect eff)
 {
     return(false);
 }
Beispiel #23
0
 /// <summary>
 /// 效果被抹除打断时
 /// </summary>
 public virtual bool Trigger_WhenEffectBlocked(AEffect eff, ICatcher_WhenEffectOn catcher)
 {
     return(false);
 }
Beispiel #24
0
 protected virtual void EffectBlocked(AEffect eff)
 {
 }
Beispiel #25
0
 public void Add(AEffect e)
 {
     _effects.Add(e);
 }