summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt6
-rw-r--r--db/mob_skill_db.txt3
-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
7 files changed, 24 insertions, 7 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 644267529..4ffe06b1a 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -5,6 +5,12 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
2006/01/31
+ * Fixed being able to Encore skills you no longer have in your tree.
+ [Skotlex]
+ * Added no HP regen while Bleeding, -25% ATK and ASPD penalties as well.
+ [Skotlex]
+ * Added VIT reduces duration of confusion. [Skotlex]
+ * Added "onspawn" mob skill condition. [Skotlex]
* Changed the exp table format. The new format allows specifying exp tables
for any particular class. Thanks to Playstester for converting the official
exp table to the new format. [Skotlex]
diff --git a/db/mob_skill_db.txt b/db/mob_skill_db.txt
index 3df04ffaa..bca63b540 100644
--- a/db/mob_skill_db.txt
+++ b/db/mob_skill_db.txt
@@ -25,7 +25,8 @@
// around (11x11 area around self)
//
//conditions: (condition type) (value which specifies a condition value)
-// always uncondtional
+// always unconditional
+// onspawn when the mob spawns/respawns.
// myhpltmaxrate when the mob's hp drops to a certain %
// mystatuson If the mob has any abnormalities in status (condition value),
// mystatusoff If the mob has ended any abnormalities in status (condition value),
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: /* 暗? */