Archy-X / AuraSkills

The ultra-versatile RPG skills plugin
https://aurelium.dev/auraskills
GNU General Public License v3.0
235 stars 88 forks source link

Rewrite Damage system with mythic mobs compatibility #261

Closed ErikSzabo closed 4 months ago

ErikSzabo commented 4 months ago

This PR tries to properly apply AuraSkills skill/ability/stat modifiers to Mythic damage mechanics while also adding some new conditions, mechanics and configuration.

While this is a good thing, I had to rewrite the damage system which has some additional benefits.

New Mythic Conditions

There is a new condition hasMana{m=number} which you can use if you have MythicCrucible for item skills. eg.: message{m="hello world"} ~onUse ?hasMana{m=490} It checks if the player has the required amount of mana. If not, then the mechanic/skill is cancelled

New Mythic Mechanics

There are 2 new added mythic mechanics. takeMana and giveSkillXP

takeMana Takes mana from the player when the player casts the skill/mechanic on an item. eg.: takeMana{m=20} ~onAttack ?hasMana{m=490} It should usually be combined with hasMana. If the player has the required amount of mana, take the mana and do some skill/mechanic.

giveSkillXP Gives skill xp to the player. eg. as a mob skill: giveSkillXP{xp=100;s=fighting} @trigger ~onDeath Here it will give skill xp to the player who triggered the mobs death. The xp parameter can be a math formula with Mythic placeholders and PAPI placeholders (if you have Mythic Premium) The s parameter can be written as skill. It should support every skill not just the builtin ones.

Mythic Hook Config

  MythicMobs:
    enabled: true
    # Apply damage increase modifiers on MythicDamageEvent
    handle_damage_increase: true
    # Apply damage reduction modifiers and defense abilities on MythicDamageEvent
    handle_damage_reduction: true
    # If true, EntityLeveler won't give XP for MythicMobs
    prevent_regular_xp: false
ErikSzabo commented 4 months ago

Fixes #175 and can resolve #231