summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-19 11:26:59 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-19 11:26:59 +0000
commita2d9827413a5903bf96f51d6830d30ff1a310d3a (patch)
treece701a08a4660687444bada50ba1f2b02d16bbd8
parentfbd9680eb534e2553858be6654f27a735aa16746 (diff)
downloadhercules-a2d9827413a5903bf96f51d6830d30ff1a310d3a.tar.gz
hercules-a2d9827413a5903bf96f51d6830d30ff1a310d3a.tar.bz2
hercules-a2d9827413a5903bf96f51d6830d30ff1a310d3a.tar.xz
hercules-a2d9827413a5903bf96f51d6830d30ff1a310d3a.zip
Updated Poison React
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@260 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog.txt1
-rw-r--r--src/map/battle.c25
2 files changed, 20 insertions, 6 deletions
diff --git a/Changelog.txt b/Changelog.txt
index e403298cb..6703e4370 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -14,6 +14,7 @@ Date Added
- Pneuma (thanks to DracoRPG)
- Changed sc_ id for Basilica
- Cancel Basilica (100%) when caster moves or uses another skill
+ - Updated Poison React (90%)
* Modified pc_attack to fix monster npc's not working in certain exes, thanks
to leinsirk10 [celest]
* Moved mapflags organized by type to main mapflag folder and removed "type" folder.
diff --git a/src/map/battle.c b/src/map/battle.c
index 9994c6821..d74cc5ed2 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1977,6 +1977,10 @@ static struct Damage battle_calc_pet_weapon_attack(
case AS_GRIMTOOTH:
damage = damage*(100+ 20*skill_lv)/100;
break;
+ case AS_POISONREACT: // celest
+ s_ele = 0;
+ damage = damage*(100+ 30*skill_lv)/100;
+ break;
case AS_SONICBLOW: // ソニックブロウ
damage = damage*(300+ 50*skill_lv)/100;
div_=8;
@@ -2297,11 +2301,9 @@ static struct Damage battle_calc_mob_weapon_attack(
}
else ac_flag = 1;
} else if(skill_num != CR_GRANDCROSS && t_sc_data && t_sc_data[SC_POISONREACT].timer != -1) { // poison react [Celest]
- //memset(&wd,0,sizeof(wd));
t_sc_data[SC_POISONREACT].val3 = 0;
t_sc_data[SC_POISONREACT].val4 = 1;
t_sc_data[SC_POISONREACT].val3 = src->id;
- return wd;
}
}
flag=BF_SHORT|BF_WEAPON|BF_NORMAL; // 攻撃の種類の設定
@@ -2465,6 +2467,10 @@ static struct Damage battle_calc_mob_weapon_attack(
case AS_GRIMTOOTH:
damage = damage*(100+ 20*skill_lv)/100;
break;
+ case AS_POISONREACT: // celest
+ s_ele = 0;
+ damage = damage*(100+ 30*skill_lv)/100;
+ break;
case AS_SONICBLOW: // ソニックブロウ
damage = damage*(300+ 50*skill_lv)/100;
div_=8;
@@ -2845,11 +2851,9 @@ static struct Damage battle_calc_pc_weapon_attack(
}
else ac_flag = 1;
} else if(skill_num != CR_GRANDCROSS && t_sc_data && t_sc_data[SC_POISONREACT].timer != -1) { // poison react [Celest]
- //memset(&wd,0,sizeof(wd));
t_sc_data[SC_POISONREACT].val3 = 0;
t_sc_data[SC_POISONREACT].val4 = 1;
t_sc_data[SC_POISONREACT].val3 = src->id;
- return wd;
}
}
//オートカウンター処理ここまで
@@ -3208,6 +3212,11 @@ static struct Damage battle_calc_pc_weapon_attack(
damage = damage*(100+ 20*skill_lv)/100;
damage2 = damage2*(100+ 20*skill_lv)/100;
break;
+ case AS_POISONREACT: // celest
+ s_ele = 0;
+ damage = damage*(100+ 30*skill_lv)/100;
+ damage2 = damage2*(100+ 30*skill_lv)/100;
+ break;
case AS_SONICBLOW: // ソニックブロウ
hitrate+=30; // hitrate +30, thanks to midas
damage = damage*(300+ 50*skill_lv)/100;
@@ -3766,6 +3775,7 @@ static struct Damage battle_calc_pc_weapon_attack(
damage = damage2;
damage2 = 0;
}
+
// 右手、左手修練の適用
if(sd->status.weapon > 16) {// 二刀流か?
int dmg = damage, dmg2 = damage2;
@@ -3781,7 +3791,7 @@ static struct Damage battle_calc_pc_weapon_attack(
else //二刀流でなければ左手ダメージは0
damage2 = 0;
- // 右手,短剣のみ
+ // 右手,短剣のみ
if(da == 1) { //ダブルアタックが発動しているか
div_ = 2;
damage += damage;
@@ -4448,6 +4458,9 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
((struct mob_data *)src)->dir = map_calc_dir(src, target->x,target->y );
wd=battle_calc_weapon_attack(src,target,KN_AUTOCOUNTER,flag&0xff,0);
}
+ else if(flag&AS_POISONREACT && sc_data && sc_data[SC_POISONREACT].timer!=-1) {
+ wd=battle_calc_weapon_attack(src,target,AS_POISONREACT,sc_data[SC_POISONREACT].val1,0);
+ }
else
wd=battle_calc_weapon_attack(src,target,0,0,0);
if((damage = wd.damage + wd.damage2) > 0 && src != target) {
@@ -4632,7 +4645,7 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
struct map_session_data *tsd = (struct map_session_data *)target;
if ((src->type == BL_MOB && battle_get_elem_type(src)==5) || (src->type == BL_PC && battle_get_attack_element(src)==5)) {
t_sc_data[SC_POISONREACT].val2 = 0;
- battle_weapon_attack(target,src,tick,flag|t_sc_data[SC_POISONREACT].val1);
+ battle_weapon_attack(target,src,tick,flag|AS_POISONREACT);
} else {
skill_use_id(tsd,src->id,TF_POISON,5);
--t_sc_data[SC_POISONREACT].val2;