summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/mob.c2
-rw-r--r--src/map/mob.h1
-rw-r--r--src/map/pc.c6
-rw-r--r--src/map/skill.c5
-rw-r--r--src/map/status.c8
5 files changed, 16 insertions, 6 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index cf7791127..17292fc85 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1164,6 +1164,7 @@ int mob_spawn (int id)
clif_spawnmob(md);
+ mobskill_use(md, tick, MSC_SPAWN);
return 0;
}
@@ -4516,6 +4517,7 @@ static int mob_readskilldb(void)
{ "masterhpltmaxrate",MSC_MASTERHPLTMAXRATE },
{ "masterattacked", MSC_MASTERATTACKED },
{ "alchemist", MSC_ALCHEMIST },
+ { "onspawn", MSC_SPAWN},
}, cond2[] ={
{ "anybad", -1 },
{ "stone", SC_STONE },
diff --git a/src/map/mob.h b/src/map/mob.h
index e126a3bfb..bbdd66105 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -85,6 +85,7 @@ enum {
MSC_MASTERHPLTMAXRATE,
MSC_MASTERATTACKED,
MSC_ALCHEMIST,
+ MSC_SPAWN,
};
//Mob skill states.
diff --git a/src/map/pc.c b/src/map/pc.c
index 3f0181118..107aaf276 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -7779,7 +7779,8 @@ static int pc_natural_heal_sub(struct map_session_data *sd,va_list ap) {
(sd->sc_data[SC_POISON].timer != -1 && sd->sc_data[SC_SLOWPOISON].timer == -1) ||
(sd->sc_data[SC_DPOISON].timer != -1 && sd->sc_data[SC_SLOWPOISON].timer == -1) ||
sd->sc_data[SC_BERSERK].timer != -1 ||
- sd->sc_data[SC_TRICKDEAD].timer != -1
+ sd->sc_data[SC_TRICKDEAD].timer != -1 ||
+ sd->sc_data[SC_BLEEDING].timer != -1
))
) { //Cannot heal neither natural or special.
sd->hp_sub = sd->inchealhptick = sd->inchealspirithptick = 0;
@@ -7793,8 +7794,7 @@ static int pc_natural_heal_sub(struct map_session_data *sd,va_list ap) {
pc_natural_heal_hp(sd);
if(sd->sc_count && (
sd->sc_data[SC_EXTREMITYFIST].timer != -1 ||
- sd->sc_data[SC_DANCING].timer != -1 ||
- sd->sc_data[SC_BLEEDING].timer != -1
+ sd->sc_data[SC_DANCING].timer != -1
)) //No SP natural heal.
sd->sp_sub = sd->inchealsptick = 0;
else
diff --git a/src/map/skill.c b/src/map/skill.c
index c6d627582..2fdc406b0 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8833,12 +8833,11 @@ int skill_use_id (struct map_session_data *sd, int target_id, int skill_num, int
break;
case BD_ENCORE: /* アンコ?ル */
- if (!sd->skillid_dance) { //前回使用した踊りがないとだめ
+ if (!sd->skillid_dance || pc_checkskill(sd, sd->skillid_dance) <= 0) { //Prevent using the dance skill if you no longer have the skill in your tree.
clif_skill_fail(sd,skill_num,0,0);
return 0;
- } else {
- sd->skillid_old = skill_num;
}
+ sd->skillid_old = skill_num;
break;
case GD_BATTLEORDER:
diff --git a/src/map/status.c b/src/map/status.c
index 88e13fedf..a407f86f8 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2114,6 +2114,8 @@ int status_calc_batk(struct block_list *bl, int batk)
batk -= batk * 25/100;
if(sc_data[SC_CURSE].timer!=-1)
batk -= batk * 25/100;
+ if(sc_data[SC_BLEEDING].timer != -1)
+ batk -= batk * 25/100;
}
return batk;
@@ -2475,6 +2477,8 @@ int status_calc_aspd_rate(struct block_list *bl, int aspd_rate)
aspd_rate += 25;
if(sc_data[SC_GRAVITATION].timer!=-1)
aspd_rate += sc_data[SC_GRAVITATION].val2;
+ if(sc_data[SC_BLEEDING].timer != -1)
+ aspd_rate += 25;
if(sc_data[SC_JOINTBEAT].timer!=-1) {
if (sc_data[SC_JOINTBEAT].val2 == 1)
aspd_rate += 25;
@@ -4258,6 +4262,10 @@ int status_change_start(struct block_list *bl,int type,int val1,int val2,int val
}
break;
case SC_CONFUSION:
+ if(!(flag&2)) {
+ int sc_def = 100 - status_get_vit(bl);
+ tick = tick * sc_def / 100;
+ }
clif_emotion(bl,1);
break;
case SC_BLIND: /* 暗? */