当前位置: 首页>>代码示例>>C#>>正文


C# Playfield.minionGetControlled方法代码示例

本文整理汇总了C#中HRSim.Playfield.minionGetControlled方法的典型用法代码示例。如果您正苦于以下问题:C# Playfield.minionGetControlled方法的具体用法?C# Playfield.minionGetControlled怎么用?C# Playfield.minionGetControlled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HRSim.Playfield的用法示例。


在下文中一共展示了Playfield.minionGetControlled方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: getBattlecryEffect

        //todo list
//    kampfschrei:/ falls euer gegner mind. 4 diener hat, übernehmt zufällig die kontrolle über einen davon.
		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            if (own.own)
            {
                if (p.playerSecond.ownMinions.Count >= 4)
                {
                    List<Minion> temp = new List<Minion>(p.playerSecond.ownMinions);
                    temp.Sort((a, b) => a.Angr.CompareTo(b.Angr));//we take the weekest
                    Minion targett;
                    targett = temp[0];
                    if (targett.taunt && temp.Count >= 2 && !temp[1].taunt) targett = temp[1];
                    p.minionGetControlled(targett, true, false);

                }
            }
            else
            {
                if (p.playerFirst.ownMinions.Count >= 4)
                {
                    List<Minion> temp = new List<Minion>(p.playerFirst.ownMinions);
                    temp.Sort((a, b) => a.Angr.CompareTo(b.Angr));//we take the weekest
                    Minion targett;
                    targett = temp[0];
                    if (targett.taunt && temp.Count >= 2 && !temp[1].taunt) targett = temp[1];
                    p.minionGetControlled(targett, false, false);

                }
            }
		}
开发者ID:shuyi3,项目名称:AIPJ,代码行数:31,代码来源:Sim_EX1_085.cs

示例2: onDeathrattle

        //todo make it better
//    todesröcheln:/ übernehmt die kontrolle über einen zufälligen feindlichen diener.
        public override void onDeathrattle(Playfield p, Minion m)
        {
                List<Minion> tmp = (m.own) ? p.playerSecond.ownMinions : p.playerFirst.ownMinions;
                if (tmp.Count >= 1)
                {
                    Minion target = null;
                    int value = 10000;
                    bool found = false;

                    //search smallest minion:
                    foreach (Minion mnn in tmp)
                    {
                        if (mnn.Hp < value && mnn.Hp >= 1)
                        {
                            target = mnn;
                            value = target.Hp;
                            found = true;
                        }
                    }
                    if (found) p.minionGetControlled(target, m.own, false);
                }

            
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:26,代码来源:Sim_EX1_016.cs

示例3: onCardPlay

//    übernehmt die kontrolle über einen feindlichen diener.
		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            p.minionGetControlled(target, ownplay, false);
		}
开发者ID:shuyi3,项目名称:AIPJ,代码行数:5,代码来源:Sim_CS1_113.cs

示例4: getBattlecryEffect

//    kampfschrei:/ übernehmt die kontrolle über einen feindlichen diener mit max. 2 angriff.
		public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
		{
            if (target != null) p.minionGetControlled(target, own.own, false);
		}
开发者ID:shuyi3,项目名称:AIPJ,代码行数:5,代码来源:Sim_EX1_091.cs

示例5: becomeSilence

        public void becomeSilence(Playfield p)
        {

            if (own) p.playerFirst.spellpower -= spellpower;
            else
            {
                p.playerSecond.spellpower -= spellpower;
                //if (this.taunt) p.anzEnemyTaunt--;
            }
            spellpower = 0;

            p.minionGetOrEraseAllAreaBuffs(this, false);
            //buffs
            ancestralspirit = 0;
            destroyOnOwnTurnStart = false;
            destroyOnEnemyTurnStart = false;
            destroyOnOwnTurnEnd = false;
            destroyOnEnemyTurnEnd = false;
            concedal = false;
            souloftheforest = 0;
            ownBlessingOfWisdom = 0;
            enemyBlessingOfWisdom = 0;

            cantBeTargetedBySpellsOrHeroPowers = false;

            charge = 0;
            taunt = false;
            divineshild = false;
            windfury = false;
            frozen = false;
            stealth = false;
            immune = false;
            poisonous = false;
            cantLowerHPbelowONE = false;
            

            //delete enrage (if minion is silenced the first time)
            if (wounded && handcard.card.Enrage && !silenced)
            {
                handcard.card.sim_card.onEnrageStop(p, this);
            }

            //reset attack
            Angr = handcard.card.Attack;
            tempAttack = 0;//we dont toutch the adjacent buffs!


            //reset hp and heal it
            if (maxHp < handcard.card.Health)//minion has lower maxHp as his card -> heal his hp
            {
                Hp += handcard.card.Health - maxHp; //heal minion
            }
            maxHp = handcard.card.Health;
            if (Hp > maxHp) Hp = maxHp;

            if (!silenced)//minion WAS not silenced, deactivate his aura
            {
                handcard.card.sim_card.onAuraEnds(p, this);
            }

            silenced = true;
            this.updateReadyness();
            p.minionGetOrEraseAllAreaBuffs(this, true);
            if (own)
            {
                p.tempTrigger.ownMinionsChanged = true;
            }
            else
            {
                p.tempTrigger.enemyMininsChanged = true;
            }
            if (this.shadowmadnessed)
            {
                this.shadowmadnessed = false;
                p.shadowmadnessed--;
                p.minionGetControlled(this, !own, false);
            }
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:78,代码来源:Minion.cs


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