summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-30 10:01:08 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-30 10:01:08 +0000
commitbf1ff6917070574b7cbda9c5931cd891933ac3d7 (patch)
tree5992e6cb1d509b2dc5c861f537c0d7c4c4f55292 /src
parent4deb54014e1f9a0dcd0713cea056d840ba34ef5c (diff)
downloadhercules-bf1ff6917070574b7cbda9c5931cd891933ac3d7.tar.gz
hercules-bf1ff6917070574b7cbda9c5931cd891933ac3d7.tar.bz2
hercules-bf1ff6917070574b7cbda9c5931cd891933ac3d7.tar.xz
hercules-bf1ff6917070574b7cbda9c5931cd891933ac3d7.zip
* Multiple autocasts can go off at a time now. [Inkfish]
* Splash damage doesn't get modified by percentual modifier now. [Inkfish] * Monster's Spiral Pierce is again...non-elemental. [Inkfish] git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13827 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c36
-rw-r--r--src/map/skill.c6
2 files changed, 19 insertions, 23 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 74ad8fe60..0b0ac06c9 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -896,6 +896,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
short skill=0;
short s_ele, s_ele_, t_class;
int i, nk;
+ bool n_ele; // non-elemental
struct map_session_data *sd, *tsd;
struct Damage wd;
@@ -942,7 +943,9 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
wd.flag |= (skill_num||wflag)?BF_SKILL:BF_NORMAL; // Baphomet card's splash damage is counted as a skill. [Inkfish]
wd.dmg_lv=ATK_DEF; //This assumption simplifies the assignation later
nk = skill_get_nk(skill_num);
- flag.hit = nk&NK_IGNORE_FLEE?1:0;
+ if( !skill_num && wflag ) //If flag, this is splash damage from Baphomet Card and it always hits.
+ nk |= NK_NO_CARDFIX_ATK|NK_IGNORE_FLEE;
+ flag.hit = nk&NK_IGNORE_FLEE?1:0;
flag.idef = flag.idef2 = nk&NK_IGNORE_DEF?1:0;
if (sc && !sc->count)
@@ -1029,26 +1032,25 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
t_class = status_get_class(target);
s_ele = s_ele_ = skill_get_ele(skill_num, skill_lv);
- if (!skill_num || s_ele == -1) { //Take weapon's element
+ if( !skill_num || s_ele == -1 )
+ { //Take weapon's element
s_ele = sstatus->rhw.ele;
s_ele_ = sstatus->lhw.ele;
- if (flag.arrow && sd && sd->arrow_ele)
+ if( flag.arrow && sd && sd->arrow_ele )
s_ele = sd->arrow_ele;
- } else if (s_ele == -2) { //Use enchantment's element
- s_ele = s_ele_ = status_get_attack_sc_element(src,sc);
+ if( battle_config.attack_attr_none&src->type )
+ n_ele = true; //Weapon's element is "not elemental"
}
-
- switch(skill_num)
+ else if( s_ele == -2 ) //Use enchantment's element
+ s_ele = s_ele_ = status_get_attack_sc_element(src,sc);
+ switch( skill_num )
{
case GS_GROUNDDRIFT:
s_ele = s_ele_ = wflag; //element comes in flag.
break;
-
- // TODO: A patch here doesn't work anymore since mechanism has changed.
- // If mob's spiral pierce is forced neutral is under investigation.
- //case LK_SPIRALPIERCE:
- // if (!sd) nk &= ~NK_NO_ELEFIX; //forced neutral for monsters
- // break;
+ case LK_SPIRALPIERCE:
+ if (!sd) n_ele = false; //forced neutral for monsters
+ break;
}
if(!skill_num)
@@ -1131,10 +1133,6 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
if( sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_CRUSADER )
flag.hit = 1;
break;
- case 0:
- if( wflag ) //If flag, this is splash damage from Baphomet Card and it always hits.
- flag.hit = 1;
- break;
}
if (tsc && !flag.hit && tsc->opt1 && tsc->opt1 != OPT1_STONEWAIT)
flag.hit = 1;
@@ -1896,9 +1894,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
if(skill_num==TF_POISON)
ATK_ADD(15*skill_lv);
- if(!(nk&NK_NO_ELEFIX) &&
- !(battle_config.attack_attr_none&src->type && (skill_num == 0 || skill_get_ele(skill_num, skill_lv) == -1))
- )
+ if( !(nk&NK_NO_ELEFIX) && !n_ele )
{ //Elemental attribute fix
if( wd.damage > 0 )
{
diff --git a/src/map/skill.c b/src/map/skill.c
index 3243eefa6..fd8e4d5ba 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1030,7 +1030,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
clif_status_change(src, SI_ACTIONDELAY, 1, rate);
}
}
- break; //Only one auto skill comes off at a time.
+ //break; //Only one auto skill comes off at a time.
}
}
@@ -1112,7 +1112,7 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, int s
case CAST_NODAMAGE: skill_castend_nodamage_id(&sd->bl, tbl, skill, skilllv, tick, 0); break;
case CAST_DAMAGE: skill_castend_damage_id(&sd->bl, tbl, skill, skilllv, tick, 0); break;
}
- break;
+ //break;
}
if( sd->autoscript3[0].script )
@@ -1285,7 +1285,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
clif_status_change(bl, SI_ACTIONDELAY, 1, rate);
}
}
- break; //trigger only one auto-spell per hit.
+ //break; //trigger only one auto-spell per hit.
}
}
//Auto-script when attacked