feat: Adds SpecialAttack monster ability trigger. Fixes fanning fire. (#2186)
This commit is contained in:
parent
91b2912ee4
commit
e468f79e18
5 changed files with 89 additions and 119 deletions
|
|
@ -890,6 +890,11 @@ public abstract partial class BaseWeapon
|
|||
|
||||
if (attacker is BaseCreature bc)
|
||||
{
|
||||
if (bc.TriggerAbility(MonsterAbilityTrigger.CombatAction, defender))
|
||||
{
|
||||
return GetDelay(attacker);
|
||||
}
|
||||
|
||||
// Only change direction if they are not a player.
|
||||
attacker.Direction = attacker.GetDirectionTo(defender);
|
||||
var ab = bc.GetWeaponAbility();
|
||||
|
|
@ -1350,7 +1355,7 @@ public abstract partial class BaseWeapon
|
|||
theirValue = Math.Max(0.1, defValue + 50.0);
|
||||
}
|
||||
|
||||
var chance = ourValue / (theirValue * 2.0) * 1.0 + (double)bonus / 100;;
|
||||
var chance = ourValue / (theirValue * 2.0) * 1.0 + (double)bonus / 100;
|
||||
|
||||
if (Core.AOS && chance < 0.02)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -70,6 +70,11 @@ namespace Server.Items
|
|||
attacker.DisruptiveAction();
|
||||
attacker.NetState.SendSwing(attacker.Serial, defender.Serial);
|
||||
|
||||
if (attacker is BaseCreature bc && bc.TriggerAbility(MonsterAbilityTrigger.CombatAction, defender))
|
||||
{
|
||||
return GetDelay(attacker);
|
||||
}
|
||||
|
||||
if (OnFired(attacker, defender))
|
||||
{
|
||||
if (CheckHit(attacker, defender))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue