-
-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fixes Dot abilities. Adds blood bath attack (#1277)
- Loading branch information
1 parent
f884193
commit 9c74276
Showing
10 changed files
with
194 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System; | ||
|
||
namespace Server.Mobiles; | ||
|
||
public class BloodBathAttack : MonsterAbilitySingleTargetDoT | ||
{ | ||
public override MonsterAbilityType AbilityType => MonsterAbilityType.BloodBath; | ||
public override MonsterAbilityTrigger AbilityTrigger => MonsterAbilityTrigger.GiveMeleeDamage; | ||
|
||
public override TimeSpan MinDelay => TimeSpan.FromSeconds(1.0); | ||
public override TimeSpan MaxDelay => TimeSpan.FromSeconds(1.0); | ||
|
||
protected override int GetCount(BaseCreature source, Mobile defender) => 5; | ||
|
||
protected override void EffectTick(BaseCreature source, Mobile defender, ref TimeSpan nextDelay) | ||
{ | ||
if (defender.Alive) | ||
{ | ||
defender.Damage(2, source); | ||
} | ||
else | ||
{ | ||
RemoveEffect(source, defender); | ||
} | ||
} | ||
|
||
public override double ChanceToTrigger => 0.1; | ||
|
||
protected override void OnBeforeTarget(MonsterAbilityTrigger trigger, BaseCreature source, Mobile defender) | ||
{ | ||
if (RemoveEffect(source, defender)) | ||
{ | ||
defender.SendLocalizedMessage(1070825); // The creature continues to rage! | ||
} | ||
else | ||
{ | ||
defender.SendLocalizedMessage(1070826); // The creature goes into a rage, inflicting heavy damage! | ||
} | ||
} | ||
|
||
protected override void EndEffect(BaseCreature source, Mobile defender) | ||
{ | ||
} | ||
|
||
protected override void OnEffectExpired(BaseCreature source, Mobile defender) | ||
{ | ||
defender.SendLocalizedMessage(1070824); // The creature's rage subsides. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.