summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-24 15:10:51 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-24 15:10:51 +0000
commitbcfd26477585eb8de9ec336cd201688e9314150e (patch)
tree69ace2996d9385022b8d5501fd9c3df78f3e62d5
parent1e629a763c308781b17c03bc64e937006b568bac (diff)
downloadhercules-bcfd26477585eb8de9ec336cd201688e9314150e.tar.gz
hercules-bcfd26477585eb8de9ec336cd201688e9314150e.tar.bz2
hercules-bcfd26477585eb8de9ec336cd201688e9314150e.tar.xz
hercules-bcfd26477585eb8de9ec336cd201688e9314150e.zip
- Changed Land Protector's range back to 3.
- fixed unban unblocking players as well. - Fixed Volcano/Deluge/Violent Gale increasing damage based on element of attack instead of defense element of attacker. - Cleaned up the code of Magic Rod, fixed it not giving SP. - Moved the code of Hermod and Basilica to castend_pos2 so it should work now. - Modified the code of Ankle Snare so the status ends on unit's time-limit rather than when the snared object moves away. - Re-worded the water check of ST_WATER skills. - Allowed sc-cast reductions to be processed even when cast-time is instant (to let suffragium end even on instant-cast skills) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7855 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt12
-rw-r--r--db/Changelog.txt2
-rw-r--r--db/skill_db.txt2
-rw-r--r--src/login_sql/login.c2
-rw-r--r--src/map/battle.c6
-rw-r--r--src/map/skill.c97
6 files changed, 58 insertions, 63 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 62d04bc39..b1b2c08dd 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,18 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2006/07/24
+ * fixed unban unblocking players as well. [Skotlex]
+ * Fixed Volcano/Deluge/Violent Gale increasing damage based on element of
+ attack instead of defense element of attacker. [Skotlex]
+ * Cleaned up the code of Magic Rod, fixed it not giving SP. [Skotlex]
+ * Moved the code of Hermod and Basilica to castend_pos2 so it should work
+ now. [Skotlex]
+ * Modified the code of Ankle Snare so the status ends on unit's time-limit
+ rather than when the snared object moves away. [Skotlex]
+ * Re-worded the water check of ST_WATER skills. [Skotlex]
+ * Allowed sc-cast reductions to be processed even when cast-time is instant
+ (to let suffragium end even on instant-cast skills) [Skotlex]
2006/07/23
* Modified setting skillrange_by_weapon (skill.conf) to be a
per-object-type setting instead of yes/no. The default now is that
diff --git a/db/Changelog.txt b/db/Changelog.txt
index 446767038..659e03f01 100644
--- a/db/Changelog.txt
+++ b/db/Changelog.txt
@@ -24,6 +24,8 @@
-----
=========================
+07/24
+ * Changed Land Protector's range back to 3. [Skotlex]
07/23
* Added some new items thanks to Haplo [Playtester]
* Added Holy Quiver to IG_Quiver [Playtester]
diff --git a/db/skill_db.txt b/db/skill_db.txt
index 253b20382..831c3a414 100644
--- a/db/skill_db.txt
+++ b/db/skill_db.txt
@@ -308,7 +308,7 @@
285,2,6,2,0,1,0,5,1,yes,0,0,0,magic,0 //SA_VOLCANO#Volcano#
286,2,6,2,0,1,0,5,1,yes,0,0,0,magic,0 //SA_DELUGE#Deluge#
287,2,6,2,0,1,0,5,1,yes,0,0,0,magic,0 //SA_VIOLENTGALE#Whirlwind#
-288,7:7:9:9:11,6,2,0,1,0,5,1,yes,0,0,0,magic,0 //SA_LANDPROTECTOR#Magnetic Earth#
+288,3,6,2,0,1,0,5,1,yes,0,0,0,magic,0 //SA_LANDPROTECTOR#Magnetic Earth#
289,9,6,1,0,1,0,5,1,yes,0,0,0,magic,0 //SA_DISPELL#Dispel#
290,0,6,4,0,1,0,10,1,yes,0,0,0,magic,0 //SA_ABRACADABRA#Hocus-pocus#
291,9,6,1,0,1,0,1,1,yes,0,2,0,magic,0 //SA_MONOCELL#Monocell#
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index 059611979..45cd4284d 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -1319,7 +1319,7 @@ int parse_fromchar(int fd){
sql_row = mysql_fetch_row(sql_res); //row fetching
}
if (atol(sql_row[0]) != 0) {
- sprintf(tmpsql,"UPDATE `%s` SET `ban_until` = '0', `state`='0' WHERE `%s` = '%d'", login_db,login_db_account_id,acc);
+ sprintf(tmpsql,"UPDATE `%s` SET `ban_until` = '0' WHERE `%s` = '%d'", login_db,login_db_account_id,acc);
//query
if(mysql_query(&mysql_handle, tmpsql)) {
ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
diff --git a/src/map/battle.c b/src/map/battle.c
index bbee2fe24..acd5d547d 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -198,11 +198,11 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag
ratio = attr_fix_table[def_lv-1][atk_elem][def_type];
if (sc && sc->count)
{
- if(sc->data[SC_VOLCANO].timer!=-1 && atk_elem == ELE_FIRE)
+ if(sc->data[SC_VOLCANO].timer!=-1 && status_get_element(src) == ELE_FIRE)
ratio += enchant_eff[sc->data[SC_VOLCANO].val1-1];
- if(sc->data[SC_VIOLENTGALE].timer!=-1 && atk_elem == ELE_WIND)
+ if(sc->data[SC_VIOLENTGALE].timer!=-1 && status_get_element(src) == ELE_WIND)
ratio += enchant_eff[sc->data[SC_VIOLENTGALE].val1-1];
- if(sc->data[SC_DELUGE].timer!=-1 && atk_elem == ELE_WATER)
+ if(sc->data[SC_DELUGE].timer!=-1 && status_get_element(src) == ELE_WATER)
ratio += enchant_eff[sc->data[SC_DELUGE].val1-1];
}
if (tsc && tsc->count)
diff --git a/src/map/skill.c b/src/map/skill.c
index d665950dd..46280601e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1856,22 +1856,18 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
}
if(sc && sc->data[SC_MAGICROD].timer != -1 && src == dsrc) {
+ struct unit_data *ud;
+ int sp = skill_get_sp(skillid,skilllv);
dmg.damage = dmg.damage2 = 0;
dmg.dmg_lv = ATK_FLEE; //This will prevent skill additional effect from taking effect. [Skotlex]
- if(tsd) {
- int sp = skill_get_sp(skillid,skilllv);
- sp = sp * sc->data[SC_MAGICROD].val2 / 100;
- if(skillid == WZ_WATERBALL && skilllv > 1)
- sp = sp/((skilllv|1)*(skilllv|1)); //Estimate SP cost of a single water-ball
- if(sp > SHRT_MAX) sp = SHRT_MAX;
- else if(sp < 1) sp = 1;
- if(sp > tsd->status.max_sp - tsd->status.sp)
- sp = tsd->status.max_sp - tsd->status.sp;
- tsd->status.sp += sp;
- clif_heal(tsd->fd,SP_SP,sp);
- tsd->ud.canact_tick = tick + skill_delayfix(bl, SA_MAGICROD, sc->data[SC_MAGICROD].val1);
- }
+ sp = sp * sc->data[SC_MAGICROD].val2 / 100;
+ if(skillid == WZ_WATERBALL && skilllv > 1)
+ sp = sp/((skilllv|1)*(skilllv|1)); //Estimate SP cost of a single water-ball
+ status_heal(bl, 0, sp, 2);
clif_skill_nodamage(bl,bl,SA_MAGICROD,sc->data[SC_MAGICROD].val1,1);
+ ud = unit_bl2ud(bl);
+ if (ud) ud->canact_tick = tick
+ + skill_delayfix(bl, SA_MAGICROD, sc->data[SC_MAGICROD].val1);
}
}
@@ -4248,24 +4244,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
clif_skill_fail(sd,skillid,0,0);
break;
- case HP_BASILICA: /* バジリカ */
- case CG_HERMODE: // Wand of Hermode
- {
- struct skill_unit_group *sg;
- unit_stop_walking(src,1);
- skill_clear_unitgroup(src);
- sg = skill_unitsetting(src,skillid,skilllv,src->x,src->y,0);
- if(skillid == CG_HERMODE)
- i = sc_start4(src,SC_DANCING,100,
- skillid,0,0,sg->group_id,skill_get_time(skillid,skilllv));
- else
- i = sc_start4(src,type,100,
- skilllv,0,BCT_SELF,sg->group_id,
- skill_get_time(skillid,skilllv));
- clif_skill_nodamage(src,bl,skillid,skilllv,i);
- }
- break;
-
case BD_ADAPTATION: /* アドリブ */
if(tsc && tsc->data[SC_DANCING].timer!=-1){
clif_skill_nodamage(src,bl,skillid,skilllv,1);
@@ -5120,11 +5098,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
}
}
}
- if(su->group->unit_id == UNT_ANKLESNARE && su->group->val2){
- struct block_list *target=map_id2bl(su->group->val2);
- if(target)
- status_change_end(target,SC_ANKLE,-1);
- }
skill_delunit(su);
}
}
@@ -6158,7 +6131,21 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
skill_unitsetting(src,skillid,skilllv,x,y,0);
flag|=1;
break;
-
+ case HP_BASILICA:
+ skill_clear_unitgroup(src);
+ sg = skill_unitsetting(src,skillid,skilllv,x,y,0);
+ sc_start4(src,type,100,
+ skilllv,0,BCT_SELF,sg->group_id,
+ skill_get_time(skillid,skilllv));
+ flag|=1;
+ break;
+ case CG_HERMODE:
+ skill_clear_unitgroup(src);
+ sg = skill_unitsetting(src,skillid,skilllv,x,y,0);
+ sc_start4(src,SC_DANCING,100,
+ skillid,0,0,sg->group_id,skill_get_time(skillid,skilllv));
+ flag|=1;
+ break;
case RG_CLEANER: // [Valaris]
i = skill_get_splash(skillid, skilllv);
map_foreachinarea(skill_graffitiremover,src->m,x-i,y-i,x+i,y+i,BL_SKILL);
@@ -6337,6 +6324,7 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
sc_start(src,type,100,skilllv,skill_get_time(skillid,skilllv));
skill_unitsetting(src,skillid,skilllv,src->x,src->y,0);
break;
+
default:
ShowWarning("skill_castend_pos2: Unknown skill used:%d\n",skillid);
return 1;
@@ -7409,18 +7397,6 @@ int skill_unit_onout (struct skill_unit *src, struct block_list *bl, unsigned in
if (sc && sc->data[type].timer!=-1)
status_change_end(bl,type,-1);
break;
- case UNT_ANKLESNARE:
- {
- struct block_list *target = map_id2bl(sg->val2);
- if(target && target == bl){
- status_change_end(bl,SC_ANKLE,-1);
- sg->limit=DIFF_TICK(tick,sg->tick)+1000;
- sg->state.into_abyss = 1; //Prevent Remove Trap from giving you the trap back. [Skotlex]
- }
- else
- return 0;
- break;
- }
case UNT_BASILICA: //Clear basilica if the owner moved [Skotlex]
case UNT_HERMODE: //Clear Hermode if the owner moved.
if (sc && sc->data[type].timer!=-1 && sc->data[type].val3 == BCT_SELF && sc->data[type].val4 == sg->group_id)
@@ -7604,6 +7580,13 @@ int skill_unit_onlimit (struct skill_unit *src, unsigned int tick)
}
}
break;
+ case UNT_ANKLESNARE:
+ {
+ struct block_list *target = map_id2bl(sg->val2);
+ if(target)
+ status_change_end(target,SC_ANKLE,-1);
+ }
+ break;
}
return 0;
@@ -8474,14 +8457,12 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
}
break;
case ST_WATER:
- if (
- (!sc || (sc->data[SC_DELUGE].timer == -1 && sc->data[SC_SUITON].timer == -1)) &&
- (!map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKWATER))
- ) {
- clif_skill_fail(sd,skill,0,0);
- return 0;
- }
- break;
+ if (sc && (sc->data[SC_DELUGE].timer != -1 || sc->data[SC_SUITON].timer != -1))
+ break;
+ if (map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKWATER))
+ break;
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
}
if (checkitem_flag) {
@@ -8587,7 +8568,7 @@ int skill_castfix_sc (struct block_list *bl, int time)
{
struct status_change *sc = status_get_sc(bl);
- if (time <= 0) return 0;
+// if (time <= 0) return 0; //Reports say that Suffragium should be consumed even on instant cast skills [Skotlex]
if (sc && sc->count) {
if (sc->data[SC_SUFFRAGIUM].timer != -1) {