public override void OnSucceedAttack(BattleDiceBehavior behavior) { base.OnSucceedAttack(behavior); BattleUnitModel target = behavior?.card?.target; if (target == null) { return; } if (behavior.Detail != BehaviourDetail.Penetrate && this._owner.faction == Faction.Player) { return; } int num = 0; if (_owner.faction == Faction.Enemy) { num = 1; } if (_owner.faction == Faction.Player) { num = RandomUtil.Range(1, 2); } target.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Alriune_Debuf, num, this._owner); target.battleCardResultLog?.SetCreatureAbilityEffect("0/Alriune_Stun_Effect", 1f); target.battleCardResultLog?.SetCreatureEffectSound("Creature/Ali_Guard"); }
public override void OnSucceedAttack(BattleDiceBehavior behavior) { base.OnSucceedAttack(behavior); behavior?.card?.target?.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Bleeding, 2, this._owner); behavior?.card?.target?.battleCardResultLog?.SetCreatureAbilityEffect("6/Nosferatu_Emotion_BloodDrain"); behavior?.card?.target?.battleCardResultLog?.SetCreatureEffectSound("Nosferatu_Changed_BloodEat"); }
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 }); } }
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 OnPrintEffect(BattleDiceBehavior behavior) { if (this._hit) { if ((UnityEngine.Object) this._effect != (UnityEngine.Object)null) { this._effect.SetTrigger("Hit"); } --this._hitCount; if (this._hitCount == 0) { this._hit = false; } } if (!this._destroy) { return; } this._destroy = false; if ((UnityEngine.Object) this._effect != (UnityEngine.Object)null) { this._effect.SetTrigger("Disappear"); } this._effect = (CreatureEffect_Anim)null; }
public override void OnSucceedAttack(BattleDiceBehavior behavior) { base.OnSucceedAttack(behavior); if (this._target != behavior.card.target) { this._target = behavior.card.target; this._stack = 1; if (_owner.faction == Faction.Player) { this._target.bufListDetail.AddBuf(new BloodBath_HandDebuf()); } else { this._target.bufListDetail.AddBuf(new BloodBath_HandDebuf_Enemy()); } if (!(this._target.bufListDetail.GetActivatedBufList().Find((x => x is BloodBath_HandDebuf)) is BloodBath_HandDebuf bloodBathHandDebuf)) { return; } bloodBathHandDebuf.OnHit(); } else { ++this._stack; if (this._target.bufListDetail.GetActivatedBufList().Find((x => x is BloodBath_HandDebuf)) is BloodBath_HandDebuf bloodBathHandDebuf) { bloodBathHandDebuf.OnHit(); } if (this._stack < 3) { return; } this.Ability(); } }
public override void BeforeRollDice(BattleDiceBehavior behavior) { behavior.ApplyDiceStatBonus(new DiceStatBonus { power = 3 }); }
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 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 void OnSuccessAttack(BattleDiceBehavior behavior) { if (behavior.card.target.bufListDetail.GetActivatedBufList().Exists((Predicate <BattleUnitBuf>)(x => x is TheChosen))) { behavior.card.target.TakeDamage(RandomUtil.Range(3, 8)); } }
public override void OnSuccessAttack(BattleDiceBehavior behavior) { base.OnSuccessAttack(behavior); int dmg = (int)(behavior.card.target.MaxHp * 0.1); behavior.card.target.TakeDamage(Math.Min(dmg, 10), DamageType.Emotion); }
public override int GetBreakDamageReduction(BattleDiceBehavior behavior) { int brDmg = BrDmg; this._owner.battleCardResultLog?.SetEmotionAbility(true, this._emotionCard, 0, ResultOption.Sign, brDmg); return(-brDmg); }
public override void OnSucceedAttack(BattleDiceBehavior behavior) { base.OnSucceedAttack(behavior); behavior.card.target.battleCardResultLog?.SetNewCreatureAbilityEffect("7_C/FX_IllusionCard_7_C_Bloodmeet", 2f); behavior.card.target.battleCardResultLog?.SetCreatureEffectSound("Creature/WoodMachine_Kill"); this._owner.cardSlotDetail.RecoverPlayPoint(1); }
public override void OnTakeDamageByAttack(BattleDiceBehavior atkDice, int dmg) { int burn1 = Burn; int burn2 = Burn_Enemy; if (atkDice.owner == null) { return; } if (this._owner.faction == Faction.Player) { atkDice?.owner?.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Burn, burn1, this._owner); if (!Prob) { return; } this.trigger = true; } if (this._owner.faction == Faction.Enemy) { if ((double)dmg < (double)this._owner.MaxHp * 0.01) { return; } atkDice?.owner?.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Burn, burn2, this._owner); } this._owner.battleCardResultLog?.SetCreatureAbilityEffect("1/MatchGirl_Ash", 1f); this._owner.battleCardResultLog?.SetCreatureEffectSound("Creature/MatchGirl_Barrier"); }
public override void OnTakeDamageByAttack(BattleDiceBehavior atkDice, int dmg) { if (invincible) { invincible = false; } }
public override void OnTakeDamageByAttack(BattleDiceBehavior atkDice, int dmg) { if (!atkDice.IsParrying()) { atkDice.owner.TakeDamage(Convert.ToInt32(dmg * 0.2f), DamageType.Passive, base.owner); } }
public override void OnTakeDamageByAttack(BattleDiceBehavior atkDice, int dmg) { int burn1 = Burn; int burn2 = Burn_Enemy; int bleed1 = Bleed; int bleed2 = Bleed_Enemy; if (atkDice.owner == null) { return; } if (this._owner.faction == Faction.Player) { atkDice?.owner?.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Burn, burn1, this._owner); atkDice?.owner?.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Bleeding, bleed1, this._owner); } if (this._owner.faction == Faction.Enemy) { if ((double)dmg < (double)this._owner.MaxHp * 0.01) { return; } atkDice?.owner?.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Burn, burn2, this._owner); atkDice?.owner?.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Bleeding, bleed2, this._owner); } atkDice.owner.battleCardResultLog?.SetCreatureEffectSound("Creature/QueenBee_Funga"); this._owner.battleCardResultLog?.SetCreatureAbilityEffect("1/Queenbee_Spore", 2f); }
public override void OnSucceedAttack(BattleDiceBehavior behavior) { if (behavior?.card?.target == null || !behavior.card.target.IsBreakLifeZero() || this.breaked) { return; } foreach (BattleUnitModel alive in BattleObjectManager.instance.GetAliveList(this._owner.faction == Faction.Player? Faction.Player:Faction.Enemy)) { alive.RecoverHP(Heal); } string resPath = ""; switch (behavior.behaviourInCard.MotionDetail) { case MotionDetail.H: resPath = "3/SpiderBud_Spiders_H"; break; case MotionDetail.J: resPath = "3/SpiderBud_Spiders_J"; break; case MotionDetail.Z: resPath = "3/SpiderBud_Spiders_Z"; break; } if (!string.IsNullOrEmpty(resPath)) { this._owner.battleCardResultLog.SetCreatureAbilityEffect(resPath, 1f); } this._owner.battleCardResultLog?.SetCreatureEffectSound("Creature/Spider_gochiDown"); }
public override void BeforeRollDice(BattleDiceBehavior behavior) { base.BeforeRollDice(behavior); behavior.ApplyDiceStatBonus(new DiceStatBonus() { power = stack }); }
public override void BeforeRollDice(BattleDiceBehavior behavior) { base.BeforeRollDice(behavior); if (behavior.card.target.bufListDetail.GetActivatedBufList().Exists((Predicate <BattleUnitBuf>)(x => x is TheChosen))) { this._owner.battleCardResultLog.SetAttackEffectFilter(typeof(ImageFilter_ColorBlend)); } }
public override void OnSucceedAttack(BattleDiceBehavior behavior) { if (this._owner.faction != Faction.Enemy) { return; } behavior.card.target.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Burn, Burn, this._owner); }
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 }); }
public override void OnPrintEffect(BattleDiceBehavior behavior) { if (!(bool)(UnityEngine.Object) this._hitEffect) { return; } this._hitEffect.gameObject.SetActive(true); this._hitEffect = (Battle.CreatureEffect.CreatureEffect)null; }
public override void OnSucceedAttack(BattleDiceBehavior behavior) { base.OnSucceedAttack(behavior); if (behavior.Detail != BehaviourDetail.Hit) { return; } behavior.card.target.TakeBreakDamage(2, DamageType.Attack); }
public override void OnDrawParrying(BattleDiceBehavior behavior) { base.OnDrawParrying(behavior); if (Trigger) { return; } Trigger = true; }
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); } }
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) }); } }