public override void OnSucceedAttack(BattleDiceBehavior behavior)
        {
            //base.OnSucceedAttack(behavior);
            if (behavior.card.target.Book.GetResistHP(behavior.Detail) == AtkResist.Resist || behavior.card.target.Book.GetResistHP(behavior.Detail) == AtkResist.Immune)
            {
                behavior.card.target.TakeDamage(behavior.DiceResultValue, DamageType.Passive, this.owner);
                behavior.card.target.TakeBreakDamage(behavior.DiceResultValue, DamageType.Passive, this.owner, AtkResist.Normal);
            }
            BattleUnitModel target = behavior.card.target;
            BehaviourDetail def    = BehaviourDetail.Slash;

            if (target.Book.GetResistHP(def) > target.Book.GetResistHP(BehaviourDetail.Penetrate))
            {
                def = BehaviourDetail.Penetrate;
            }
            if (target.Book.GetResistHP(def) > target.Book.GetResistHP(BehaviourDetail.Hit))
            {
                def = BehaviourDetail.Hit;
            }

            if (behavior.Detail == def)
            {
                target.TakeDamage(behavior.DiceResultValue, DamageType.Passive, this.owner);
                target.TakeBreakDamage(behavior.DiceResultValue, DamageType.Passive, this.owner, target.Book.GetResistBP(behavior.Detail));
            }
        }
 public override AtkResist GetResistBP(AtkResist origin, BehaviourDetail detail)
 {
     if (detail == BehaviourDetail.Slash)
     {
         return(AtkResist.Normal);
     }
     return(base.GetResistHP(origin, detail));
 }
 public override AtkResist GetResistBP(AtkResist origin, BehaviourDetail detail)
 {
     if (detail == BehaviourDetail.Penetrate)
     {
         return(AtkResist.Endure);
     }
     return(base.GetResistHP(origin, detail));
 }
 public override void OnSelectEmotion()
 {
     dict = new Dictionary <BehaviourDetail, int>()
     {
         { BehaviourDetail.Slash, 0 }, { BehaviourDetail.Hit, 0 }, { BehaviourDetail.Penetrate, 0 }
     };
     atk = BehaviourDetail.None;
 }
示例#5
0
 public override AtkResist GetResistHP(AtkResist origin, BehaviourDetail detail)
 {
     if (detail == immuneDetail)
     {
         return(AtkResist.Immune);
     }
     return(base.GetResistHP(origin, detail));
 }
 public override AtkResist GetResistBP(AtkResist origin, BehaviourDetail detail)
 {
     if (this._owner.faction == Faction.Player && this.count < 3)
     {
         return(AtkResist.Immune);
     }
     return(base.GetResistBP(origin, detail));
 }
 public override AtkResist GetResistHP(AtkResist origin, BehaviourDetail detail)
 {
     if (base.GetResistHP(origin, detail) == AtkResist.Endure)
     {
         return(AtkResist.Vulnerable);
     }
     return(base.GetResistHP(origin, detail) == AtkResist.Resist ? AtkResist.Weak : base.GetResistHP(origin, detail));
 }
        public override void OnRoundStart()
        {
            base.OnRoundEnd();
            int num = dict[BehaviourDetail.Slash];
            List <BehaviourDetail> Dmg = new List <BehaviourDetail>()
            {
                BehaviourDetail.Slash
            };

            if (dict[BehaviourDetail.Hit] > num)
            {
                Dmg.Clear();
                Dmg.Add(BehaviourDetail.Hit);
                num = dict[BehaviourDetail.Hit];
            }
            else if (dict[BehaviourDetail.Hit] == num)
            {
                Dmg.Add(BehaviourDetail.Hit);
            }
            if (dict[BehaviourDetail.Penetrate] > num)
            {
                Dmg.Clear();
                Dmg.Add(BehaviourDetail.Penetrate);
                num = dict[BehaviourDetail.Penetrate];
            }
            else if (dict[BehaviourDetail.Penetrate] == num)
            {
                Dmg.Add(BehaviourDetail.Penetrate);
            }
            switch (RandomUtil.SelectOne <BehaviourDetail>(Dmg))
            {
            case BehaviourDetail.Slash:
                this._owner.bufListDetail.AddBuf(new SlashProt(this._emotionCard));
                break;

            case BehaviourDetail.Hit:
                this._owner.bufListDetail.AddBuf(new HitProt(this._emotionCard));
                break;

            case BehaviourDetail.Penetrate:
                this._owner.bufListDetail.AddBuf(new PenetrateProt(this._emotionCard));
                break;
            }
            dict = new Dictionary <BehaviourDetail, int>()
            {
                { BehaviourDetail.Slash, 0 }, { BehaviourDetail.Hit, 0 }, { BehaviourDetail.Penetrate, 0 }
            };
            atk = BehaviourDetail.None;
        }
            public override AtkResist GetResistBP(AtkResist origin, BehaviourDetail detail)
            {
                switch (level)
                {
                case 1:
                    return(AtkResist.Vulnerable);

                case 2:
                    return(AtkResist.Normal);

                case 3:
                    return(AtkResist.Endure);
                }
                return(AtkResist.Weak);
            }
示例#10
0
 /*public override void ChangeDiceResult(BattleDiceBehavior behavior, ref int diceResult)
  * {
  *  if (flag)
  *  {
  *      if (this.owner.battleCardResultLog!=null)
  *      {
  *          this.owner.battleCardResultLog.SetPassiveAbility(this);
  *      }
  *      diceResult = 1;
  *  }
  * }*/
 protected bool isAtk(BehaviourDetail diceDetail)
 {
     return(diceDetail == BehaviourDetail.Slash || diceDetail == BehaviourDetail.Penetrate || diceDetail == BehaviourDetail.Hit);
 }
 public override void OnTakeDamageByAttack(BattleDiceBehavior atkDice, int dmg)
 {
     atk        = atkDice.Detail;
     dict[atk] += dmg;
     base.OnTakeDamageByAttack(atkDice, dmg);
 }
 public override int GetBreakDamageReduction(BehaviourDetail behaviourDetail)
 {
     return(-AddDmg);
 }
示例#13
0
 public override void OnRoundStart()
 {
     base.OnRoundStart();
     immuneDetail = RandomUtil.SelectOne <BehaviourDetail>(BehaviourDetail.Slash, BehaviourDetail.Penetrate, BehaviourDetail.Hit);
 }
 public override int GetBreakDamageReduction(BehaviourDetail behaviourDetail) => - 2;