summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt7
-rw-r--r--db/Changelog.txt3
-rw-r--r--db/skill_cast_db.txt12
-rw-r--r--src/map/map.c4
-rw-r--r--src/map/map.h1
-rw-r--r--src/map/npc.c4
-rw-r--r--src/map/skill.c8
-rw-r--r--src/map/status.c14
8 files changed, 38 insertions, 15 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 26688686a..0cd5b19e7 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,13 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2007/03/02
+ * SG Union will consume now SP if you use it while not soul linked.
+ * Added variable "skip" to the mob spawn data, to know how many mobs to
+ skip when spawning because they were not removed due to the
+ "mob_remove_damaged" setting.
+ * Corrected the Hp/Sp regen formulas from Hp/Sp/Spirit Recovery and
+ Happy/Peaceful break according to recent forums discussions (formula is
+ changed from x*lv +max*lv/500 to lv*(x+max/500). [Skotlex]
* Added new script function: setiteminfo. Now you can make custom items [Lupus]
- Updated script function setitemscript(itemID,script,WhichScript)
now u can set one of 3 item scripts: use/update, equip, unequip
diff --git a/db/Changelog.txt b/db/Changelog.txt
index 554453f33..fcb41699e 100644
--- a/db/Changelog.txt
+++ b/db/Changelog.txt
@@ -19,6 +19,9 @@
-----
========================
+03/02
+ * Updated the stun length to 5 secs of: Meteor Storm, Sonic Blow, Throw
+ Stone, Sightless Raid, Smite, Cart Termination.
02/24
* Updated skill_db.txt using the new nk values in hexadecimal. [Skotlex]
02/23
diff --git a/db/skill_cast_db.txt b/db/skill_cast_db.txt
index 0d9579729..8fa31eb8b 100644
--- a/db/skill_cast_db.txt
+++ b/db/skill_cast_db.txt
@@ -174,7 +174,7 @@
81,700,2000,0,500,0
//-- WZ_METEOR
-83,15000,2000:3000:3000:4000:4000:5000:5000:6000:6000:7000,0,500,3000
+83,15000,2000:3000:3000:4000:4000:5000:5000:6000:6000:7000,0,500,5000
//-- WZ_JUPITEL
84,2500:3000:3500:4000:4500:5000:5500:6000:6500:7000,0,0,0,0
//-- WZ_VERMILION
@@ -244,7 +244,7 @@
//-- AS_CLOAKING
135,0,0,0,500:1000:2000:3000:4000:5000:6000:7000:8000:9000,0
//-- AS_SONICBLOW
-136,0,2000,2000,0,3000
+136,0,2000,2000,0,5000
//-- AS_GRIMTOOTH
137,0,0,0,0,1000
//-- AS_ENCHANTPOISON
@@ -274,7 +274,7 @@
//-- TF_PICKSTONE
151,500,0,0,0,0
//-- TF_THROWSTONE
-152,0,100,0,3000,8000
+152,0,100,0,5000,8000
//-- MC_LOUD
155,0,0,0,300000,0
@@ -341,7 +341,7 @@
212,0,500,0,0,0
//-- RG_RAID
-214,0,0,0,3000,8000:9000:10000:11000:12000
+214,0,0,0,5000,8000:9000:10000:11000:12000
//-- RG_STRIPEWEAPON
215,1000,1000,0,75000:90000:105000:120000:135000,0
//-- RG_STRIPSHIELD
@@ -384,7 +384,7 @@
//-- CR_AUTOGUARD
249,0,0,0,300000,0
//-- CR_SHIELDCHARGE
-250,0,0,0,0,3000
+250,0,0,0,0,5000
//-- CR_SHIELDBOOMERANG
251,0,700,0,0,0
//-- CR_REFLECTSHIELD
@@ -808,7 +808,7 @@
//-- HW_GRAVITATION
484,5000,2000,0,5000:6000:7000:8000:9000,0
//-- WS_CARTTERMINATION
-485,0,0,0,0,3000
+485,0,0,0,0,5000
//-- WS_OVERTHRUSTMAX
486,0,0,0,180000,0
//-- CG_LONGINGFREEDOM
diff --git a/src/map/map.c b/src/map/map.c
index 1ea7498f5..e69d5956c 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2025,7 +2025,11 @@ int mob_cache_cleanup_sub(struct block_list *bl, va_list ap) {
return 0;
if (!battle_config.mob_remove_damaged &&
md->status.hp < md->status.max_hp)
+ {
+ if (md->spawn && md->spawn_n >= 0) //Do not respawn mob later.
+ map[md->spawn->m].moblist[md->spawn_n]->skip++;
return 0; //Do not remove damaged mobs.
+ }
unit_free(&md->bl,0);
diff --git a/src/map/map.h b/src/map/map.h
index 69cd1383b..9a3df879f 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -917,6 +917,7 @@ struct spawn_data {
unsigned short m,x,y; //Spawn information (map, point, spawn-area around point)
signed short xs,ys;
unsigned short num; //Number of mobs using this structure.
+ unsigned short skip; //Number of mobs to skip when spawning them (for mob_remove_damageed: no)
unsigned int level; //Custom level.
unsigned int delay1,delay2; //Min delay before respawning after spawn/death
struct {
diff --git a/src/map/npc.c b/src/map/npc.c
index 59d21e7ba..f6fa6e9ac 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2307,14 +2307,14 @@ int npc_parse_mob2 (struct spawn_data *mob, int index)
int i;
struct mob_data *md;
- for (i = 0; i < mob->num; i++) {
+ for (i = mob->skip; i < mob->num; i++) {
md = mob_spawn_dataset(mob);
md->spawn = mob;
md->spawn_n = index;
md->special_state.cached = (index>=0); //If mob is cached on map, it is dynamically removed
mob_spawn(md);
}
-
+ mob->skip = 0;
return 1;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 8e2953705..5b250bbca 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8331,6 +8331,14 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
return 1;
if (sc && sc->data[SC_SPIRIT].timer != -1 && sc->data[SC_SPIRIT].val2 == SL_STAR)
break;
+ //Auron insists we should implement SP consumption when you are not Soul Linked. [Skotlex]
+ if(sp>0 && type&1)
+ {
+ if (status->sp < (unsigned int)sp)
+ clif_skill_fail(sd,skill,1,0);
+ else
+ status_zap(&sd->bl, 0, sp);
+ }
return 0;
case GD_BATTLEORDER:
case GD_REGENERATION:
diff --git a/src/map/status.c b/src/map/status.c
index dfa0ab424..924a97407 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2494,14 +2494,14 @@ void status_calc_regen(struct block_list *bl, struct status_data *status, struct
val = 0;
if((skill=pc_checkskill(sd,SM_RECOVERY)) > 0)
- val += skill*5 + (status->max_hp*skill/500);
+ val += skill*(5 + status->max_hp/500);
sregen->hp = cap_value(val, 0, SHRT_MAX);
val = 0;
if((skill=pc_checkskill(sd,MG_SRECOVERY)) > 0)
- val += skill*3 + (status->max_sp*skill/500);
+ val += skill*(3 + status->max_sp/500);
if((skill=pc_checkskill(sd,NJ_NINPOU)) > 0)
- val += skill*3 + (status->max_sp*skill/500);
+ val += skill*(3 + status->max_sp/500);
sregen->sp = cap_value(val, 0, SHRT_MAX);
// Skill-related recovery (only when sit)
@@ -2509,21 +2509,21 @@ void status_calc_regen(struct block_list *bl, struct status_data *status, struct
val = 0;
if((skill=pc_checkskill(sd,MO_SPIRITSRECOVERY)) > 0)
- val += skill*4 + (status->max_hp*skill/500);
+ val += skill*(4 + status->max_hp/500);
if((skill=pc_checkskill(sd,TK_HPTIME)) > 0 && sd->state.rest)
- val += skill*30 + (status->max_hp*skill/500);
+ val += skill*(30 + status->max_hp/500);
sregen->hp = cap_value(val, 0, SHRT_MAX);
val = 0;
if((skill=pc_checkskill(sd,TK_SPTIME)) > 0 && sd->state.rest)
{
- val += skill*3 + (status->max_sp*skill/500);
+ val += skill*(3 + status->max_sp/500);
if ((skill=pc_checkskill(sd,SL_KAINA)) > 0) //Power up Enjoyable Rest
val += (30+10*skill)*val/100;
}
if((skill=pc_checkskill(sd,MO_SPIRITSRECOVERY)) > 0)
- val += skill*2 + (status->max_sp*skill/500);
+ val += skill*(2 + status->max_sp/500);
sregen->sp = cap_value(val, 0, SHRT_MAX);
}