* Venom Splasher fixes according to bugreport:230

- added passive skillv*30% bonus from Poison React
- added official splash damage calculation - damage gets split by the number of targets at range 1, then applied to all targets in range 2
- reverted some very old code - clif_calc_delay() - that was preventing skills from displaying properly, by erroneously assuming that if the target has ddelay 0, it has endure effect activated
- TODO: the skill should not consume a gemstone when it fails

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11494 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
ultramage 2007-10-16 23:24:39 +00:00
parent 425112aef3
commit 472e15c188
4 changed files with 20 additions and 16 deletions

View File

@ -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. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2007/10/16 2007/10/16
* Venom Splasher fixes according to bugreport:230
- added passive skillv*30% bonus from Poison React
- added official splash damage calculation - damage gets split by the
number of targets at range 1, then applied to all targets in range 2
- reverted some very old code - clif_calc_delay() - that was preventing
skills from displaying properly, by erroneously assuming that
if the target has ddelay 0, it has endure effect activated
* Fixed displaying of several splash skills (see bugreport:238) * Fixed displaying of several splash skills (see bugreport:238)
- added flag SD_PREAMBLE for skills that need the 'magic' packet - added flag SD_PREAMBLE for skills that need the 'magic' packet
(fixes Grimtooth / Cart Revolution displaying out of sync) (fixes Grimtooth / Cart Revolution displaying out of sync)

View File

@ -1464,9 +1464,9 @@ static struct Damage battle_calc_weapon_attack(
skillratio += 100+100*skill_lv; skillratio += 100+100*skill_lv;
break; break;
case AS_SPLASHER: case AS_SPLASHER:
i = 400+50*skill_lv; skillratio += 400+50*skill_lv;
if (wflag>1) i /= 4; // FIXME: Should be 25% of damage inflicted to target, not 25% of skillratio bonus if(sd)
skillratio += i; skillratio += 30 * pc_checkskill(sd,AS_POISONREACT);
break; break;
case ASC_BREAKER: case ASC_BREAKER:
skillratio += 100*skill_lv-100; skillratio += 100*skill_lv-100;

View File

@ -3712,9 +3712,6 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl)
} }
} }
//Modifies the type of damage according to status changes [Skotlex]
#define clif_calc_delay(type,delay) (type==1||type==4||type==0x0a)?type:(delay==0?9:type)
/*========================================== /*==========================================
* Estimates walk delay based on the damage criteria. [Skotlex] * Estimates walk delay based on the damage criteria. [Skotlex]
*------------------------------------------*/ *------------------------------------------*/
@ -3758,10 +3755,10 @@ int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tic
nullpo_retr(0, src); nullpo_retr(0, src);
nullpo_retr(0, dst); nullpo_retr(0, dst);
type = clif_calc_delay(type, ddelay); //Type defaults to 0 for normal attacks.
sc = status_get_sc(dst); sc = status_get_sc(dst);
if(sc && sc->count) { if(sc && sc->count) {
if(type != 4 && dst->type == BL_PC && sc->data[SC_ENDURE].timer != -1 && !map_flag_gvg(dst->m))
type = 9;
if(sc->data[SC_HALLUCINATION].timer != -1) { if(sc->data[SC_HALLUCINATION].timer != -1) {
if(damage > 0) damage = damage*(5+sc->data[SC_HALLUCINATION].val1) + rand()%100; if(damage > 0) damage = damage*(5+sc->data[SC_HALLUCINATION].val1) + rand()%100;
if(damage2 > 0) damage2 = damage2*(5+sc->data[SC_HALLUCINATION].val1) + rand()%100; if(damage2 > 0) damage2 = damage2*(5+sc->data[SC_HALLUCINATION].val1) + rand()%100;
@ -4329,11 +4326,10 @@ int clif_skill_damage(struct block_list *src,struct block_list *dst,unsigned int
nullpo_retr(0, src); nullpo_retr(0, src);
nullpo_retr(0, dst); nullpo_retr(0, dst);
if( type == 0 ) type = skill_get_hit(skill_id);
type = clif_calc_delay(type, ddelay);
sc = status_get_sc(dst); sc = status_get_sc(dst);
if(sc && sc->count) { if(sc && sc->count) {
if(type != 4 && dst->type == BL_PC && sc->data[SC_ENDURE].timer != -1 && !map_flag_gvg(dst->m))
type = 9;
if(sc->data[SC_HALLUCINATION].timer != -1 && damage > 0) if(sc->data[SC_HALLUCINATION].timer != -1 && damage > 0)
damage = damage*(5+sc->data[SC_HALLUCINATION].val1) + rand()%100; damage = damage*(5+sc->data[SC_HALLUCINATION].val1) + rand()%100;
} }

View File

@ -3126,8 +3126,9 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
// if skill damage should be split among targets, count them // if skill damage should be split among targets, count them
//SD_LEVEL -> Forced splash damage for Auto Blitz-Beat -> count targets //SD_LEVEL -> Forced splash damage for Auto Blitz-Beat -> count targets
//special case: Venom Splasher uses a different range for searching than for splashing
if( flag&SD_LEVEL || skill_get_nk(skillid)&NK_SPLASHSPLIT ) if( flag&SD_LEVEL || skill_get_nk(skillid)&NK_SPLASHSPLIT )
skill_area_temp[0] = map_foreachinrange(skill_area_sub, bl, skill_get_splash(skillid, skilllv), BL_CHAR, src, skillid, skilllv, tick, BCT_ENEMY, skill_area_sub_count); skill_area_temp[0] = map_foreachinrange(skill_area_sub, bl, (skillid == AS_SPLASHER)?1:skill_get_splash(skillid, skilllv), BL_CHAR, src, skillid, skilllv, tick, BCT_ENEMY, skill_area_sub_count);
// recursive invocation of skill_castend_damage_id() with flag|1 // recursive invocation of skill_castend_damage_id() with flag|1
map_foreachinrange(skill_area_sub, bl, skill_get_splash(skillid, skilllv), splash_target(src), src, skillid, skilllv, tick, flag|BCT_ENEMY|1, skill_castend_damage_id); map_foreachinrange(skill_area_sub, bl, skill_get_splash(skillid, skilllv), splash_target(src), src, skillid, skilllv, tick, flag|BCT_ENEMY|1, skill_castend_damage_id);
@ -5256,8 +5257,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
return 1; return 1;
} }
clif_skill_nodamage(src,bl,skillid,skilllv, clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start4(bl,type,100, sc_start4(bl,type,100,skilllv,skillid,src->id,skill_get_time(skillid,skilllv),1000));
skilllv,skillid,src->id,skill_get_time(skillid,skilllv),1000)); if (sd) skill_blockpc_start (sd, skillid, skill_get_time(skillid, skilllv)+3000);
break; break;
case PF_MINDBREAKER: case PF_MINDBREAKER:
@ -5938,9 +5939,9 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data)
map_freeblock_unlock(); map_freeblock_unlock();
return 1; return 1;
} while(0); } while(0);
//Skill failed. //Skill failed.
if (ud->skillid == MO_EXTREMITYFIST && sd && if (ud->skillid == MO_EXTREMITYFIST && sd && !(sc && sc->count && sc->data[SC_FOGWALL].timer != -1))
!(sc && sc->count && sc->data[SC_FOGWALL].timer != -1))
{ //When Asura fails... (except when it fails from Fog of Wall) { //When Asura fails... (except when it fails from Fog of Wall)
//Consume SP/spheres //Consume SP/spheres
skill_check_condition(sd,ud->skillid, ud->skilllv,1); skill_check_condition(sd,ud->skillid, ud->skilllv,1);