summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-21 20:54:22 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-21 20:54:22 +0000
commit48e10b3db33490516e6fe9562d96cfa497be025e (patch)
treeb6b28855db8a429ca73225f5033dadca8c1275e6 /src
parent11414d1e6ba30951ca99071255d479b64858464f (diff)
downloadhercules-48e10b3db33490516e6fe9562d96cfa497be025e.tar.gz
hercules-48e10b3db33490516e6fe9562d96cfa497be025e.tar.bz2
hercules-48e10b3db33490516e6fe9562d96cfa497be025e.tar.xz
hercules-48e10b3db33490516e6fe9562d96cfa497be025e.zip
- 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
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/skill.c25
-rw-r--r--src/map/status.c41
3 files changed, 45 insertions, 22 deletions
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;