From 48e10b3db33490516e6fe9562d96cfa497be025e Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 21 Nov 2006 20:54:22 +0000 Subject: - Corrected GS_DISARM, it is now a normal attack, which, when it connects, has a chance to do strip weapon ar a 3*lv% rate (modified by dex) - Fixed GS_PIERCINGSHOT, it should ignore defense - Corrected Gatling Fever costing SP when trying to turn it off. Also, speed increases bonuses won't take effect while it's active. - Updated the main makefile with a new OPT line. It is commented by default since it only works with GCC 4.X, when unset, it will hide away a huge amount of warnings that have to do with stuff that is not gonna be corrected in eA anyway. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9287 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 9 +++++++++ Makefile | 2 ++ db/skill_db.txt | 2 +- src/map/battle.c | 1 + src/map/skill.c | 25 +++++++++++++++++++++++-- src/map/status.c | 41 +++++++++++++++++++++-------------------- 6 files changed, 57 insertions(+), 23 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index c1bb15c1f..f9117b7f2 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,15 @@ 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. 2006/11/21 + * Corrected GS_DISARM, it is now a normal attack, which, when it connects, + has a chance to do strip weapon at a 3*lv% rate (modified by dex) [Skotlex] + * Fixed GS_PIERCINGSHOT, it should ignore defense [Skotlex] + * Corrected Gatling Fever costing SP when trying to turn it off. Also, + speed increases bonuses won't take effect while it's active. [Skotlex] + * Updated the main makefile with a new OPT line. It is commented by default + since it only works with GCC 4.X, when unset, it will hide away a huge + amount of warnings that have to do with stuff that is not gonna be + corrected in eA anyway. [Skotlex] * Corrected TripleAction's damage. It should do 150%*3 instead of 100*3% damage. [Skotlex] * Updated GS_CRACKER's stun chance using Doddler's info as reference. diff --git a/Makefile b/Makefile index 14f564e46..5aa76de70 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,8 @@ OPT += -ffast-math # OPT += -fstack-protector # OPT += -fomit-frame-pointer OPT += -Wall -Wno-sign-compare +# Uncomment this one if you are using GCC 4.X +# OPT += -Wno-unused-parameter -Wno-pointer-sign # OPT += -DMAPREGSQL # OPT += -DCHRIF_OLDINFO # OPT += -DPCRE_SUPPORT diff --git a/db/skill_db.txt b/db/skill_db.txt index cf9e49797..a2ebd2bd7 100644 --- a/db/skill_db.txt +++ b/db/skill_db.txt @@ -537,7 +537,7 @@ 510,0,0,0,0,0,0,10,0,no,0,0,0,none,0 //GS_SNAKEEYE#Snake Eye# 511,-9,8,0,-1,0,0,10,2,no,0,0,0,weapon,0 //GS_CHAINACTION#Chain Action# 512,-9,6,1,-1,0,0,10,1,no,0,0,0,weapon,0 //GS_TRACKING#Tracking# -513,-9,6,1,-1,1,0,5,1,no,0,0,0,weapon,0 //GS_DISARM#Disarm# +513,-9,6,1,-1,0,0,5,1,no,0,0,0,weapon,0 //GS_DISARM#Disarm# 514,-9,6,1,-1,0,0,5,1,no,0,0,0,weapon,0 //GS_PIERCINGSHOT#Piercing Shot# 515,-9,8,1,-1,0,0,10,5,no,0,0,0,weapon,0 //GS_RAPIDSHOWER#Rapid Shower# 516,0,8,4,-1,2,3,10,1,no,0,0,0,weapon,0 //GS_DESPERADO#Desperado# diff --git a/src/map/battle.c b/src/map/battle.c index ab223789d..dca3f27f5 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1557,6 +1557,7 @@ static struct Damage battle_calc_weapon_attack( break; case GS_PIERCINGSHOT: skillratio += 20*skill_lv; + flag.idef = flag.idef2 = 1; break; case GS_RAPIDSHOWER: skillratio += 10*skill_lv; diff --git a/src/map/skill.c b/src/map/skill.c index 53a212465..eab031766 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1351,6 +1351,27 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int case GS_FLING: sc_start(bl,SC_FLING,100, sd?sd->spiritball_old:5,skill_get_time(skillid,skilllv)); break; + case GS_DISARM: + rate = 3*skilllv; + if (sstatus->dex > tstatus->dex) + rate += (sstatus->dex - tstatus->dex)/5; + + if (rand()%100 >= rate) + break; + + if (dstsd) { + if (dstsd->equip_index[EQI_HAND_R]<0 || + !dstsd->inventory_data[dstsd->equip_index[EQI_HAND_R]] || + !(dstsd->unstripable_equip&EQP_WEAPON) || + (tsc && tsc->data[SC_CP_WEAPON].timer != -1) + ) //Fail + break; + pc_unequipitem(dstsd,dstsd->equip_index[EQI_HAND_R],3); + } else if (tstatus->mode&MD_BOSS || + (tsc && tsc->data[SC_CP_WEAPON].timer != -1)) + break; + sc_start(bl,SC_STRIPWEAPON,100,skilllv,skill_get_time(skillid,skilllv)); + break; } if(sd && attack_type&BF_WEAPON && @@ -2730,6 +2751,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int case GS_PIERCINGSHOT: case GS_RAPIDSHOWER: case GS_DUST: + case GS_DISARM: // Added disarm. [Reddozen] case GS_FULLBUSTER: case NJ_SYURIKEN: case NJ_KUNAI: @@ -4409,14 +4431,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case RG_STRIPARMOR: case RG_STRIPHELM: case ST_FULLSTRIP: // Rewritten most of the code [DracoRPG] - case GS_DISARM: // Added disarm. [Reddozen] { int strip_fix, equip = 0; int sclist[4] = {0,0,0,0}; switch (skillid) { case RG_STRIPWEAPON: - case GS_DISARM: equip = EQP_WEAPON; break; case RG_STRIPSHIELD: @@ -8018,6 +8038,7 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t case PA_GOSPEL: case CR_SHRINK: case TK_RUN: + case GS_GATLINGFEVER: if(sc && sc->data[SkillStatusChangeTable(skill)].timer!=-1) return 1; //Allow turning off. break; diff --git a/src/map/status.c b/src/map/status.c index 95b63ba92..ebab67eb1 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -3635,26 +3635,27 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha if(sc->data[SC_WEDDING].timer!=-1) speed += 300; - //% increases (they don't stack, with the exception of Speedup1? @.@) - if(sc->data[SC_SPEEDUP1].timer!=-1) - speed -= speed * 50/100; - if(sc->data[SC_RUN].timer!=-1) - speed -= speed * 50/100; - else if(sc->data[SC_SPEEDUP0].timer!=-1) - speed -= speed * 25/100; - else if(sc->data[SC_INCREASEAGI].timer!=-1) - speed -= speed * 25/100; - else if(sc->data[SC_FUSION].timer != -1) - speed -= speed * 25/100; - else if(sc->data[SC_CARTBOOST].timer!=-1) - speed -= speed * 20/100; - else if(sc->data[SC_BERSERK].timer!=-1) - speed -= speed * 20/100; - else if(sc->data[SC_AVOID].timer!=-1) - speed -= speed * sc->data[SC_AVOID].val2/100; - else if(sc->data[SC_WINDWALK].timer!=-1) - speed -= speed * sc->data[SC_WINDWALK].val3/100; - + if(sc->data[SC_GATLINGFEVER].timer==-1) + { //% increases (they don't stack, with the exception of Speedup1? @.@) + if(sc->data[SC_SPEEDUP1].timer!=-1) + speed -= speed * 50/100; + if(sc->data[SC_RUN].timer!=-1) + speed -= speed * 50/100; + else if(sc->data[SC_SPEEDUP0].timer!=-1) + speed -= speed * 25/100; + else if(sc->data[SC_INCREASEAGI].timer!=-1) + speed -= speed * 25/100; + else if(sc->data[SC_FUSION].timer != -1) + speed -= speed * 25/100; + else if(sc->data[SC_CARTBOOST].timer!=-1) + speed -= speed * 20/100; + else if(sc->data[SC_BERSERK].timer!=-1) + speed -= speed * 20/100; + else if(sc->data[SC_AVOID].timer!=-1) + speed -= speed * sc->data[SC_AVOID].val2/100; + else if(sc->data[SC_WINDWALK].timer!=-1) + speed -= speed * sc->data[SC_WINDWALK].val3/100; + } //% reductions (they stack) if(sc->data[SC_DANCING].timer!=-1 && sc->data[SC_DANCING].val3&0xFFFF) speed += speed*(sc->data[SC_DANCING].val3&0xFFFF)/100; -- cgit v1.2.3-70-g09d2