Exemplo n.º 1
0
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     if (this._owner.faction == Faction.Enemy)
     {
         if (!IsAttackDice(behavior.Detail))
         {
             return;
         }
         int enemy = RandomUtil.Range(1, 2);
         this._owner.battleCardResultLog?.SetEmotionAbility(true, this._emotionCard, 0, ResultOption.Sign, enemy);
         behavior.ApplyDiceStatBonus(new DiceStatBonus()
         {
             power = enemy
         });
     }
     if (this._owner.faction == Faction.Player)
     {
         if (behavior.Detail != BehaviourDetail.Hit)
         {
             return;
         }
         int num = RandomUtil.Range(2, 3);
         this._owner.battleCardResultLog?.SetEmotionAbility(true, this._emotionCard, 0, ResultOption.Sign, num);
         behavior.ApplyDiceStatBonus(new DiceStatBonus()
         {
             power = num
         });
     }
 }
Exemplo n.º 2
0
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     behavior.ApplyDiceStatBonus(new DiceStatBonus
     {
         power = 3
     });
 }
        public override void BeforeRollDice(BattleDiceBehavior behavior)
        {
            base.BeforeRollDice(behavior);
            this.trigger = false;
            BattleUnitModel target = behavior?.card?.target;

            if (target == null || !this.IsAttackDice(behavior.Detail))
            {
                return;
            }
            double Ratio = ((double)target.breakDetail.GetDefaultBreakGauge() - (double)target.breakDetail.breakGauge) / (double)target.breakDetail.GetDefaultBreakGauge() - 0.25;

            if (Ratio > 0.25)
            {
                this.trigger = true;
            }
            int dmg = (int)(Ratio * 14);

            if (dmg <= 0)
            {
                dmg = 0;
            }
            if (dmg >= 7)
            {
                dmg = 7;
            }
            behavior.ApplyDiceStatBonus(new DiceStatBonus()
            {
                breakDmg = dmg
            });
            this.trigger = true;
        }
        public override void BeforeGiveDamage(BattleDiceBehavior behavior)
        {
            base.BeforeGiveDamage(behavior);
            if (behavior == null)
            {
                return;
            }
            int dmg = damage;

            this._owner.LoseHp(dmg);
            this._owner.view.Damaged(dmg, BehaviourDetail.None, dmg, this._owner);
            this._owner.battleCardResultLog?.SetNewCreatureAbilityEffect("9_H/FX_IllusionCard_9_H_Martyr", 3f);
            SoundEffectPlayer.PlaySound("Creature/BlueStar_In");
            double ratio     = 1 - (this._owner.hp / this._owner.MaxHp);
            double breakrate = ratio * 10 / 9;

            if (breakrate >= 1)
            {
                breakrate = 1;
            }
            behavior.ApplyDiceStatBonus(new DiceStatBonus()
            {
                breakRate = (int)(breakrate * 100)
            });
            behavior.card.target.battleCardResultLog?.SetNewCreatureAbilityEffect("9_H/FX_IllusionCard_9_H_MartyrExplo", 3f);
        }
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     base.BeforeRollDice(behavior);
     behavior.ApplyDiceStatBonus(new DiceStatBonus()
     {
         power = stack
     });
 }
Exemplo n.º 6
0
 public override void BeforeGiveDamage(BattleDiceBehavior behavior)
 {
     //base.BeforeGiveDamage(behavior);
     behavior.ApplyDiceStatBonus(new DiceStatBonus
     {
         dmgRate = 100
     });
 }
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     base.BeforeRollDice(behavior);
     behavior.ApplyDiceStatBonus(new DiceStatBonus()
     {
         ignorePower = true,
         max         = -5
     });
 }
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     base.BeforeRollDice(behavior);
     behavior.ApplyDiceStatBonus(new DiceStatBonus()
     {
         dmg      = -this.ReduceDmg,
         breakDmg = -this.ReduceBreakDmg
     });
 }
        public override void BeforeGiveDamage(BattleDiceBehavior behavior)
        {
            int num = RandomUtil.Range(3, 5);

            behavior.ApplyDiceStatBonus(new DiceStatBonus()
            {
                dmg = num
            });
        }
Exemplo n.º 10
0
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     flag = RandomUtil.valueForProb < 0.2f;
     if (this.IsAttackDice(behavior.Detail) && !flag)
     {
         behavior.ApplyDiceStatBonus(new DiceStatBonus
         {
             power = 5
         });
     }
     else if (this.isAtk(behavior.Detail))
     {
         behavior.ApplyDiceStatBonus(new DiceStatBonus
         {
             power = -9999
         });
     }
 }
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     if (this.owner.hp <= (this.owner.MaxHp * 0.5f))
     {
         behavior.ApplyDiceStatBonus(new DiceStatBonus
         {
             power = -9999
         });
     }
 }
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     base.BeforeRollDice(behavior);
     if (behavior.card.speedDiceResultValue >= 5)
     {
         behavior.ApplyDiceStatBonus(new DiceStatBonus()
         {
             breakDmg = 1
         });
     }
     if (behavior.Detail != BehaviourDetail.Hit)
     {
         return;
     }
     behavior.ApplyDiceStatBonus(new DiceStatBonus()
     {
         power = 1
     });
 }
