summaryrefslogtreecommitdiff
path: root/src/emap/skill_targeted.c
diff options
context:
space:
mode:
authorJoseph Botosh <rumly111@gmail.com>2016-07-03 19:55:49 +0300
committerJoseph Botosh <rumly111@gmail.com>2016-07-05 17:36:23 +0300
commitff678a2bc1f17d5f7faa8744c2c628b1f2b96a1e (patch)
tree86ea390b7de8e60251e67fe18bef879fec468e05 /src/emap/skill_targeted.c
parent7f6c805f25d34ba80ca86e53216e1d588ab1ea75 (diff)
downloadplugin-ff678a2bc1f17d5f7faa8744c2c628b1f2b96a1e.tar.gz
plugin-ff678a2bc1f17d5f7faa8744c2c628b1f2b96a1e.tar.bz2
plugin-ff678a2bc1f17d5f7faa8744c2c628b1f2b96a1e.tar.xz
plugin-ff678a2bc1f17d5f7faa8744c2c628b1f2b96a1e.zip
add Physical Shield Skill (id 20001)
Diffstat (limited to 'src/emap/skill_targeted.c')
-rw-r--r--src/emap/skill_targeted.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/emap/skill_targeted.c b/src/emap/skill_targeted.c
new file mode 100644
index 0000000..372e1b3
--- /dev/null
+++ b/src/emap/skill_targeted.c
@@ -0,0 +1,22 @@
+
+#include "map/clif.h"
+#include "map/map.h"
+#include "map/status.h"
+#include "map/skill.h"
+
+void eskill_physical_shield(struct block_list *src,
+ struct block_list *bl,
+ uint16 skill_id,
+ uint16 skill_lv)
+{
+ int val1, val2, time, matk;
+ enum sc_type type;
+
+ type = status->skill2sc(skill_id);
+ matk = status->get_matk(src, 2);
+ val1 = skill_lv * 10 + matk / 20; // DEF bonus
+ val2 = skill_lv * 5 + matk / 25; // ASPD penalty
+ time = skill->get_time(skill_id, skill_lv); // doesn't depends on matk
+ clif->skill_nodamage(src, bl, skill_id, skill_lv,
+ sc_start2(src, bl, type, 100, val1, val2, time));
+}