Update Player Skills

Jules 2022-02-26 17:51:55 -07:00
parent 40fb454a45
commit 143dd38f1a

@ -40,44 +40,12 @@ are always used**.
**Once your skills are upgraded and bound, you may
[cast](Custom Skill Casting) them.**
Default MMOCore Skills
----------------------
| Skill | Description | Modifiers |
|------------------|---------------------------------------------------------------------------------------------------------|-----------------------|
| *Ambers | Ambers drop when dealing magic damage. Grants X% max mana back when picked up. | percent |
| *Backstab | Backstabs deal X% extra damage. | extra |
| Combo Attack | Repeatedly slashes the target for X total damage. | damage, count |
| Control | Slows the target. When left clicking, knocks him back in target direction. | knockback, duration |
| Deep Wound | Punctures target, damaged is increased based on target's missing health | damage, extra |
| Empowered Attack | Charges your weapon with lightning. Your next attack deals extra damage and spreads onto nearby enemies | radius, ratio, extra |
| Evade | You become immune to damage till you attack again/end of duration | duration |
| *Fire Berserker | Passively deal increased damage when on fire. | extra |
| Fire Rage | Slow down and arm your fists with three fire bolts. | count, damage, ignite |
| Fire Storm | Fire projectiles cast on the target, dealing damage. | ignite, damage |
| Fireball | Damaging & igniting fireball. Shatters into damaging flame shards | damage, ignite, ratio |
| Furtive Strike | Deals damage, greatly increased if target is isolated | damage, extra, radius |
| Greater Healings | Better version of //Minor Healings//. | heal |
| Human Shield | Reduces damage taken by ally, and redirects to you a portion of the blocked damage. | reduction, redirect, duration, low |
| Ice Spikes | Ice spikes summon from the ground, damaging and slowing hit enemies. | damage, slow |
| Minor Healings | Heals for X health target/self if crouching. | heal |
| *Neptune's Gift | Resource regeneration is increased when standing in water. | extra |
| Power Mark | A mark spreads around initial target. Any damage dealt within mark radius accumulates damage. Mark explodes after Xsec, dealing X% of accumulated, stunning & knocking back nearby enemies. The higher the damage, the longer the stun. | stun, ratio, duration |
| *Sneaky Picky | Deal much more damage when delivering the first blow during a fight. | extra |
| Telekinesy | Target's movement is taken over. Left click to knock him back. | duration, knockback |
| Warp | Point the ground & teleport to target location. | range |
| Weaken | Weakens target, increasing damage taken. | ratio, duration |
(* = Passive skill)
Keep in mind most skills do also have a `cooldown`, `mana` and `stamina` modifiers although they are not represented in the array.
## Skill Folder
The skills folder houses all of the skills that come with the plugin. All of the skills are hardcoded into the plugin jar. If you do not want to use a skill, simply do not assign it to a class.
The `/skills` folder houses all of the skills that come with the plugin. Most skills are hardcoded into the plugin jar. If you do not want to use a skill, simply do not assign it to a class. Each skill has its **own YML file** where you can edit the lore and how it looks in the /skills menu. It is best to only edit the plain words, and not try and mess with the value placeholders.
Each skill has its **own YML file** where you can edit the lore and how it looks in the /skills menu. It is best to only edit the plain words, and not try and mess with the value placeholders.
At this current time, there is no "create your own skill" system, **but we have decided the coolest thing to do is to allow MythicMobs/SkillAPI skills to become MMOCore skills. You will be able to utilize the default skills that we have and continue to add, while creating hundreds of your own skills through MythicMobs syntax.**
At this current time, there is no "create your own skill" system, **but we have decided the coolest thing to do is to allow MythicMobs skills to become MMOCore skills. This will effectively replace the need for SkillAPI, or any other skill creation plugins. You will be able to utilize the default skills that we have and continue to add, while creating hundreds of your own skills through MythicMobs syntax.**
More information below.
## Example Skill
@ -117,131 +85,10 @@ The `material` option determines what icon will display in the player's skill li
![](https://i.imgur.com/PhIpbOr.png)
## Binding MythicMobs skills to MMOCore skills
**If you are using MMOCore 1.9 dev builds please refer to [this wiki page](https://git.lumine.io/mythiccraft/mythiclib/-/wikis/Custom%20Skills) instead. Skill registration was moved over to MythicLib**
Since MMOCore 1.9 custom skills are handled within MythicLib, please refer to [this wiki page](https://git.lumine.io/mythiccraft/mythiclib/-/wikis/Custom%20Skills).
MMOCore currently does not have that many default player skills. **However** there is an option to create active MMOCore skills using the MythicMobs skill creation system. This gives you endless possibilities for MMOCore player skills. This requires MythicMobs 4.7.0 or newer.
In order to create a MMOCore skill using a MM skill, you need to setup one YAML configuration file (the file name will correspond to the MMOCore skill ID) in the /skills/mythic-mobs folder. Here is the config template:
```
# The internal name of the MM skill
mythicmobs-skill-id: IceBolt
# Display options
name: Ice Bolt
lore:
- 'Shoots a deadly ice bolt which'
- 'deals &b{damage} &7damage and slows'
- 'your target down for &b{slow} &7seconds.'
- ''
- '&e{cooldown}s Cooldown'
material: ICE
# Ability modifiers
cooldown:
base: 3.0
per-level: -0.1
max: 3.0
min: 1.0
damage:
base: 6
per-level: 3
slow:
base: 3
per-level: 1
```
As you can see, the skill display options and modifiers have the same format as with default MMOCore abilities. However, since you are registering a new skill which has no effect when cast, you need to link it to a MythicMobs skill, using the `mythicmobs-skill-id` config option. Make sure you enter the exact MM skill internal name. At this point, MMOCore should start detecting your skill (if you give it to any class).
![](https://i.imgur.com/eiQi7HA.png)
Once you have the MMOCore skill setup, head to your MythicMobs config and create your MM skill. We'll be using a wiki skill example called `Ice Bolt` which fires a damaging and slowing ice projectile.
```
IceBolt:
Skills:
- projectile{onTick=IceBolt-Tick;onHit=IceBolt-Hit;v=8;i=1;hR=1;vR=1;hnp=true} @targetLocation
IceBolt-Tick:
Skills:
- effect:particles{p=snowballpoof;amount=20;speed=0;hS=0.2;vS=0.2} @origin
IceBolt-Hit:
Skills:
- damage{a=10}
- potion{type=SLOW;duration=100;lvl=2}
```
Right now, the skill always deal the same amount of damage since there are the following lines: `damage{a=10}` and `potion{type=SLOW;duration=100;lvl=2}`. With MythicMobs, you can enter math formulas for the damage and effect duration/amplifier. These formulas can retrieve MythicMobs placeholders which allow skill mechanics to deal a different amount of damage, based on the placeholder output!
MMOCore adds a new MythicMobs placeholder called `<modifier.(modifier)>` which basically returns the value of the skill modifier. This placeholder is registered by MMOCore and is saved in a MM skill variable, which scope is set to SKILL; that means you can use this variable anywhere in your skill! Here is a use example:
* `damage{a="<modifier.damage>"}`
* `potion{type=SLOW;duration="<modifier.slow> * 20";lvl=2}`.
Do not forget to multiply the duration by 20 since the MM input must be in ticks. The placeholder is pretty case sensitive so make just you specify the exact same modifier name as the one you setup earlier in your MMOCore skill config.
MMOCore adds a second very useful placeholder to MM skills that lets you retrieve a specific player statistic: `<stat.(stat_name)>`. This placeholder was implemented because the PAPI placeholder `%mmocore_stat_(stat_name)%` **does not always work** in MM skill mechanics. Here is an use example:
* `damage{a="<stat.attack_damage>"}`
The format is the following: lower case stat name, use '_' (instead of '-' or ' ')
Since 1.8, custom MMOCore skills using the MM skill creation system supports skill conditions: if any condition is not met, the skill will not cast and MMOCore won't apply cooldown, mana costs...
**The created skill won't appear directly in the /skills menu. It can't be used by players yet because you first need to [give it to some player class](https://git.lumine.io/mythiccraft/mmocore/-/wikis/Player%20Classes#skills). Always remember the class fully determines what skills the player has.**
## MythicMobs skill placeholders
Here is the full list of placeholders implemented by MMOCore. Some of them are actually implemented by MythicLib which means you can also use them in MMOItems custom skills.
| Placeholder | Description |
| ----------------------------------|----------------------------------------|
| `<mana>` | The player's current mana |
| `<stamina>` | The player's current stamina |
| `<stellium>` | The player's current stellium |
| `<attribute.(attribute_name)>` | Points spent in a specific attribute |
| `<modifier.(mod_name)>` | Skill modifier, as decimal number |
| `<modifier.int.(mod_name)>` | Skill modifier, as integer |
| `<cooldown.mmocore_skill_(name)>` | Remaining cooldown for a MMOCore skill |
| `<stat.(stat_name)>` | Player stat value, as decimal number |
## New MM skill mechanics
The only skill mechanic MMOCore implements is a damaging mechanic:
`mmodamage{amount="<modifier.damage> + 10";types="SKILL,MAGIC,PROJECTILE"}`
You can specify the ability damage using "amount" or "a" as well as the damage types using "types" or "t". The list of available damage types can be found [here](https://git.lumine.io/mythiccraft/mythiclib/-/wikis/Damage%20System).
It works just like the default damage mechanic, except that it completely supports the MythicLib damage system, which means that it will apply damage buff stats (additional skill damage, etc), damage reduction stats, on-hit effects (on-hit abilities from MMOItems when using the WEAPON damage type), skills from MMOCore that trigger when dealing damage to entities....
## Making a passive skill
If you want to make a passive skill (using MythicMobs) all you have to do is add `passive-type: TYPE` to your skill YML file in the '/skills/mythic-mobs' folder. Adding a passive type to your skill will prevent it from being bound and will automatically cast during specific events, depending on the passive type specified.
The caster of the skill will ALWAYS be the player, but the `@Trigger` targeter in the skill can change depending on which passive type you use.
### Available Skill Triggers
| Skill Trigger | Description | Trigger Target |
|--------------------|--------------------------------------|---------------------------------------|
| **Combat Triggers** |
| KILL_ENTITY | Activates the skill when a player kills an entity | The killed entity |
| ATTACK | Activates the skill when the player attacks something | The entity the player attacked |
| DAMAGED | Activates the skill when the player takes damage | The player |
| DAMAGED_BY_ENTITY | Activates the skill when the player takes damage from an entity | The entity that damaged the player |
| DEATH | Activates the skill when the player dies | The player |
| **Trident Triggers** |
| SHOOT_TRIDENT | When the player shoots a trident | The trident |
| TRIDENT_TICK | Activates every tick when a trident is still midair | The trident |
| TRIDENT_LAND | When a trident lands on the ground | The trident |
| TRIDENT_HIT | When a thrown trident hits an entity | The hit entity |
| **Bow Triggers** |
| SHOOT_BOW | When the player fires an arrow | The arrow |
| ARROW_TICK | Activates every tick when an arrow is still midair | The arrow |
| ARROW_LAND | When an arrow lands on the ground | The arrow |
| ARROW_HIT | When a fired arrow hits an entity | The hit entity |
| **Click Triggers** |
| RIGHT_CLICK | On player right click | The player |
| LEFT_CLICK | On player left click | The player |
| SHIFT_RIGHT_CLICK | On player right click while sneaking | The player |
| SHIFT_LEFT_CLICK | On player left click while sneaking | The player |
| **Misc** |
| LOGIN | Activates the skill when a player logins | The player |
| SNEAK | Activates the skill when a player sneaks | The player |
| TIMER | Casts the skill every X ticks | The player |
## Setting up timer skills
`TIMER` is a special trigger type that casts a skill every X ticks. To setup timer skills, simply define the timer period in ticks using the `timer` skill modifier. This is a default skill modifier for **ANY** skill, just like `cooldown`, `mana` or `stamina`. If the skill trigger is not set to `TIMER` this skill modifier becomes 100% useless
### Making a passive skill
If you want to make a passive skill (using MythicMobs or SkillAPI) all you have to do is add `passive-type: TYPE` to your skill YML file in the '/skills' folder. Adding a passive type to your skill will prevent it from being bound and will automatically cast during specific events, depending on the passive type specified.
## Editing the skill menu
```