summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-10 15:27:53 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-10 15:27:53 +0000
commit971a38ee78040cb50519df3b8db46d5553193939 (patch)
tree7d67d49746a09cfd915db29bbd687d9124791d6b
parent63a949f169e63a4eae859bc92b8edbbd0c4be532 (diff)
downloadhercules-971a38ee78040cb50519df3b8db46d5553193939.tar.gz
hercules-971a38ee78040cb50519df3b8db46d5553193939.tar.bz2
hercules-971a38ee78040cb50519df3b8db46d5553193939.tar.xz
hercules-971a38ee78040cb50519df3b8db46d5553193939.zip
- Removed the inf2 = TRAP of FirePillar and Spider Web so they are blocked by Land Protector.
- Renamed skill_landprotector to skill_cell_overlap since that is more coherent with what that function does now. - Corrected fog of wall, so that the deleted/doubled-duration effects are calculated on a cell-by-cell basis. - Updated Land Protector: It will now delete/block effects of ALL ground skills EXCEPT: Song/Dances/Traps (encores are still blocked). Land skills blocked/deleted by LP also can't be casted on top of an existing LP. The code uses the inf2 value of the skill to determine if it is a song/dance/trap. - Ganbantein, mimicking LP, will now also remove ensembles. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9191 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt8
-rw-r--r--db/Changelog.txt3
-rw-r--r--db/skill_db.txt4
-rw-r--r--src/map/skill.c54
4 files changed, 45 insertions, 24 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 87b1f1eb9..42f7bb479 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,14 @@ 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.
2006/11/10
+ * Corrected fog of wall, so that the deleted/doubled-duration effects are
+ calculated on a cell-by-cell basis. [Skotlex]
+ * Updated Land Protector: It will now delete/block effects of ALL ground
+ skills EXCEPT: Song/Dances/Traps (encores are still blocked). Land skills
+ blocked/deleted by LP also can't be casted on top of an existing LP. The
+ code uses the inf2 value of the skill to determine if it is a
+ song/dance/trap. [Skotlex]
+ * Ganbantein, mimicking LP, will now also remove ensembles. [Skotlex]
* Fog of Wall will fail when casted on top of a Volcano/Violent Gale
[Skotlex]
* Applied FlavioJS's fix to the npc whisper system. [Skotlex]
diff --git a/db/Changelog.txt b/db/Changelog.txt
index afe7e8161..3e897eb53 100644
--- a/db/Changelog.txt
+++ b/db/Changelog.txt
@@ -19,6 +19,9 @@
-----
========================
+11/10
+ * Removed the inf2 = TRAP of FirePillar and Spider Web so they are blocked
+ by Land Protector. [Skotlex]
11/09
* More accurate Max HP values for TK/SG/SL/GS/NJ [Playtester]
- TK/SG/SL are official up to level 70
diff --git a/db/skill_db.txt b/db/skill_db.txt
index 78b776dcc..8072c67fb 100644
--- a/db/skill_db.txt
+++ b/db/skill_db.txt
@@ -103,7 +103,7 @@
77,5,6,1,6,0,0,10,1,yes,0,0,0,magic,0 //PR_TURNUNDEAD#Turn Undead#
78,9,6,1,0,1,0,1,0,yes,0,0,0,magic,0 //PR_LEXAETERNA#Lex Aeterna#
79,9,8,2,6,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0 //PR_MAGNUS#Magnus Exorcismus#
-80,9,8,2,3,0,1:1:1:1:1:2:2:2:2:2:2,10,3:4:5:6:7:8:9:10:11:12:12,yes,0,128,5,magic,0 //WZ_FIREPILLAR#Fire Pillar#
+80,9,8,2,3,0,1:1:1:1:1:2:2:2:2:2:2,10,3:4:5:6:7:8:9:10:11:12:12,yes,0,0,5,magic,0 //WZ_FIREPILLAR#Fire Pillar#
81,0,6,4,3,0,3,10,1,yes,0,0,0,magic,5 //WZ_SIGHTRASHER#Sightrasher#
//82,9,6,2,3,0,0,10,1,yes,0,0,0,magic,0 //WZ_FIREIVY#Fire Ivy#
83,9,8,2,3,0,3:3:3:3:3:3:3:3:3:3:14,10,1:1:2:2:3:3:4:4:5:5:15,yes,0,0,0,magic,0 //WZ_METEOR#Meteor Storm#
@@ -428,7 +428,7 @@
402,9,6,1,0,1,0,5,1,no,0,0,0,none,0 //PF_MINDBREAKER#Mind Breaker#
403,0,0,4,0,1,0,1,1,yes,0,0,0,magic,0 //PF_MEMORIZE#Foresight#
404,9,6,2,2,1,0,5,1,yes,0,256,2,magic,0 //PF_FOGWALL#Blinding Mist#
-405,7,6,1,0,1,0,1,1,no,0,128,3,magic,0 //PF_SPIDERWEB#Fiber Lock#
+405,7,6,1,0,1,0,1,1,no,0,0,3,magic,0 //PF_SPIDERWEB#Fiber Lock#
406,0,6,4,-1,2,2,10,1,no,33,0,0,weapon,0 //ASC_METEORASSAULT#Meteor Assault#
407,0,6,4,0,1,0,1,0,no,0,0,0,none,0 //ASC_CDP#Create Deadly Poison#
408,9,6,4,0,1,0,1,1,yes,0,4,0,none,0 //WE_BABY#Baby#
diff --git a/src/map/skill.c b/src/map/skill.c
index da6244a3f..3e10a6780 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -719,7 +719,7 @@ int skill_attack_area(struct block_list *bl,va_list ap);
struct skill_unit_group *skill_locate_element_field(struct block_list *bl); // [Skotlex]
int skill_graffitiremover(struct block_list *bl, va_list ap); // [Valaris]
int skill_greed(struct block_list *bl, va_list ap);
-int skill_landprotector(struct block_list *bl, va_list ap);
+int skill_cell_overlap(struct block_list *bl, va_list ap);
int skill_ganbatein(struct block_list *bl, va_list ap);
int skill_trap_splash(struct block_list *bl, va_list ap);
int skill_count_target(struct block_list *bl, va_list ap);
@@ -6661,16 +6661,6 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid,
val1 = 55 + skilllv*5; //Elemental Resistance
val2 = skilllv*10; //Status ailment resistance
break;
- case PF_FOGWALL:
- //When casted on top of Volcano/Violent Gale it fails.
- if (map_find_skill_unit_oncell(src,x,y,SA_VOLCANO,NULL) ||
- map_find_skill_unit_oncell(src,x,y,SA_VIOLENTGALE,NULL))
- return NULL;
- //When casted on top of Deluge/Suiton: Double duration.
- if (map_find_skill_unit_oncell(src,x,y,SA_DELUGE,NULL) ||
- map_find_skill_unit_oncell(src,x,y,NJ_SUITON,NULL))
- limit *= 2;
- break;
case RG_GRAFFITI: /* Graffiti */
count=1; // Leave this at 1 [Valaris]
break;
@@ -6791,7 +6781,7 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid,
break;
}
if(range<=0)
- map_foreachincell(skill_landprotector,src->m,ux,uy,BL_SKILL,skillid,&alive, src);
+ map_foreachincell(skill_cell_overlap,src->m,ux,uy,BL_SKILL,skillid,&alive, src);
if(alive && map_getcell(src->m,ux,uy,CELL_CHKWALL))
alive = 0;
@@ -6818,6 +6808,12 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid,
nullpo_retr(NULL, unit=skill_initunit(group,i,ux,uy,val1,val2));
unit->limit=limit;
unit->range=range;
+
+ if (skillid == PF_FOGWALL && alive == 2)
+ { //Double duration of cells on top of Deluge/Suiton
+ unit->limit *= 2;
+ group->limit = unit->limit;
+ }
if (range==0 && active_flag)
map_foreachincell(skill_unit_effect,unit->bl.m,
@@ -9285,7 +9281,7 @@ int skill_greed (struct block_list *bl, va_list ap)
*
*------------------------------------------
*/
-int skill_landprotector (struct block_list *bl, va_list ap)
+int skill_cell_overlap(struct block_list *bl, va_list ap)
{
int skillid;
int *alive;
@@ -9296,7 +9292,7 @@ int skill_landprotector (struct block_list *bl, va_list ap)
alive = va_arg(ap,int *);
src = va_arg(ap,struct block_list *);
unit = (struct skill_unit *)bl;
- if (unit == NULL || unit->group == NULL)
+ if (unit == NULL || unit->group == NULL || (*alive) == 0)
return 0;
switch (skillid)
@@ -9311,8 +9307,8 @@ int skill_landprotector (struct block_list *bl, va_list ap)
}
//Delete the rest of types.
case HW_GANBANTEIN:
- if(!unit->group->state.song_dance)
- { //It deletes everything except songs/dances/encores.
+ if(!skill_get_inf2(unit->group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP))
+ { //It deletes everything except songs/dances
skill_delunit(unit, 1);
return 1;
}
@@ -9334,6 +9330,20 @@ int skill_landprotector (struct block_list *bl, va_list ap)
return 1;
}
break;
+ case PF_FOGWALL:
+ switch(unit->group->skill_id)
+ {
+ case SA_VOLCANO: //Can't be placed on top of these
+ case SA_VIOLENTGALE:
+ (*alive) = 0;
+ return 1;
+ case SA_DELUGE:
+ case NJ_SUITON:
+ //Cheap 'hack' to notify the calling function that duration should be doubled [Skotlex]
+ (*alive) = 2;
+ break;
+ }
+ break;
case HP_BASILICA:
if (unit->group->skill_id == HP_BASILICA)
{ //Basilica can't be placed on top of itself to avoid map-cell stacking problems. [Skotlex]
@@ -9343,8 +9353,8 @@ int skill_landprotector (struct block_list *bl, va_list ap)
break;
}
if (unit->group->skill_id == SA_LANDPROTECTOR &&
- !(skill_get_unit_flag(skillid)&(UF_DANCE|UF_SONG|UF_ENSEMBLE)))
- { //It deletes everything except songs/dances/encores.
+ !(skill_get_inf2(skillid)&(INF2_SONG_DANCE|INF2_TRAP)))
+ { //It deletes everything except songs/dances/traps
(*alive) = 0;
return 1;
}
@@ -9353,7 +9363,7 @@ int skill_landprotector (struct block_list *bl, va_list ap)
}
/*==========================================
- * variation of skill_landprotector
+ * variation of skill_cell_overlap
*------------------------------------------
*/
int skill_ganbatein (struct block_list *bl, va_list ap)
@@ -9365,8 +9375,8 @@ int skill_ganbatein (struct block_list *bl, va_list ap)
if ((unit = (struct skill_unit *)bl) == NULL || unit->group == NULL)
return 0;
- if (unit->group->state.song_dance)
- return 0; //Don't touch song/dance/ensemble.
+ if (unit->group->state.song_dance&0x1)
+ return 0; //Don't touch song/dance.
if (unit->group->skill_id == SA_LANDPROTECTOR)
skill_delunit(unit, 1);
@@ -9916,7 +9926,7 @@ int skill_unit_timer_sub_onplace (struct block_list *bl, va_list ap)
nullpo_retr(0, group=unit->group);
- if (skill_get_type(group->skill_id)==BF_MAGIC
+ if (!skill_get_inf2(group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP)
&& map_getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR))
return 0; //AoE skills are ineffective. [Skotlex]