- Fixed incorrect range check in autospell2 triggers.
- Modified Wedding recall skills to behave as in officials. - Modified Arrow Shower to be a ground-based skill and work as it should on officials. - Fixed skill_additional_effect triggering every time you were being hit even if no damage was returned. - Fixed battle_calc_damage_return to make magic damage be returned by 100%, and received damage nullified git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5598 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
26841613d9
commit
2f09d39c17
@ -5,6 +5,14 @@ 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
|
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
|
||||||
|
|
||||||
2006/03/14
|
2006/03/14
|
||||||
|
* Fixed incorrect range check in autospell-when-hit triggers. [Skotlex]
|
||||||
|
* Modified Wedding recall skills to behave as in official [Skotlex]
|
||||||
|
* Modified Arrow Shower to be a ground-based skill and work as it should on
|
||||||
|
officials. However, the unit_id is still unknown. [Skotlex]
|
||||||
|
* Fixed skill_additional_effect triggering every time you were being hit
|
||||||
|
even if no damage was returned. [Skotlex]
|
||||||
|
* Fixed battle_calc_damage_return to make magic damage be returned by 100%,
|
||||||
|
and received damage nullified. [Skotlex]
|
||||||
* Changed a bit status_check_skilluse to check for dead characters, should
|
* Changed a bit status_check_skilluse to check for dead characters, should
|
||||||
fix all the weird attack/attacked while dead bugs. [Skotlex]
|
fix all the weird attack/attacked while dead bugs. [Skotlex]
|
||||||
* Fixed player auto-attack not cancelling when dead. [Skotlex]
|
* Fixed player auto-attack not cancelling when dead. [Skotlex]
|
||||||
|
|||||||
@ -25,6 +25,10 @@
|
|||||||
-----
|
-----
|
||||||
|
|
||||||
=========================
|
=========================
|
||||||
|
03/14
|
||||||
|
* Modified skill entries for the Wedding recall skills. Updated their
|
||||||
|
splash value to signal the area around the caster where the warp will be
|
||||||
|
placed. [Skotlex]
|
||||||
03/13
|
03/13
|
||||||
* Changed the mode of the crystals to 193 (can move, can attack, plants)
|
* Changed the mode of the crystals to 193 (can move, can attack, plants)
|
||||||
[Skotlex]
|
[Skotlex]
|
||||||
|
|||||||
@ -653,9 +653,9 @@
|
|||||||
//-- WE_BABY
|
//-- WE_BABY
|
||||||
408,3000,0,0,300000,0
|
408,3000,0,0,300000,0
|
||||||
//-- WE_CALLPARENT
|
//-- WE_CALLPARENT
|
||||||
409,20000,0,0,0,0
|
409,0,0,0,20000,0
|
||||||
//-- WE_CALLBABY
|
//-- WE_CALLBABY
|
||||||
410,20000,0,0,0,0
|
410,0,0,0,20000,0
|
||||||
//==========================================
|
//==========================================
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -355,7 +355,7 @@
|
|||||||
333,0,6,4,0,1,0,1,0,no,0,2,0,none,0 //NPC_REVENGE
|
333,0,6,4,0,1,0,1,0,no,0,2,0,none,0 //NPC_REVENGE
|
||||||
334,9,6,4,0,1,0,1,1,yes,0,4,0,none,0 //WE_MALE#I Will Protect You#
|
334,9,6,4,0,1,0,1,1,yes,0,4,0,none,0 //WE_MALE#I Will Protect You#
|
||||||
335,9,6,4,0,1,0,1,1,yes,0,4,0,none,0 //WE_FEMALE#I Look up to You#
|
335,9,6,4,0,1,0,1,1,yes,0,4,0,none,0 //WE_FEMALE#I Look up to You#
|
||||||
336,9,6,4,0,1,0,1,1,yes,0,4,1,none,0 //WE_CALLPARTNER#I miss You#
|
336,9,6,4,0,1,3,1,1,yes,0,4,1,none,0 //WE_CALLPARTNER#I miss You#
|
||||||
337,9,6,1,-1,0,0,1,1,no,0,0,0,weapon,0 //ITM_TOMAHAWK#Throw Tomahawk#
|
337,9,6,1,-1,0,0,1,1,no,0,0,0,weapon,0 //ITM_TOMAHAWK#Throw Tomahawk#
|
||||||
338,-1,8,1,7,0,0,0,-2,no,0,2,0,weapon,0 //NPC_DARKCROSS#Cross of Darkness#
|
338,-1,8,1,7,0,0,0,-2,no,0,2,0,weapon,0 //NPC_DARKCROSS#Cross of Darkness#
|
||||||
339,0,6,4,7,0,0,10,1,no,33,258,0,magic,0 //NPC_GRANDDARKNESS#Grand cross of Darkness#
|
339,0,6,4,7,0,0,10,1,no,33,258,0,magic,0 //NPC_GRANDDARKNESS#Grand cross of Darkness#
|
||||||
@ -428,8 +428,8 @@
|
|||||||
406,0,6,4,-1,2,2,10,1,no,33,0,0,weapon,0 //ASC_METEORASSAULT#Meteor Assault#
|
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#
|
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#
|
408,9,6,4,0,1,0,1,1,yes,0,4,0,none,0 //WE_BABY#Baby#
|
||||||
409,9,6,4,0,1,0,1,1,yes,0,4,0,none,0 //WE_CALLPARENT#Call Parent#
|
409,9,6,4,0,1,3,1,1,yes,0,4,1,none,0 //WE_CALLPARENT#Call Parent#
|
||||||
410,9,6,4,0,1,0,1,1,yes,0,4,0,none,0 //WE_CALLBABY#Call Baby#
|
410,9,6,4,0,1,3,1,1,yes,0,4,1,none,0 //WE_CALLBABY#Call Baby#
|
||||||
411,0,6,4,0,1,0,10,1,yes,0,0,0,misc,0 //TK_RUN#Running#
|
411,0,6,4,0,1,0,10,1,yes,0,0,0,misc,0 //TK_RUN#Running#
|
||||||
412,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0 //TK_READYSTORM#Prepare Whirlwind#
|
412,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0 //TK_READYSTORM#Prepare Whirlwind#
|
||||||
413,0,6,4,-1,2,2,7,1,no,0,512,0,weapon,0 //TK_STORMKICK#Whirlwind Kick#
|
413,0,6,4,-1,2,2,7,1,no,0,512,0,weapon,0 //TK_STORMKICK#Whirlwind Kick#
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
21,0x86, , 0, 2,1000,enemy, 0x008 //MG_THUNDERSTORM#サンダーストーム
|
21,0x86, , 0, 2,1000,enemy, 0x008 //MG_THUNDERSTORM#サンダーストーム
|
||||||
25,0x85, , 1, 0, -1,all, 0x003 //AL_PNEUMA#ニューマ
|
25,0x85, , 1, 0, -1,all, 0x003 //AL_PNEUMA#ニューマ
|
||||||
27,0x81,0x80, 0, 0, -1,all, 0x006 //AL_WARP#ワープポータル
|
27,0x81,0x80, 0, 0, -1,all, 0x006 //AL_WARP#ワープポータル
|
||||||
|
47,0x86, , 0, 2,1000,enemy, 0x080 //AC_SHOWER
|
||||||
70,0x83, , -1, 1,1000,all, 0x008 //PR_SANCTUARY#サンクチュアリ
|
70,0x83, , -1, 1,1000,all, 0x008 //PR_SANCTUARY#サンクチュアリ
|
||||||
79,0x84, , -1, 1,3000,enemy, 0x008 //PR_MAGNUS#マグヌスエクソシズム
|
79,0x84, , -1, 1,3000,enemy, 0x008 //PR_MAGNUS#マグヌスエクソシズム
|
||||||
80,0x87,0x88, 0, 1,2000,enemy, 0x002 //WZ_FIREPILLAR#ファイアーピラー
|
80,0x87,0x88, 0, 1,2000,enemy, 0x002 //WZ_FIREPILLAR#ファイアーピラー
|
||||||
@ -78,6 +79,8 @@
|
|||||||
369,0xb3, , -1, 0,10000,all, 0x000 //PA_GOSPEL#ゴスペル
|
369,0xb3, , -1, 0,10000,all, 0x000 //PA_GOSPEL#ゴスペル
|
||||||
404,0xb6, , -1, 0, -1,all, 0x000 //PF_FOGWALL#フォグウォール
|
404,0xb6, , -1, 0, -1,all, 0x000 //PF_FOGWALL#フォグウォール
|
||||||
405,0xb7, , 0, 1,1000,enemy, 0x000 //PF_SPIDERWEB#スパイダーウェッブ
|
405,0xb7, , 0, 1,1000,enemy, 0x000 //PF_SPIDERWEB#スパイダーウェッブ
|
||||||
|
409,0xb2, , 0,-1, -1,noone, 0x000 //WE_CALLBABY
|
||||||
|
410,0xb2, , 0,-1, -1,noone, 0x000 //WE_CALLPARENT
|
||||||
484,0xb8, , 2, 0,1000,enemy, 0x808 //HW_GRAVITATION
|
484,0xb8, , 2, 0,1000,enemy, 0x808 //HW_GRAVITATION
|
||||||
488,0xb9, , 3, 0, -1,all, 0x000 //CG_HERMODE
|
488,0xb9, , 3, 0, -1,all, 0x000 //CG_HERMODE
|
||||||
535,0xba, , 2, 0,1000,enemy, 0x008 //NJ_KAENSIN#NJ_KAENSIN#
|
535,0xba, , 2, 0,1000,enemy, 0x008 //NJ_KAENSIN#NJ_KAENSIN#
|
||||||
|
|||||||
@ -3116,7 +3116,7 @@ struct Damage battle_calc_attack( int attack_type,
|
|||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
int battle_calc_return_damage(struct block_list *bl, int damage, int flag) {
|
int battle_calc_return_damage(struct block_list *bl, int *damage, int flag) {
|
||||||
struct map_session_data *sd=NULL;
|
struct map_session_data *sd=NULL;
|
||||||
struct status_change *sc;
|
struct status_change *sc;
|
||||||
int rdamage = 0;
|
int rdamage = 0;
|
||||||
@ -3125,21 +3125,22 @@ int battle_calc_return_damage(struct block_list *bl, int damage, int flag) {
|
|||||||
sc = status_get_sc(bl);
|
sc = status_get_sc(bl);
|
||||||
|
|
||||||
if(flag&BF_WEAPON) {
|
if(flag&BF_WEAPON) {
|
||||||
|
//Bounces back part of the damage.
|
||||||
if (flag & BF_SHORT) {
|
if (flag & BF_SHORT) {
|
||||||
if (sd && sd->short_weapon_damage_return)
|
if (sd && sd->short_weapon_damage_return)
|
||||||
{
|
{
|
||||||
rdamage += damage * sd->short_weapon_damage_return / 100;
|
rdamage += *damage * sd->short_weapon_damage_return / 100;
|
||||||
if(rdamage < 1) rdamage = 1;
|
if(rdamage < 1) rdamage = 1;
|
||||||
}
|
}
|
||||||
if (sc && sc->data[SC_REFLECTSHIELD].timer != -1)
|
if (sc && sc->data[SC_REFLECTSHIELD].timer != -1)
|
||||||
{
|
{
|
||||||
rdamage += damage * sc->data[SC_REFLECTSHIELD].val2 / 100;
|
rdamage += *damage * sc->data[SC_REFLECTSHIELD].val2 / 100;
|
||||||
if (rdamage < 1) rdamage = 1;
|
if (rdamage < 1) rdamage = 1;
|
||||||
}
|
}
|
||||||
} else if (flag & BF_LONG) {
|
} else if (flag & BF_LONG) {
|
||||||
if (sd && sd->long_weapon_damage_return)
|
if (sd && sd->long_weapon_damage_return)
|
||||||
{
|
{
|
||||||
rdamage += damage * sd->long_weapon_damage_return / 100;
|
rdamage += *damage * sd->long_weapon_damage_return / 100;
|
||||||
if (rdamage < 1) rdamage = 1;
|
if (rdamage < 1) rdamage = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3147,10 +3148,10 @@ int battle_calc_return_damage(struct block_list *bl, int damage, int flag) {
|
|||||||
// magic_damage_return by [AppleGirl] and [Valaris]
|
// magic_damage_return by [AppleGirl] and [Valaris]
|
||||||
if(flag&BF_MAGIC)
|
if(flag&BF_MAGIC)
|
||||||
{
|
{
|
||||||
if(sd && sd->magic_damage_return > 0 )
|
if(sd && sd->magic_damage_return && rand()%100 < sd->magic_damage_return)
|
||||||
{
|
{ //Bounces back full damage, you take none.
|
||||||
rdamage += damage * sd->magic_damage_return / 100;
|
rdamage = *damage;
|
||||||
if(rdamage < 1) rdamage = 1;
|
*damage = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rdamage;
|
return rdamage;
|
||||||
@ -3252,12 +3253,13 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
|
|||||||
|
|
||||||
damage = wd.damage + wd.damage2;
|
damage = wd.damage + wd.damage2;
|
||||||
if (damage > 0 && src != target) {
|
if (damage > 0 && src != target) {
|
||||||
rdamage = battle_calc_return_damage(target, damage, wd.flag);
|
rdamage = battle_calc_return_damage(target, &damage, wd.flag);
|
||||||
if (rdamage > 0)
|
if (rdamage > 0) {
|
||||||
clif_damage(src, src, tick, wd.amotion, wd.dmotion, rdamage, 1, 4, 0);
|
clif_damage(src, src, tick, wd.amotion, wd.dmotion, rdamage, 1, 4, 0);
|
||||||
//Use Reflect Shield to signal this kind of skill trigger. [Skotlex]
|
//Use Reflect Shield to signal this kind of skill trigger. [Skotlex]
|
||||||
skill_additional_effect(target,src,CR_REFLECTSHIELD, 1,BF_WEAPON,tick);
|
skill_additional_effect(target,src,CR_REFLECTSHIELD, 1,BF_WEAPON,tick);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
clif_damage(src, target, tick, wd.amotion, wd.dmotion, wd.damage, wd.div_ , wd.type, wd.damage2);
|
clif_damage(src, target, tick, wd.amotion, wd.dmotion, wd.damage, wd.div_ , wd.type, wd.damage2);
|
||||||
//“ñ“?—¬?¶Žè‚ƃJƒ^?[ƒ‹’ÇŒ‚‚̃~ƒX•\ަ(–³—?‚â‚è?`)
|
//“ñ“?—¬?¶Žè‚ƃJƒ^?[ƒ‹’ÇŒ‚‚̃~ƒX•\ަ(–³—?‚â‚è?`)
|
||||||
|
|||||||
@ -25,7 +25,7 @@ struct block_list;
|
|||||||
|
|
||||||
struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct block_list *target,int skill_num,int skill_lv,int flag);
|
struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct block_list *target,int skill_num,int skill_lv,int flag);
|
||||||
|
|
||||||
int battle_calc_return_damage(struct block_list *bl, int damage, int flag);
|
int battle_calc_return_damage(struct block_list *bl, int *damage, int flag);
|
||||||
|
|
||||||
int battle_attr_fix(struct block_list *src, struct block_list *target, int damage,int atk_elem,int def_elem);
|
int battle_attr_fix(struct block_list *src, struct block_list *target, int damage,int atk_elem,int def_elem);
|
||||||
|
|
||||||
|
|||||||
@ -4609,7 +4609,7 @@ int clif_getareachar_skillunit(struct map_session_data *sd,struct skill_unit *un
|
|||||||
WFIFOW(fd,12)=unit->bl.y;
|
WFIFOW(fd,12)=unit->bl.y;
|
||||||
WFIFOB(fd,14)=unit->group->unit_id;
|
WFIFOB(fd,14)=unit->group->unit_id;
|
||||||
WFIFOB(fd,15)=1;
|
WFIFOB(fd,15)=1;
|
||||||
if(unit->group->unit_id==0xb0) { // Graffiti [Valaris]
|
if(unit->group->unit_id==UNT_GRAFFITI) { // Graffiti [Valaris]
|
||||||
WFIFOB(fd,16)=1;
|
WFIFOB(fd,16)=1;
|
||||||
memcpy(WFIFOP(fd,17),unit->group->valstr,MESSAGE_SIZE);
|
memcpy(WFIFOP(fd,17),unit->group->valstr,MESSAGE_SIZE);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
194
src/map/skill.c
194
src/map/skill.c
@ -1421,7 +1421,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
|
|||||||
else
|
else
|
||||||
tbl = src;
|
tbl = src;
|
||||||
|
|
||||||
if (tbl != src && !battle_check_range(src, tbl, skill_get_range2(src, skillid, skilllv)))
|
if (tbl != bl && !battle_check_range(bl, tbl, skill_get_range2(bl, skillid, skilllv)))
|
||||||
continue; //Autoskills DO check for target-src range. [Skotlex]
|
continue; //Autoskills DO check for target-src range. [Skotlex]
|
||||||
|
|
||||||
switch (skill_get_casttype(skillid)) {
|
switch (skill_get_casttype(skillid)) {
|
||||||
@ -1743,6 +1743,9 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
|
|||||||
|
|
||||||
damage = dmg.damage + dmg.damage2;
|
damage = dmg.damage + dmg.damage2;
|
||||||
|
|
||||||
|
if (damage > 0 && src != bl && src == dsrc)
|
||||||
|
rdamage = battle_calc_return_damage(bl, &damage, dmg.flag);
|
||||||
|
|
||||||
if(lv==15)
|
if(lv==15)
|
||||||
lv=-1;
|
lv=-1;
|
||||||
|
|
||||||
@ -1860,9 +1863,6 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
|
|||||||
} //Switch End
|
} //Switch End
|
||||||
}
|
}
|
||||||
|
|
||||||
if (damage > 0 && src != bl && src == dsrc)
|
|
||||||
rdamage = battle_calc_return_damage(bl, damage, dmg.flag);
|
|
||||||
|
|
||||||
//武器スキル?ここまで
|
//武器スキル?ここまで
|
||||||
switch(skillid){
|
switch(skillid){
|
||||||
case AS_SPLASHER:
|
case AS_SPLASHER:
|
||||||
@ -1987,7 +1987,7 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
|
|||||||
battle_heal(NULL,bl,0,-sp,0);
|
battle_heal(NULL,bl,0,-sp,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (/*(skillid || flag) &&*/ rdamage>0) { //Is the skillid/flag check really necessary? [Skotlex]
|
if (rdamage>0) {
|
||||||
if (attack_type&BF_WEAPON)
|
if (attack_type&BF_WEAPON)
|
||||||
battle_delay_damage(tick+dmg.amotion,bl,src,0,0,0,rdamage,ATK_DEF,0);
|
battle_delay_damage(tick+dmg.amotion,bl,src,0,0,0,rdamage,ATK_DEF,0);
|
||||||
else
|
else
|
||||||
@ -2541,7 +2541,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s
|
|||||||
case MC_MAMMONITE: /* <20>?マ?ナイト */
|
case MC_MAMMONITE: /* <20>?マ?ナイト */
|
||||||
case TF_DOUBLE:
|
case TF_DOUBLE:
|
||||||
case AC_DOUBLE: /* ダブルストレイフィング */
|
case AC_DOUBLE: /* ダブルストレイフィング */
|
||||||
case AC_SHOWER: /* ƒAƒ??ƒVƒƒƒ?? */
|
|
||||||
case AS_SONICBLOW: /* ソニックブ<E382AF>?? */
|
case AS_SONICBLOW: /* ソニックブ<E382AF>?? */
|
||||||
case KN_PIERCE: /* ピア?ス */
|
case KN_PIERCE: /* ピア?ス */
|
||||||
case KN_SPEARBOOMERANG: /* スピアブ?<3F>?ラン */
|
case KN_SPEARBOOMERANG: /* スピアブ?<3F>?ラン */
|
||||||
@ -2770,6 +2769,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s
|
|||||||
case AS_GRIMTOOTH: /* グリムトゥ?ス */
|
case AS_GRIMTOOTH: /* グリムトゥ?ス */
|
||||||
case MC_CARTREVOLUTION: /* カ?トレヴォリュ?ション */
|
case MC_CARTREVOLUTION: /* カ?トレヴォリュ?ション */
|
||||||
case NPC_SPLASHATTACK: /* スプラッシュアタック */
|
case NPC_SPLASHATTACK: /* スプラッシュアタック */
|
||||||
|
case AC_SHOWER: //Targetted skill implementation.
|
||||||
if(flag&1){
|
if(flag&1){
|
||||||
/* 個別にダ<E381AB>??ジを?える */
|
/* 個別にダ<E381AB>??ジを?える */
|
||||||
if(bl->id!=skill_area_temp[1]){
|
if(bl->id!=skill_area_temp[1]){
|
||||||
@ -2778,15 +2778,12 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
skill_area_temp[1]=bl->id;
|
skill_area_temp[1]=bl->id;
|
||||||
skill_area_temp[2]=bl->x;
|
|
||||||
skill_area_temp[3]=bl->y;
|
|
||||||
/* ‚Ü‚¸ƒ^?ƒQƒbƒg‚É?U?‚ð‰Á‚¦‚é */
|
|
||||||
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0);
|
|
||||||
/* ‚»‚ÌŒãƒ^?ƒQƒbƒgˆÈŠO‚Ì”Í??‚Ì“G‘S?‚É?—?‚ð?s‚¤ */
|
|
||||||
map_foreachinrange(skill_area_sub, bl,
|
map_foreachinrange(skill_area_sub, bl,
|
||||||
skill_get_splash(skillid, skilllv), BL_CHAR,
|
skill_get_splash(skillid, skilllv), BL_CHAR,
|
||||||
src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
|
src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
|
||||||
skill_castend_damage_id);
|
skill_castend_damage_id);
|
||||||
|
//Skill-attack at the end in case it has knockback. [Skotlex]
|
||||||
|
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -3279,10 +3276,26 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|
|||||||
break;
|
break;
|
||||||
case NPC_SMOKING: //Since it is a self skill, this one ends here rather than in damage_id. [Skotlex]
|
case NPC_SMOKING: //Since it is a self skill, this one ends here rather than in damage_id. [Skotlex]
|
||||||
return skill_castend_damage_id (src, bl, skillid, skilllv, tick, flag);
|
return skill_castend_damage_id (src, bl, skillid, skilllv, tick, flag);
|
||||||
|
case WE_CALLPARTNER:
|
||||||
|
case WE_CALLPARENT:
|
||||||
|
case WE_CALLBABY:
|
||||||
|
{ //Find a random spot to place the skill. [Skotlex]
|
||||||
|
short x,y;
|
||||||
|
i = skill_get_splash(skillid, skilllv);
|
||||||
|
x = src->x + i;
|
||||||
|
y = src->y + i;
|
||||||
|
if (map_random_dir(src, &x, &y))
|
||||||
|
return skill_castend_pos2(src,x,y,skillid,skilllv,tick,0);
|
||||||
|
else {
|
||||||
|
if (sd) clif_skill_fail(sd,skillid,0,0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
case CR_GRANDCROSS:
|
case CR_GRANDCROSS:
|
||||||
case NPC_GRANDDARKNESS:
|
case NPC_GRANDDARKNESS:
|
||||||
//These two are actually ground placed.
|
//These are actually ground placed.
|
||||||
return skill_castend_pos2(src,src->x,src->y,skillid,skilllv,tick,0);
|
return skill_castend_pos2(src,src->x,src->y,skillid,skilllv,tick,0);
|
||||||
|
|
||||||
//Until they're at right position - gs_ground- [Vicious]
|
//Until they're at right position - gs_ground- [Vicious]
|
||||||
case NJ_KAENSIN:
|
case NJ_KAENSIN:
|
||||||
case NJ_HYOUSYOURAKU:
|
case NJ_HYOUSYOURAKU:
|
||||||
@ -5070,23 +5083,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WE_CALLPARTNER: /* ‚ ‚È‚½‚É?‚¢‚½‚¢ */
|
|
||||||
if(sd){
|
|
||||||
if((dstsd = pc_get_partner(sd)) == NULL){
|
|
||||||
clif_skill_fail(sd,skillid,0,0);
|
|
||||||
map_freeblock_unlock();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if(map[sd->bl.m].flag.nomemo || map[sd->bl.m].flag.nowarpto || map[dstsd->bl.m].flag.nowarp){
|
|
||||||
clif_skill_teleportmessage(sd,1);
|
|
||||||
map_freeblock_unlock();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
skill_unitsetting(src,skillid,skilllv,sd->bl.x,sd->bl.y,0);
|
|
||||||
pc_blockskill_start (sd, skillid, skill_get_time(skillid, skilllv));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
// parent-baby skills
|
// parent-baby skills
|
||||||
case WE_BABY:
|
case WE_BABY:
|
||||||
if(sd){
|
if(sd){
|
||||||
@ -5104,49 +5100,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WE_CALLPARENT:
|
|
||||||
if(sd){
|
|
||||||
struct map_session_data *f_sd = pc_get_father(sd);
|
|
||||||
struct map_session_data *m_sd = pc_get_mother(sd);
|
|
||||||
// if neither was found
|
|
||||||
if(!f_sd && !m_sd){
|
|
||||||
clif_skill_fail(sd,skillid,0,0);
|
|
||||||
map_freeblock_unlock();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if(map[sd->bl.m].flag.nomemo || map[sd->bl.m].flag.nowarpto)
|
|
||||||
{
|
|
||||||
clif_skill_teleportmessage(sd,1);
|
|
||||||
map_freeblock_unlock();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if((!f_sd && m_sd && map[m_sd->bl.m].flag.nowarp) ||
|
|
||||||
(!m_sd && f_sd && map[f_sd->bl.m].flag.nowarp))
|
|
||||||
{ //Case where neither one can be warped.
|
|
||||||
clif_skill_teleportmessage(sd,1);
|
|
||||||
map_freeblock_unlock();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
//Warp those that can be warped.
|
|
||||||
if (f_sd && !map[f_sd->bl.m].flag.nowarp)
|
|
||||||
pc_setpos(f_sd,map[sd->bl.m].index,sd->bl.x,sd->bl.y,3);
|
|
||||||
if (m_sd && !map[m_sd->bl.m].flag.nowarp)
|
|
||||||
pc_setpos(m_sd,map[sd->bl.m].index,sd->bl.x,sd->bl.y,3);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WE_CALLBABY:
|
|
||||||
if(sd && dstsd)
|
|
||||||
{
|
|
||||||
if(map[sd->bl.m].flag.nomemo || map[sd->bl.m].flag.nowarpto || map[dstsd->bl.m].flag.nowarp){
|
|
||||||
clif_skill_teleportmessage(sd,1);
|
|
||||||
map_freeblock_unlock();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
pc_setpos(dstsd,map[sd->bl.m].index,sd->bl.x,sd->bl.y,3);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PF_HPCONVERSION: /* ライフ置き換え */
|
case PF_HPCONVERSION: /* ライフ置き換え */
|
||||||
clif_skill_nodamage(src, bl, skillid, skilllv, 1);
|
clif_skill_nodamage(src, bl, skillid, skilllv, 1);
|
||||||
if (sd) {
|
if (sd) {
|
||||||
@ -5979,8 +5932,7 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
|
|||||||
if(skillid != WZ_METEOR &&
|
if(skillid != WZ_METEOR &&
|
||||||
skillid != AM_CANNIBALIZE &&
|
skillid != AM_CANNIBALIZE &&
|
||||||
skillid != AM_SPHEREMINE &&
|
skillid != AM_SPHEREMINE &&
|
||||||
skillid != CR_CULTIVATION &&
|
skillid != CR_CULTIVATION)
|
||||||
skillid != AC_SHOWER)
|
|
||||||
clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
|
clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
|
||||||
|
|
||||||
switch(skillid)
|
switch(skillid)
|
||||||
@ -5998,17 +5950,6 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
|
|||||||
skill_castend_damage_id);
|
skill_castend_damage_id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AC_SHOWER:
|
|
||||||
{ //One of the few skills that can attack traps.
|
|
||||||
i = skill_get_splash(skillid, skilllv);
|
|
||||||
clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
|
|
||||||
map_foreachinarea (skill_area_sub,
|
|
||||||
src->m, x-i, y-i, x+i, y+i, BL_CHAR|BL_SKILL,
|
|
||||||
src, skillid, skilllv, tick, flag|BCT_ENEMY|1,
|
|
||||||
skill_castend_damage_id);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case BS_HAMMERFALL:
|
case BS_HAMMERFALL:
|
||||||
i = skill_get_splash(skillid, skilllv);
|
i = skill_get_splash(skillid, skilllv);
|
||||||
map_foreachinarea (skill_area_sub,
|
map_foreachinarea (skill_area_sub,
|
||||||
@ -6052,6 +5993,10 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
|
|||||||
case PF_FOGWALL: /* フォグウォ?ル */
|
case PF_FOGWALL: /* フォグウォ?ル */
|
||||||
case PF_SPIDERWEB: /* スパイダ?ウェッブ */
|
case PF_SPIDERWEB: /* スパイダ?ウェッブ */
|
||||||
case HT_TALKIEBOX: /* ト?キ?ボックス */
|
case HT_TALKIEBOX: /* ト?キ?ボックス */
|
||||||
|
case WE_CALLPARTNER:
|
||||||
|
case WE_CALLPARENT:
|
||||||
|
case WE_CALLBABY:
|
||||||
|
case AC_SHOWER: //Ground-placed skill implementation.
|
||||||
skill_unitsetting(src,skillid,skilllv,x,y,0);
|
skill_unitsetting(src,skillid,skilllv,x,y,0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -6423,6 +6368,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
|
|||||||
int count=0;
|
int count=0;
|
||||||
int target,interval,range,unit_flag;
|
int target,interval,range,unit_flag;
|
||||||
struct skill_unit_layout *layout;
|
struct skill_unit_layout *layout;
|
||||||
|
struct map_session_data *sd;
|
||||||
struct status_change *sc;
|
struct status_change *sc;
|
||||||
int active_flag=1;
|
int active_flag=1;
|
||||||
|
|
||||||
@ -6435,6 +6381,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
|
|||||||
unit_flag = skill_get_unit_flag(skillid);
|
unit_flag = skill_get_unit_flag(skillid);
|
||||||
layout = skill_get_unit_layout(skillid,skilllv,src,x,y);
|
layout = skill_get_unit_layout(skillid,skilllv,src,x,y);
|
||||||
|
|
||||||
|
BL_CAST(BL_PC, src, sd);
|
||||||
sc= status_get_sc(src); // for traps, firewall and fogwall - celest
|
sc= status_get_sc(src); // for traps, firewall and fogwall - celest
|
||||||
if (sc && !sc->count)
|
if (sc && !sc->count)
|
||||||
sc = NULL;
|
sc = NULL;
|
||||||
@ -6592,15 +6539,40 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
|
|||||||
val1 = 55 + skilllv*5; //Elemental Resistance
|
val1 = 55 + skilllv*5; //Elemental Resistance
|
||||||
val2 = skilllv*10; //Status ailment resistance
|
val2 = skilllv*10; //Status ailment resistance
|
||||||
break;
|
break;
|
||||||
case BD_ETERNALCHAOS:
|
|
||||||
break;
|
|
||||||
case PF_FOGWALL: /* フォグウォ?ル */
|
case PF_FOGWALL: /* フォグウォ?ル */
|
||||||
if(sc && sc->data[SC_DELUGE].timer!=-1) limit *= 2;
|
if(sc && sc->data[SC_DELUGE].timer!=-1) limit *= 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RG_GRAFFITI: /* Graffiti */
|
case RG_GRAFFITI: /* Graffiti */
|
||||||
count=1; // Leave this at 1 [Valaris]
|
count=1; // Leave this at 1 [Valaris]
|
||||||
break;
|
break;
|
||||||
|
case WE_CALLPARTNER:
|
||||||
|
if (!sd)
|
||||||
|
return NULL;
|
||||||
|
if (map[src->m].flag.nowarpto) {
|
||||||
|
clif_skill_teleportmessage(sd,1);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
val1 = sd->status.partner_id;
|
||||||
|
break;
|
||||||
|
case WE_CALLPARENT:
|
||||||
|
if (!sd)
|
||||||
|
return NULL;
|
||||||
|
if (map[src->m].flag.nowarpto) {
|
||||||
|
clif_skill_teleportmessage(sd,1);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
val1 = sd->status.father;
|
||||||
|
val2 = sd->status.mother;
|
||||||
|
break;
|
||||||
|
case WE_CALLBABY:
|
||||||
|
if (!sd)
|
||||||
|
return NULL;
|
||||||
|
if (map[src->m].flag.nowarpto) {
|
||||||
|
clif_skill_teleportmessage(sd,1);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
val1 = sd->status.child;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val3==0 && (flag&2 || (sc && sc->data[SC_MAGICPOWER].timer != -1)))
|
if (val3==0 && (flag&2 || (sc && sc->data[SC_MAGICPOWER].timer != -1)))
|
||||||
@ -6933,6 +6905,10 @@ int skill_unit_onplace_timer(struct skill_unit *src,struct block_list *bl,unsign
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case UNT_ARROWSHOWER:
|
||||||
|
skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
|
||||||
|
break;
|
||||||
|
|
||||||
case UNT_MAGIC_SKILLS:
|
case UNT_MAGIC_SKILLS:
|
||||||
skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
|
skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
|
||||||
break;
|
break;
|
||||||
@ -7386,14 +7362,14 @@ int skill_unit_onlimit(struct skill_unit *src,unsigned int tick)
|
|||||||
case UNT_ICEWALL: /* アイスウォ?ル */
|
case UNT_ICEWALL: /* アイスウォ?ル */
|
||||||
clif_changemapcell(src->bl.m,src->bl.x,src->bl.y,src->val2,1);
|
clif_changemapcell(src->bl.m,src->bl.x,src->bl.y,src->val2,1);
|
||||||
break;
|
break;
|
||||||
case UNT_CALLPARTNER: /* ‚ ‚È‚½‚É?‚¢‚½‚¢ */
|
case UNT_CALLFAMILY: /* ‚ ‚È‚½‚É?‚¢‚½‚¢ */
|
||||||
{
|
{
|
||||||
struct map_session_data *sd = NULL;
|
struct map_session_data *sd = NULL;
|
||||||
if((sd = map_id2sd(sg->src_id)) == NULL)
|
if(src->val1 && (sd = map_charid2sd(src->val1))
|
||||||
return 0;
|
&& !map[sd->bl.m].flag.nowarp)
|
||||||
if((sd = pc_get_partner(sd)) == NULL)
|
pc_setpos(sd,map[src->bl.m].index,src->bl.x,src->bl.y,3);
|
||||||
return 0;
|
if(src->val2 && (sd = map_charid2sd(src->val2))
|
||||||
|
&& !map[sd->bl.m].flag.nowarp)
|
||||||
pc_setpos(sd,map[src->bl.m].index,src->bl.x,src->bl.y,3);
|
pc_setpos(sd,map[src->bl.m].index,src->bl.x,src->bl.y,3);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -7940,12 +7916,6 @@ int skill_check_condition(struct map_session_data *sd,int type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WE_CALLPARTNER: /* ‚ ‚È‚½‚Ɉ§‚¢‚½‚¢ */
|
|
||||||
if(!sd->status.partner_id){
|
|
||||||
clif_skill_fail(sd,skill,0,0);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case AM_CANNIBALIZE: /* バイオプラント */
|
case AM_CANNIBALIZE: /* バイオプラント */
|
||||||
case AM_SPHEREMINE: /* スフィア?マイン */
|
case AM_SPHEREMINE: /* スフィア?マイン */
|
||||||
if(type&1){
|
if(type&1){
|
||||||
@ -8602,17 +8572,6 @@ int skill_use_id (struct map_session_data *sd, int target_id, int skill_num, int
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WE_CALLBABY:
|
|
||||||
tsd = pc_get_child(sd);
|
|
||||||
bl = (struct block_list *)tsd;
|
|
||||||
if (bl)
|
|
||||||
target_id = bl->id;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
clif_skill_fail(sd,skill_num,0,0);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
if (bl == NULL && (bl = map_id2bl(target_id)) == NULL)
|
if (bl == NULL && (bl = map_id2bl(target_id)) == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
@ -8738,19 +8697,6 @@ int skill_use_id (struct map_session_data *sd, int target_id, int skill_num, int
|
|||||||
casttime *= distance_bl(&sd->bl, bl);
|
casttime *= distance_bl(&sd->bl, bl);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// parent-baby skills
|
|
||||||
case WE_BABY:
|
|
||||||
case WE_CALLPARENT:
|
|
||||||
{
|
|
||||||
struct map_session_data *f_sd = pc_get_father(sd);
|
|
||||||
struct map_session_data *m_sd = pc_get_mother(sd);
|
|
||||||
|
|
||||||
// set target as any one of the parent
|
|
||||||
if (f_sd) target_id = f_sd->bl.id;
|
|
||||||
else if (m_sd) target_id = m_sd->bl.id;
|
|
||||||
else return 0; // neither are found
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case HP_BASILICA: /* バジリカ */
|
case HP_BASILICA: /* バジリカ */
|
||||||
{
|
{
|
||||||
// cancel Basilica if already in effect
|
// cancel Basilica if already in effect
|
||||||
|
|||||||
@ -872,7 +872,7 @@ enum {
|
|||||||
UNT_FIREWALL,
|
UNT_FIREWALL,
|
||||||
UNT_WARP_WAITING,
|
UNT_WARP_WAITING,
|
||||||
UNT_WARP_ACTIVE,
|
UNT_WARP_ACTIVE,
|
||||||
|
UNT_ARROWSHOWER = 0x82, //TODO: Get actual unit id.
|
||||||
UNT_SANCTUARY = 0x83,
|
UNT_SANCTUARY = 0x83,
|
||||||
UNT_MAGNUS,
|
UNT_MAGNUS,
|
||||||
UNT_PNEUMA,
|
UNT_PNEUMA,
|
||||||
@ -918,7 +918,7 @@ enum {
|
|||||||
UNT_SERVICEFORYOU,
|
UNT_SERVICEFORYOU,
|
||||||
UNT_GRAFFITI,
|
UNT_GRAFFITI,
|
||||||
UNT_DEMONSTRATION,
|
UNT_DEMONSTRATION,
|
||||||
UNT_CALLPARTNER,
|
UNT_CALLFAMILY,
|
||||||
UNT_GOSPEL,
|
UNT_GOSPEL,
|
||||||
UNT_BASILICA,
|
UNT_BASILICA,
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user