summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--src/map/battle.c9
-rw-r--r--src/map/chrif.c2
-rw-r--r--src/map/skill.c35
4 files changed, 25 insertions, 24 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 22a4b716b..01c12521c 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,9 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2007/01/24
+ * Cleaned up some more the Joint Beat implementation, so the status don't
+ take effect until the attack connects. [Skotlex]
2007/01/23
* Fixed int/dex foods using an incorrect icon for their status [ultramage]
* Changed the night status from 149 to 160, which seems to work so much
diff --git a/src/map/battle.c b/src/map/battle.c
index aec804b3d..e65fd0da7 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1481,7 +1481,10 @@ static struct Damage battle_calc_weapon_attack(
skillratio += 40*skill_lv;
break;
case LK_JOINTBEAT:
- skillratio += 10*skill_lv-50;
+ i = 10*skill_lv-50;
+ // Although not clear, it's being assumed that the 2x damage is only for the break neck ailment.
+ if (wflag&BREAK_NECK) i*=2;
+ skillratio += i;
break;
case ASC_METEORASSAULT:
skillratio += 40*skill_lv-60;
@@ -2079,10 +2082,6 @@ static struct Damage battle_calc_weapon_attack(
{ //Breaker's int-based damage (a misc attack?)
struct Damage md = battle_calc_misc_attack(src, target, skill_num, skill_lv, wflag);
wd.damage += md.damage;
- } else if( skill_num == LK_JOINTBEAT && wflag&BREAK_NECK ) {
- //##TODO should this be here?[FlavioJS]
- // Although not clear, it's being assumed that the 2x damage is only for the break neck ailment.
- wd.damage *= 2; // 2x damage when breaking neck
}
if (wd.damage || wd.damage2) {
diff --git a/src/map/chrif.c b/src/map/chrif.c
index ec0ab6aa6..ecd5187c6 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -929,7 +929,7 @@ int chrif_divorce(int char_id, int partner_id)
if (!char_id || !partner_id)
return 0;
- nullpo_retr(0, sd = map_nick2sd(map_charid2nick(partner_id)));
+ nullpo_retr(0, sd = map_charid2sd(partner_id));
if (sd->status.partner_id == char_id) {
int i;
//離婚(相方は既にキャラが消えている筈なので)
diff --git a/src/map/skill.c b/src/map/skill.c
index 4bff55a5c..2d5bd6566 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1105,12 +1105,10 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
break;
case AS_GRIMTOOTH:
- {
- int type = dstsd?SC_SLOWDOWN:SC_STOP;
- if (tsc->data[type].timer == -1)
- sc_start(bl,type,100,skilllv,skill_get_time2(skillid, skilllv));
- break;
- }
+ skill = dstsd?SC_SLOWDOWN:SC_STOP;
+ if (tsc->data[skill].timer == -1)
+ sc_start(bl,skill,100,skilllv,skill_get_time2(skillid, skilllv));
+ break;
case MG_FROSTDIVER:
case WZ_FROSTNOVA:
sc_start(bl,SC_FREEZE,skilllv*3+35,skilllv,skill_get_time2(skillid,skilllv));
@@ -1274,15 +1272,14 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
if (!(battle_check_undead(tstatus->race, tstatus->def_ele) || tstatus->race == RC_DEMON))
sc_start(bl, SC_BLEEDING,50, skilllv, skill_get_time2(skillid,skilllv));
break;
-/*
+
case LK_JOINTBEAT:
- {
- int flag = 0;
- //##TODO how should this be done? the ailment has to be calculated before because it also affects the damage [FlavioJS]
- sc_start2(bl,SkillStatusChangeTable(skillid),(5*skilllv+5),skilllv,flag&BREAK_FLAGS,skill_get_time2(skillid,skilllv));
+ skill = SkillStatusChangeTable(skillid);
+ if (tsc->data[skill].val4) {
+ sc_start2(bl,skill,(5*skilllv+5),skilllv,tsc->data[skill].val4&BREAK_FLAGS,skill_get_time2(skillid,skilllv));
+ tsc->data[skill].val4 = 0;
+ }
break;
- }
-*/
case ASC_METEORASSAULT:
//Any enemies hit by this skill will receive Stun, Darkness, or external bleeding status ailment with a 5%+5*SkillLV% chance.
switch(rand()%3) {
@@ -1629,9 +1626,9 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
--------------------------------------------------------------------------*/
int skill_break_equip (struct block_list *bl, unsigned short where, int rate, int flag)
{
- static int where_list[4] = {EQP_WEAPON, EQP_ARMOR, EQP_SHIELD, EQP_HELM};
- static int scatk[4] = {SC_STRIPWEAPON, SC_STRIPARMOR, SC_STRIPSHIELD, SC_STRIPHELM};
- static int scdef[4] = {SC_CP_WEAPON, SC_CP_ARMOR, SC_CP_SHIELD, SC_CP_HELM};
+ const int where_list[4] = {EQP_WEAPON, EQP_ARMOR, EQP_SHIELD, EQP_HELM};
+ const int scatk[4] = {SC_STRIPWEAPON, SC_STRIPARMOR, SC_STRIPSHIELD, SC_STRIPHELM};
+ const int scdef[4] = {SC_CP_WEAPON, SC_CP_ARMOR, SC_CP_SHIELD, SC_CP_HELM};
struct status_change *sc = status_get_sc(bl);
int i,j;
TBL_PC *sd;
@@ -2786,9 +2783,11 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case 4: flag |= BREAK_WAIST; break;
case 5: flag |= BREAK_NECK; break;
}
+ //Seems a little ugly, but we have done this or worse with other skills like Storm Gust. [Skotlex]
+ //val3 holds the status that it should start when it connects.
+ sc = status_get_sc(bl);
+ if (sc) sc->data[SkillStatusChangeTable(skillid)].val4 = flag;
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
- //##TODO this is a quick&dirty hack. How do I pass the selected ailment to skill_additional_effect? [FlavioJS]
- sc_start2(bl,SkillStatusChangeTable(skillid),(5*skilllv+5),skilllv,flag&BREAK_FLAGS,skill_get_time2(skillid,skilllv));
break;
case MO_COMBOFINISH: