private void GiveBook() { // On vérifie que le questeur à réussi à tuer avec HonorableExecution if (QuestPlayer != null && HonorableExecution.GetSwingBonus(QuestPlayer) > 0) { QuestPlayer.Backpack.AddItem(new CounterAttackScroll()); } QuestPlayer = null; }
public virtual bool Validate(Mobile from) { if (!from.IsPlayer) { return(true); } if (HonorableExecution.IsUnderPenalty(from) || AnimalForm.UnderTransformation(from)) { from.SendLocalizedMessage(1063218); // You cannot use that ability in this form. return(false); } return(CheckSkills(from) && CheckMana(from, false)); }
public virtual bool Validate(Mobile from) { if (!from.Player) { return(true); } if (HonorableExecution.IsUnderPenalty(from)) { from.SendLocalizedMessage(1063024); // You cannot perform this special move right now. return(false); } if (AnimalForm.UnderTransformation(from)) { from.SendLocalizedMessage(1063024); // You cannot perform this special move right now. return(false); } return(CheckSkills(from) && CheckMana(from, false)); }
public override int GetAttackSpeedBonus() { int bonus = base.GetAttackSpeedBonus(); if (Core.SE) { /* * This is likely true for Core.AOS as well... both guides report the same * formula, and both are wrong. * The old formula left in for AOS for legacy & because we aren't quite 100% * Sure that AOS has THIS formula */ bonus += AosAttributes.GetValue(this, AosAttribute.WeaponSpeed); if (Spells.Chivalry.DivineFurySpell.UnderEffect(this)) { bonus += 10; } // Bonus granted by successful use of Honorable Execution. bonus += HonorableExecution.GetSwingBonus(this); if (DualWield.Registry.Contains(this)) { bonus += ((DualWield.DualWieldTimer)DualWield.Registry[this]).BonusSwingSpeed; } if (Feint.Registry.Contains(this)) { bonus -= ((Feint.FeintTimer)Feint.Registry[this]).SwingSpeedReduction; } TransformContext context = TransformationSpellHelper.GetContext(this); if (context != null && context.Spell is ReaperFormSpell reaperSpell) { bonus += reaperSpell.SwingSpeedBonus; } int discordanceEffect = 0; // Discordance gives a malus of -0/-28% to swing speed. if (SkillHandlers.Discordance.GetEffect(this, ref discordanceEffect)) { bonus -= discordanceEffect; } if (EssenceOfWindSpell.IsDebuffed(this)) { bonus -= EssenceOfWindSpell.GetSSIMalus(this); } if (bonus > 60) { bonus = 60; } } else if (Core.AOS) { bonus += AosAttributes.GetValue(this, AosAttribute.WeaponSpeed); if (Spells.Chivalry.DivineFurySpell.UnderEffect(this)) { bonus += 10; } int discordanceEffect = 0; // Discordance gives a malus of -0/-28% to swing speed. if (SkillHandlers.Discordance.GetEffect(this, ref discordanceEffect)) { bonus -= discordanceEffect; } } return(bonus); }
public virtual bool Validate(Mobile from) { if (!from.Player) { return(true); } NetState state = from.NetState; if (state == null) { return(false); } if (RequiresSE && !state.SupportsExpansion(Expansion.SE)) { from.SendLocalizedMessage(1063456); // You must upgrade to Samurai Empire in order to use that ability. return(false); } if (HonorableExecution.IsUnderPenalty(from) || AnimalForm.UnderTransformation(from)) { from.SendLocalizedMessage(1063024); // You cannot perform this special move right now. return(false); } if (Core.ML && from.Spell != null) { from.SendLocalizedMessage(1063024); // You cannot perform this special move right now. return(false); } string option = null; if (this is ArmorIgnore) { option = "Armor Ignore"; } else if (this is BleedAttack) { option = "Bleed Attack"; } else if (this is ConcussionBlow) { option = "Concussion Blow"; } else if (this is CrushingBlow) { option = "Crushing Blow"; } else if (this is Disarm) { option = "Disarm"; } else if (this is Dismount) { option = "Dismount"; } else if (this is DoubleStrike) { option = "Double Strike"; } else if (this is InfectiousStrike) { option = "Infectious Strike"; } else if (this is MortalStrike) { option = "Mortal Strike"; } else if (this is MovingShot) { option = "Moving Shot"; } else if (this is ParalyzingBlow) { option = "Paralyzing Blow"; } else if (this is ShadowStrike) { option = "Shadow Strike"; } else if (this is WhirlwindAttack) { option = "Whirlwind Attack"; } else if (this is RidingSwipe) { option = "Riding Swipe"; } else if (this is FrenziedWhirlwind) { option = "Frenzied Whirlwind"; } else if (this is Block) { option = "Block"; } else if (this is DefenseMastery) { option = "Defense Mastery"; } else if (this is NerveStrike) { option = "Nerve Strike"; } else if (this is TalonStrike) { option = "Talon Strike"; } else if (this is Feint) { option = "Feint"; } else if (this is DualWield) { option = "Dual Wield"; } else if (this is DoubleShot) { option = "Double Shot"; } else if (this is ArmorPierce) { option = "Armor Pierce"; } if (option != null && !DuelContext.AllowSpecialAbility(from, option, true)) { return(false); } return(CheckSkills(from) && CheckMana(from, false)); }
public virtual bool Validate(Mobile from) { if (!from.Player) { return(true); } if (HonorableExecution.IsUnderPenalty(from)) { from.SendLocalizedMessage(1063024); // You cannot perform this special move right now. return(false); } if (AnimalForm.UnderTransformation(from)) { from.SendLocalizedMessage(1063024); // You cannot perform this special move right now. return(false); } string option = null; if (this is Backstab) { option = "Backstab"; } else if (this is DeathStrike) { option = "Death Strike"; } else if (this is FocusAttack) { option = "Focus Attack"; } else if (this is KiAttack) { option = "Ki Attack"; } else if (this is SurpriseAttack) { option = "Surprise Attack"; } else if (this is HonorableExecution) { option = "Honorable Execution"; } else if (this is LightningStrike) { option = "Lightning Strike"; } else if (this is MomentumStrike) { option = "Momentum Strike"; } if (option != null && !DuelContext.AllowSpecialMove(from, option, this)) { return(false); } return(CheckSkills(from) && CheckMana(from, false)); }
public override bool CheckCast() { if (!base.CheckCast()) { return(false); } if (!SamuraiSpell.CheckExpansion(Caster)) { Caster.SendLocalizedMessage(1063456); // You must upgrade to Samurai Empire in order to use that ability. return(false); } if (Caster.Skills[SkillName.Ninjitsu].Value < RequiredSkill) { string args = String.Format("{0}\t{1}\t ", RequiredSkill.ToString("F1"), CastSkill.ToString()); Caster.SendLocalizedMessage(1063013, args); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return(false); } else if (Caster.Mana < ScaleMana(RequiredMana)) { Caster.SendLocalizedMessage(1060174, RequiredMana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability. return(false); } if (FocusAttack.UnderEffect(Caster) || DeathStrike.UnderEffect(Caster) || SurpriseAttack.UnderEffect(Caster) || Backstab.UnderEffect(Caster) || KiAttack.UnderEffect(Caster)) { return(true); } if (AnimalForm.UnderEffect(Caster)) { if (this is FocusAttack || this is DeathStrike || this is KiAttack || this is SurpriseAttack || this is Backstab) { Caster.SendLocalizedMessage(1063024); // You cannot perform this special move right now. return(false); } } WeaponAbility ability = WeaponAbility.GetCurrentAbility(Caster); if (ability != null) { WeaponAbility.ClearCurrentAbility(Caster); } if (HonorableExecution.UnderEffect(Caster)) { Caster.Send(new SetNewSpell(0x91, 0)); HonorableExecution.m_Table.Remove(Caster); } if (LightningStrike.UnderEffect(Caster)) { Caster.Send(new SetNewSpell(0x95, 0)); LightningStrike.m_Table.Remove(Caster); } if (MomentumStrike.UnderEffect(Caster)) { Caster.Send(new SetNewSpell(0x96, 0)); MomentumStrike.m_Table.Remove(Caster); } return(true); }
public static bool SetCurrentAbility(Mobile m, WeaponAbility a) { if (!Core.AOS) { ClearCurrentAbility(m); return(false); } if (!IsWeaponAbility(m, a)) { ClearCurrentAbility(m); return(false); } if (a != null && !a.Validate(m)) { ClearCurrentAbility(m); return(false); } if (a == null) { m_Table.Remove(m); } else { m_Table[m] = a; } m.CanReveal = true; if (HonorableExecution.UnderEffect(m)) { m.Send(new SetNewSpell(0x91, 0)); HonorableExecution.m_Table.Remove(m); } if (LightningStrike.UnderEffect(m)) { m.Send(new SetNewSpell(0x95, 0)); LightningStrike.m_Table.Remove(m); } if (MomentumStrike.UnderEffect(m)) { m.Send(new SetNewSpell(0x96, 0)); MomentumStrike.m_Table.Remove(m); } if (FocusAttack.UnderEffect(m)) { m.Send(new SetNewSpell(0xF5, 0)); FocusAttack.m_Table.Remove(m); BaseWeapon weapon = m.Weapon as BaseWeapon; if (weapon != null) { FocusAttack.RemoveBonus(weapon); } } if (DeathStrike.UnderEffect(m)) { m.Send(new SetNewSpell(0xF6, 0)); DeathStrike.m_Table.Remove(m); } if (KiAttack.UnderEffect(m)) { m.Send(new SetNewSpell(0xF8, 0)); KiAttack.m_Table.Remove(m); } if (SurpriseAttack.UnderEffect(m)) { m.Send(new SetNewSpell(0xF9, 0)); SurpriseAttack.m_Table.Remove(m); } if (Backstab.UnderEffect(m)) { m.Send(new SetNewSpell(0xFA, 0)); Backstab.m_Table.Remove(m); } return(true); }