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


C# Minion.updateReadyness方法代码示例

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


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

示例1: minionLostCharge

 public void minionLostCharge(Minion m)
 {
     m.charge--;
     m.updateReadyness();
 }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:5,代码来源:Playfield.cs

示例2: minionGetCharge

 public void minionGetCharge(Minion m)
 {
     m.charge++;
     m.updateReadyness();
 }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:5,代码来源:Playfield.cs

示例3: minionGetWindfurry

 public void minionGetWindfurry(Minion m)
 {
     if (m.windfury) return;
     m.windfury = true;
     m.updateReadyness();
 }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:6,代码来源:Playfield.cs

示例4: minionGetControlled

        public void minionGetControlled(Minion m, bool newOwner, bool canAttack)
        {
            List<Minion> newOwnerList = (newOwner) ? this.playerFirst.ownMinions : this.playerSecond.ownMinions;
            List<Minion> oldOwnerList = (newOwner) ? this.playerSecond.ownMinions : this.playerFirst.ownMinions;



            if (newOwnerList.Count >= 7) return;

            this.tempTrigger.ownMinionsChanged = true;
            this.tempTrigger.enemyMininsChanged = true;
            //if (m.taunt && newOwner) this.playerFirst.anzEnemyTaunt--;

            //end buffs/aura
            m.handcard.card.sim_card.onAuraEnds(this, m);
            this.minionGetOrEraseAllAreaBuffs(m, false);

            //remove minion from list
            oldOwnerList.Remove(m);

            //change site (and minion is played in this turn)
            m.playedThisTurn = true;
            m.own = !m.own;

            // add minion to new list + new buffs
            newOwnerList.Add(m);
            m.handcard.card.sim_card.onAuraStarts(this, m);
            this.minionGetOrEraseAllAreaBuffs(m, true);

            if (m.charge >= 1 || canAttack) // minion can attack if its shadowmadnessed (canAttack = true) or it has charge
            {
                this.minionGetCharge(m);
            }
            m.updateReadyness();

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

示例5: createNewMinion

        public Minion createNewMinion(Handmanager.Handcard hc, int zonepos, bool own)
        {
            Minion m = new Minion();
            Handmanager.Handcard handc = new Handmanager.Handcard(hc);
            //Handmanager.Handcard handc = hc; // new Handcard(hc)?
            m.handcard = handc;
            m.own = own;
            m.isHero = false;
            m.entitiyID = hc.entity;
            m.Angr = hc.card.Attack + hc.addattack;
            m.Hp = hc.card.Health + hc.addHp;

            hc.addattack = 0;
            hc.addHp = 0;

            m.maxHp = hc.card.Health;
            m.name = hc.card.name;
            m.playedThisTurn = true;
            m.numAttacksThisTurn = 0;
            m.zonepos = zonepos;
            m.windfury = hc.card.windfury;
            m.taunt = hc.card.tank;
            m.charge = (hc.card.Charge) ? 1 : 0;
            m.divineshild = hc.card.Shield;
            m.poisonous = hc.card.poisionous;
            m.stealth = hc.card.Stealth;

            m.updateReadyness();

            if (m.name == CardDB.cardName.lightspawn)
            {
                m.Angr = m.Hp;
            }


            //trigger on summon effect!
            this.triggerAMinionIsSummoned(m);
            //activate onAura effect
            m.handcard.card.sim_card.onAuraStarts(this, m);
            //buffs minion
            this.minionGetOrEraseAllAreaBuffs(m, true);
            return m;
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:43,代码来源:Playfield.cs

示例6: attackWithWeapon

        //a hero attacks a minion
        public void attackWithWeapon(Minion hero, Minion target, int penality)
        {
            bool own = hero.own;
            if (own)
            {
                this.playerFirst.attacked = true;
                this.playerFirst.evaluatePenality += penality;
            }
            else
            {
                this.playerSecond.attacked = true;
                this.playerSecond.evaluatePenality += penality;
            }
            //this.attacked = true;
            hero.numAttacksThisTurn++;

            //hero will end his readyness
            hero.updateReadyness();

            //heal whether truesilverchampion equipped
            if (own)
            {
                if (this.playerFirst.ownWeaponName == CardDB.cardName.truesilverchampion)
                {
                    int heal = this.getMinionHeal(2, own);//minionheal because it's ignoring spellpower
                    this.minionGetDamageOrHeal(hero, -heal);
                    doDmgTriggers();
                }
            }
            else
            {
                if (this.playerSecond.ownWeaponName == CardDB.cardName.truesilverchampion)
                {
                    int heal = this.getMinionHeal(2, own);
                    this.minionGetDamageOrHeal(hero, -heal);
                    doDmgTriggers();
                }
            }

            if (logging) Helpfunctions.Instance.logg("attck with weapon trgt: " + target.entitiyID);

            // hero attacks enemy----------------------------------------------------------------------------------

            if (target.isHero)// trigger secret and change target if necessary
            {
                int newTarget = this.secretTrigger_CharIsAttacked(hero, target);
                if (newTarget >= 1)
                {
                    //search new target!
                    foreach (Minion m in this.playerFirst.ownMinions)
                    {
                        if (m.entitiyID == newTarget)
                        {
                            target = m;
                            break;
                        }
                    }
                    foreach (Minion m in this.playerSecond.ownMinions)
                    {
                        if (m.entitiyID == newTarget)
                        {
                            target = m;
                            break;
                        }
                    }
                    if (this.playerFirst.ownHero.entitiyID == newTarget) target = this.playerFirst.ownHero;
                    if (this.playerSecond.ownHero.entitiyID == newTarget) target = this.playerSecond.ownHero;
                }

            }
            this.minionAttacksMinion(hero, target);
            //-----------------------------------------------------------------------------------------------------

            //gorehowl is not killed if he attacks minions
            if (own)
            {
                if (playerFirst.ownWeaponName == CardDB.cardName.gorehowl && !target.isHero)
                {
                    this.playerFirst.ownWeaponAttack--;
                    hero.Angr--;
                }
                else
                {
                    this.lowerWeaponDurability(1, true);
                }
            }
            else
            {
                if (playerSecond.ownWeaponName == CardDB.cardName.gorehowl && !target.isHero)
                {
                    this.playerSecond.ownWeaponAttack--;
                    hero.Angr--;
                }
                else
                {
                    this.lowerWeaponDurability(1, false);
                }
            }

//.........这里部分代码省略.........
开发者ID:shuyi3,项目名称:AIPJ,代码行数:101,代码来源:Playfield.cs


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