-
Notifications
You must be signed in to change notification settings - Fork 98
Matador's skills #311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
felipecastagnarodecarvalho
wants to merge
8
commits into
NoCode-NoLife:master
Choose a base branch
from
felipecastagnarodecarvalho:matador_skills
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Matador's skills #311
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
225b92b
Adding first four Matador skills
felipecastagnarodecarvalho b055e49
Adding BackSlide and PasoDoble Matador's skills
felipecastagnarodecarvalho 7d6aba9
Adding remaning Arts to the Matador skills
felipecastagnarodecarvalho 92a3ea4
Adding Corrida Finale skill from Matador
felipecastagnarodecarvalho 911a3bc
Merging master
felipecastagnarodecarvalho 3bc4c3e
Fixing most of the git issues - still missing a few things
felipecastagnarodecarvalho 887cca7
Fixing a few Matador issues
felipecastagnarodecarvalho c6625f0
Merging master + small matador fix
felipecastagnarodecarvalho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
43 changes: 43 additions & 0 deletions
43
src/ZoneServer/Buffs/Handlers/Swordsmen/Matador/Capote_Debuff.cs
This file contains hidden or 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,43 @@ | ||
| using Melia.Shared.Game.Const; | ||
| using Melia.Zone.Buffs.Base; | ||
| using Melia.Zone.Network; | ||
| using Melia.Zone.Scripting.AI; | ||
| using Melia.Zone.World.Actors.CombatEntities.Components; | ||
|
|
||
| namespace Melia.Zone.Buffs.Handlers.Swordsmen.Matador | ||
| { | ||
| /// <summary> | ||
| /// Handle for the Capote Debuff, which increases the thread from the mob to the caster | ||
| /// </summary> | ||
| [BuffHandler(BuffId.Capote_Debuff)] | ||
| public class Capote_Debuff : BuffHandler | ||
| { | ||
| private const float DecreaseCrtResRate = -0.15f; | ||
|
|
||
| public override void OnActivate(Buff buff, ActivationType activationType) | ||
| { | ||
| var target = buff.Target; | ||
| var caster = buff.Caster; | ||
|
|
||
| Send.ZC_NORMAL.UpdateModelColor(target, 150, 160, 255, 255, 1.5f); | ||
|
|
||
| AddPropertyModifier(buff, target, PropertyName.CRTDR_BM, DecreaseCrtResRate); | ||
|
|
||
| if (target.Components.TryGet<AiComponent>(out var component)) | ||
| component.Script.QueueEventAlert(new TauntEventAlert(target, caster)); | ||
| } | ||
|
|
||
| public override void OnEnd(Buff buff) | ||
| { | ||
| var target = buff.Target; | ||
| var caster = buff.Caster; | ||
|
|
||
| Send.ZC_NORMAL.UpdateModelColor(target, 255, 255, 255, 255, 1); | ||
|
|
||
| RemovePropertyModifier(buff, target, PropertyName.CRTDR_BM); | ||
|
|
||
| if (target.Components.TryGet<AiComponent>(out var component)) | ||
| component.Script.QueueEventAlert(new ResetTauntHateEventAlert(target, caster)); | ||
| } | ||
| } | ||
| } |
74 changes: 74 additions & 0 deletions
74
src/ZoneServer/Buffs/Handlers/Swordsmen/Matador/Muleta_Cast_Buff.cs
This file contains hidden or 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,74 @@ | ||
| using System; | ||
| using Melia.Shared.Data.Database; | ||
| using Melia.Shared.Game.Const; | ||
| using Melia.Zone.Buffs.Base; | ||
| using Melia.Zone.Network; | ||
| using Melia.Zone.Skills; | ||
| using Melia.Zone.Skills.Combat; | ||
| using Melia.Zone.World.Actors; | ||
| using Melia.Zone.World.Actors.Characters; | ||
|
|
||
| namespace Melia.Zone.Buffs.Handlers.Swordsmen.Matador | ||
| { | ||
| /// <summary> | ||
| /// Handle for the Muleta Cast Buff, which makes the character immune to some type of attacks. | ||
| /// </summary> | ||
| [BuffHandler(BuffId.Muleta_Cast_Buff)] | ||
| public class Muleta_Cast_Buff : BuffHandler, IBuffCombatDefenseBeforeCalcHandler | ||
| { | ||
| /// <summary> | ||
| /// Makes the character immune to some type of physical attacks, | ||
| /// Also can decrease cooldown for Matador skills on hits. | ||
| /// <param name="buff"></param> | ||
| /// <param name="attacker"></param> | ||
| /// <param name="target"></param> | ||
| /// <param name="skill"></param> | ||
| /// <param name="modifier"></param> | ||
| /// <param name="skillHitResult"></param> | ||
| public void OnDefenseBeforeCalc(Buff buff, ICombatEntity attacker, ICombatEntity target, Skill skill, SkillModifier modifier, SkillHitResult skillHitResult) | ||
| { | ||
| if (!target.IsBuffActive(BuffId.Muleta_Cast_Buff)) | ||
| return; | ||
|
|
||
| // Melee physical attacks ignored when counter-attacking (Matador). | ||
| if (skill.Data.AttackType == SkillAttackType.Slash || skill.Data.AttackType == SkillAttackType.Strike || skill.Data.AttackType == SkillAttackType.Melee) | ||
| { | ||
| // Muleta: Counterattack Master | ||
| if (attacker.Race == RaceType.Widling || target.IsAbilityActive(AbilityId.Matador8)) | ||
| { | ||
| target.StopBuff(BuffId.IS_Channeling_Buff); | ||
|
|
||
| if (target is Character targetCharacter) | ||
| { | ||
| targetCharacter.TurnTowards(attacker); | ||
|
|
||
| // [Arts] Muleta: Faena | ||
| // Casts Faena instead of default attack when counter-attacking | ||
| if (targetCharacter.IsAbilityActive(AbilityId.Matador26)) | ||
| Send.ZC_NORMAL.ForceClientCastSkill(targetCharacter, SkillId.Matador_Muleta, SkillId.Matador_Muleta_Faena); | ||
| else | ||
| Send.ZC_NORMAL.ForceClientCastSkill(targetCharacter, SkillId.Matador_Muleta, SkillId.Muleta_Attack); | ||
|
|
||
| // Muleta: Showtime | ||
| if (targetCharacter.IsAbilityActive(AbilityId.Matador16) && targetCharacter.TryGetAbility(AbilityId.Matador16, out var ability)) | ||
| { | ||
| var reductionInSeconds = ability.Level; | ||
| var matadorSkillTreeDataList = ZoneServer.Instance.Data.SkillTreeDb.FindSkillIds(JobId.Matador); | ||
|
|
||
| foreach (var charSkill in targetCharacter.Skills.GetList()) | ||
| { | ||
| if (charSkill.Id == SkillId.Matador_Muleta) | ||
| continue; | ||
|
|
||
| if (matadorSkillTreeDataList.Contains(charSkill.Id) && charSkill.IsOnCooldown) | ||
| charSkill.ReduceCooldown(TimeSpan.FromSeconds(reductionInSeconds)); | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| modifier.FinalDamageMultiplier *= 0; | ||
| } | ||
| } | ||
| } | ||
| } |
32 changes: 32 additions & 0 deletions
32
src/ZoneServer/Buffs/Handlers/Swordsmen/Matador/Ole_Debuff.cs
This file contains hidden or 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,32 @@ | ||
| using Melia.Shared.Game.Const; | ||
| using Melia.Zone.Buffs.Base; | ||
| using Melia.Zone.Scripting.AI; | ||
| using Melia.Zone.World.Actors.CombatEntities.Components; | ||
|
|
||
| namespace Melia.Zone.Buffs.Handlers.Swordsmen.Matador | ||
| { | ||
| /// <summary> | ||
| /// Handle for the Ole Debuff, which increases the thread from the mob to the caster | ||
| /// </summary> | ||
| [BuffHandler(BuffId.Ole_Debuff)] | ||
| public class Ole_Debuff : BuffHandler | ||
| { | ||
| public override void OnActivate(Buff buff, ActivationType activationType) | ||
| { | ||
| var target = buff.Target; | ||
| var caster = buff.Caster; | ||
|
|
||
| if (target.Components.TryGet<AiComponent>(out var component)) | ||
| component.Script.QueueEventAlert(new TauntEventAlert(target, caster)); | ||
| } | ||
|
|
||
| public override void OnEnd(Buff buff) | ||
| { | ||
| var target = buff.Target; | ||
| var caster = buff.Caster; | ||
|
|
||
| if (target.Components.TryGet<AiComponent>(out var component)) | ||
| component.Script.QueueEventAlert(new ResetTauntHateEventAlert(target, caster)); | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.