Exemplo n.º 13
0
 public override void BeforeGiveDamage(BattleDiceBehavior behavior)
 {
     if (this.owner.bufListDetail.GetActivatedBufList().Exists((BattleUnitBuf x) => x.positiveType == BufPositiveType.Negative))
     {
         behavior.ApplyDiceStatBonus(new DiceStatBonus
         {
             dmg = Convert.ToInt32(behavior.DiceResultValue * 0.5f)
         });
     }
 }
Exemplo n.º 14
0
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     if (IsAttackDice(behavior.Detail))
     {
         behavior.ApplyDiceStatBonus(new DiceStatBonus()
         {
             breakRate = -20 * Level
         });
     }
 }
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     base.BeforeRollDice(behavior);
     this._owner.battleCardResultLog?.SetEmotionAbility(true, this._emotionCard, 0, ResultOption.Sign, 3);
     behavior.ApplyDiceStatBonus(new DiceStatBonus()
     {
         min = -3,
         max = +5
     });
 }
Exemplo n.º 16
0
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     if (behavior.card.card.GetSpec().Ranged == CardRange.Near)
     {
         behavior.ApplyDiceStatBonus(new DiceStatBonus
         {
             power = 1
         });
     }
 }
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     if (behavior.abilityList.Exists((Predicate <DiceCardAbilityBase>)(x => x is DiceCardAbility_yujin)))
     {
         behavior.ApplyDiceStatBonus(new DiceStatBonus()
         {
             min = Level
         });
     }
 }
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     base.BeforeRollDice(behavior);
     if (_owner.faction == Faction.Enemy)
     {
         behavior.ApplyDiceStatBonus(new DiceStatBonus()
         {
             power = 1
         });
     }
 }
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     if (this.owner.bufListDetail.GetActivatedBufList().Exists((BattleUnitBuf x) => x.bufType == KeywordBuf.Burn))
     {
         int stack = this.owner.bufListDetail.GetActivatedBuf(KeywordBuf.Burn).stack;
         behavior.ApplyDiceStatBonus(new DiceStatBonus
         {
             power = Convert.ToInt32(stack / 5)
         });
     }
 }
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     base.BeforeRollDice(behavior);
     if ((this._owner.faction == Faction.Player && Trigger) || (this._owner.faction == Faction.Enemy && TriggerEnemy))
     {
         behavior.ApplyDiceStatBonus(new DiceStatBonus()
         {
             power = Pow
         });
     }
 }
        public override void BeforeRollDice(BattleDiceBehavior behavior)
        {
            base.BeforeRollDice(behavior);
            int power = Pow;

            this._owner.battleCardResultLog?.SetEmotionAbility(true, this._emotionCard, 0, ResultOption.Sign, power);
            behavior.ApplyDiceStatBonus(new DiceStatBonus()
            {
                power = power
            });
        }
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     if (!IsAttackDice(behavior.Detail))
     {
         return;
     }
     behavior.ApplyDiceStatBonus(new DiceStatBonus()
     {
         power = RandomUtil.Range(1, 3)
     });
 }
Exemplo n.º 23
0
 public override void BeforeGiveDamage(BattleDiceBehavior behavior)
 {
     if (!_hungry)
     {
         return;
     }
     behavior.ApplyDiceStatBonus(new DiceStatBonus()
     {
         dmgRate = 30
     });
 }
Exemplo n.º 24
0
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     base.BeforeRollDice(behavior);
     if (behavior.TargetDice == null || !IsAttackDice(behavior.TargetDice.Detail))
     {
         return;
     }
     behavior.ApplyDiceStatBonus(new DiceStatBonus()
     {
         power = RandomUtil.Range(1, 3)
     });
 }
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     base.BeforeRollDice(behavior);
     if (behavior == null)
     {
         return;
     }
     behavior.ApplyDiceStatBonus(new DiceStatBonus()
     {
         dmg = 1 + 2 * level
     });
 }
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     base.BeforeRollDice(behavior);
     if (!this.CheckCondition(behavior))
     {
         return;
     }
     behavior.ApplyDiceStatBonus(new DiceStatBonus()
     {
         max = this.stack
     });
 }
Exemplo n.º 27
0
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     base.BeforeRollDice(behavior);
     if (behavior == null)
     {
         return;
     }
     behavior.ApplyDiceStatBonus(new DiceStatBonus()
     {
         breakDmg = this.BDmg
     });
 }
Exemplo n.º 28
0
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     base.BeforeRollDice(behavior);
     if (behavior.Type != BehaviourType.Standby)
     {
         return;
     }
     behavior.ApplyDiceStatBonus(new DiceStatBonus()
     {
         power = 1
     });
 }
Exemplo n.º 29
0
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     base.BeforeRollDice(behavior);
     if (!this.IsAttackDice(behavior.Detail))
     {
         return;
     }
     behavior.ApplyDiceStatBonus(new DiceStatBonus()
     {
         dmg = AddDmg
     });
 }
Exemplo n.º 30
0
 public override void BeforeRollDice(BattleDiceBehavior behavior)
 {
     base.BeforeRollDice(behavior);
     if (this.IsAttackDice(behavior.Detail))
     {
         behavior.ApplyDiceStatBonus(new DiceStatBonus()
         {
             power = Add
         });
     }
     else
     {
         if (!this.IsDefenseDice(behavior.Detail))
         {
             return;
         }
         behavior.ApplyDiceStatBonus(new DiceStatBonus()
         {
             power = -Minus
         });
     }
 }