summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-06 21:10:45 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-06 21:10:45 +0000
commit18b9549a0a8cfb0614c655d11f87f2acc7c8cc52 (patch)
tree937db1ac7ede04a8b43ce6324508ac75d3d6029c /src/map
parent1c0bab41587fced03042d70a91945f5917f3a29e (diff)
downloadhercules-18b9549a0a8cfb0614c655d11f87f2acc7c8cc52.tar.gz
hercules-18b9549a0a8cfb0614c655d11f87f2acc7c8cc52.tar.bz2
hercules-18b9549a0a8cfb0614c655d11f87f2acc7c8cc52.tar.xz
hercules-18b9549a0a8cfb0614c655d11f87f2acc7c8cc52.zip
- Corrected Ground Drift. Splash range of 3x3, stackable and placeable underneath others, cast time is 2 secs. It's considered ranged, and it's damage increase is defense ignoring, always neutral damage.
- Added Bull's Eye 0.5 sec cast time - Corrected Bull's Eye implementation, it should deal normal damage against non brute/demi-human targets. - GS_DUST is now considered a short-range attack - Implemented Desperado's hit rate based on distance to caster as it's believed to behave. - Suiton's Speed/Agi penalty will affect everyone when used in versus maps. - GS_TRACKING's range is no longer affected by Snake Eye. - Cleaned up some skill_trap_splash - GS_FLING's defense reduction is now 5*lv% git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9158 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c19
-rw-r--r--src/map/skill.c139
-rw-r--r--src/map/status.c4
3 files changed, 91 insertions, 71 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 96b61e8d6..c278a330a 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -378,7 +378,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
if(sc->data[SC_ADJUSTMENT].timer != -1 &&
(flag&(BF_LONG|BF_WEAPON)) == (BF_LONG|BF_WEAPON))
- damage=damage*80/100;
+ damage -= 20*damage/100;
if(sc->data[SC_FOGWALL].timer != -1) {
if(flag&BF_SKILL) //25% reduction
@@ -885,6 +885,7 @@ static struct Damage battle_calc_weapon_attack(
wd.flag=(wd.flag&~BF_RANGEMASK)|BF_LONG;
break;
case GS_DESPERADO:
+ case GS_DUST:
//This one is the opposite, it consumes ammo, but should count as short range.
wd.flag=(wd.flag&~BF_RANGEMASK)|BF_SHORT;
break;
@@ -917,11 +918,12 @@ static struct Damage battle_calc_weapon_attack(
wd.type = 0x08;
break;
+ case GS_GROUNDDRIFT:
+ wd.flag=(wd.flag&~BF_RANGEMASK)|BF_LONG;
case KN_SPEARSTAB:
case KN_BOWLINGBASH:
case MO_BALKYOUNG:
case TK_TURNKICK:
- case GS_GROUNDDRIFT:
wd.blewcount=0;
break;
@@ -1531,8 +1533,12 @@ static struct Damage battle_calc_weapon_attack(
skillratio += 10*status_get_lv(src)/3;
break;
case GS_BULLSEYE:
- skillratio += 400;
- flag.cardfix = 0;
+ if((tstatus->race == RC_BRUTE || tstatus->race == RC_DEMIHUMAN)
+ && !(tstatus->mode&MD_BOSS))
+ { //Only works well against brute/demihumans non bosses.
+ skillratio += 400;
+ flag.cardfix = 0;
+ }
break;
case GS_TRACKING:
skillratio += 100 *(skill_lv+1);
@@ -1590,9 +1596,6 @@ static struct Damage battle_calc_weapon_attack(
case MO_EXTREMITYFIST:
ATK_ADD(250 + 150*skill_lv);
break;
- case GS_GROUNDDRIFT:
- ATK_ADD(50*skill_lv);
- break;
case TK_DOWNKICK:
case TK_STORMKICK:
case TK_TURNKICK:
@@ -1832,6 +1835,8 @@ static struct Damage battle_calc_weapon_attack(
wd.damage=battle_attr_fix(src,target,wd.damage,s_ele,tstatus->def_ele, tstatus->ele_lv);
if(skill_num==MC_CARTREVOLUTION) //Cart Revolution applies the element fix once more with neutral element
wd.damage = battle_attr_fix(src,target,wd.damage,ELE_NEUTRAL,tstatus->def_ele, tstatus->ele_lv);
+ if(skill_num== GS_GROUNDDRIFT) //Additional 50*lv Neutral damage.
+ wd.damage+= battle_attr_fix(src,target,50*skill_lv,ELE_NEUTRAL,tstatus->def_ele, tstatus->ele_lv);
}
if (flag.lh && wd.damage2 > 0)
wd.damage2 = battle_attr_fix(src,target,wd.damage2,s_ele_,tstatus->def_ele, tstatus->ele_lv);
diff --git a/src/map/skill.c b/src/map/skill.c
index bf1bc6998..a90e179ce 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -773,7 +773,6 @@ int skill_get_range2 (struct block_list *bl, int id, int lv)
break;
// added to allow GS skills to be effected by the range of Snake Eyes [Reddozen]
case GS_RAPIDSHOWER:
- case GS_TRACKING:
case GS_PIERCINGSHOT:
case GS_FULLBUSTER:
case GS_SPREADATTACK:
@@ -1337,7 +1336,8 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
sc_start(bl,SC_STUN,70,skilllv,skill_get_time2(skillid,skilllv));
break;
case GS_BULLSEYE: //0.1% coma rate.
- status_change_start(bl,SC_COMA,10,skilllv,0,0,0,0,0);
+ if(tstatus->race == RC_BRUTE || tstatus->race == RC_DEMIHUMAN)
+ status_change_start(bl,SC_COMA,10,skilllv,0,0,0,0,0);
break;
case GS_PIERCINGSHOT:
sc_start(bl,SC_BLEEDING,(skilllv*3),skilllv,skill_get_time2(skillid,skilllv));
@@ -3133,10 +3133,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
break;
case GS_BULLSEYE:
- if((tstatus->race == RC_BRUTE || tstatus->race == RC_DEMIHUMAN) && !(tstatus->mode&MD_BOSS))
- skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
- else if (sd)
- clif_skill_fail(sd,skillid,0,0);
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
break;
case NJ_KASUMIKIRI:
@@ -6692,9 +6689,10 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid,
{
int element[5]={ELE_WIND,ELE_DARK,ELE_POISON,ELE_WATER,ELE_FIRE};
- if (src->type == BL_PC)
+ if (sd)
val1=sd->arrow_ele;
- else val1=element[rand()%5];
+ else
+ val1=element[rand()%5];
switch (val1)
{
@@ -6769,6 +6767,18 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid,
ux+=(i%5-2);
uy+=(i/5-2);
break;
+ case UNT_DESPERADO:
+ val1 = abs(layout->dx[i]);
+ val2 = abs(layout->dy[i]);
+ if (val1 < 2 || val2 < 2) { //Nearby cross, linear decrease with no diagonals
+ if (val2 > val1) val1 = val2;
+ if (val1) val1--;
+ val1 = 36 -12*val1;
+ } else //Diagonal edges
+ val1 = 28 -4*val1 -4*val2;
+ if (val1 < 1) val1 = 1;
+ val2 = 0;
+ break;
default:
if (group->state.song_dance&0x1)
val2 = unit_flag&(UF_DANCE|UF_SONG); //Store whether this is a song/dance
@@ -6892,7 +6902,7 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned
case UNT_SUITON:
if(sc && sc->data[type].timer==-1)
sc_start4(bl,type,100,sg->skill_lv,
- battle_check_target(&src->bl,bl,BCT_ENEMY)>0?1:0, //Send val3 =1 to reduce agi.
+ map_flag_vs(bl->m) || battle_check_target(&src->bl,bl,BCT_ENEMY)>0?1:0, //Send val3 =1 to reduce agi.
0,0,sg->limit);
break;
@@ -7175,6 +7185,21 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
sg->state.into_abyss = 1; //Prevent Remove Trap from giving you the trap back. [Skotlex]
break;
+ case UNT_GROUNDDRIFT_WIND:
+ case UNT_GROUNDDRIFT_DARK:
+ case UNT_GROUNDDRIFT_POISON:
+ case UNT_GROUNDDRIFT_WATER:
+ case UNT_GROUNDDRIFT_FIRE:
+ map_foreachinrange(skill_trap_splash,&src->bl,
+ skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag,
+ &src->bl,tick,0);
+ sg->unit_id = UNT_USED_TRAPS;
+ clif_changetraplook(&src->bl, UNT_FIREPILLAR_ACTIVE);
+ sg->limit=DIFF_TICK(tick,sg->tick)+1500;
+ sg->state.into_abyss = 1;
+ break;
+
+
case UNT_TALKIEBOX:
if (sg->src_id == bl->id)
break;
@@ -7312,42 +7337,10 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
break;
case UNT_DESPERADO:
- if (!(rand()%5)) //Has a low chance of connecting. [Skotlex]
+ if (rand()%100 < src->val1)
skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
break;
- case UNT_GROUNDDRIFT_WIND:
- case UNT_GROUNDDRIFT_DARK:
- case UNT_GROUNDDRIFT_POISON:
- case UNT_GROUNDDRIFT_WATER:
- case UNT_GROUNDDRIFT_FIRE:
- skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,sg->val1);
-
- switch (sg->val1)
- {
- case ELE_WIND:
- sc_start(bl,SC_STUN,5,sg->skill_lv,skill_get_time2(sg->skill_id, sg->skill_lv));
- break;
- case ELE_WATER:
- sc_start(bl,SC_FREEZE,5,sg->skill_lv,skill_get_time2(sg->skill_id, sg->skill_lv));
- break;
- case ELE_POISON:
- sc_start(bl,SC_POISON,5,sg->skill_lv,skill_get_time2(sg->skill_id, sg->skill_lv));
- break;
- case ELE_DARK:
- sc_start(bl,SC_BLIND,5,sg->skill_lv,skill_get_time2(sg->skill_id, sg->skill_lv));
- break;
- case ELE_FIRE:
- skill_blown(&src->bl,bl,skill_get_blewcount(sg->skill_id,sg->skill_lv));
- break;
- }
-
- sg->unit_id = UNT_USED_TRAPS;
- clif_changetraplook(&src->bl, UNT_FIREPILLAR_ACTIVE);
- sg->limit=DIFF_TICK(tick,sg->tick)+1500;
- sg->state.into_abyss = 1; //Prevent Remove Trap from giving you the trap back. [Skotlex]
- break;
-
case UNT_KAENSIN:
skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
if (--src->val2 <= 0)
@@ -9426,27 +9419,49 @@ int skill_trap_splash (struct block_list *bl, va_list ap)
nullpo_retr(0, sg = unit->group);
nullpo_retr(0, ss = map_id2bl(sg->src_id));
- if(battle_check_target(src,bl,BCT_ENEMY) > 0){
- switch(sg->unit_id){
- case UNT_SHOCKWAVE:
- case UNT_SANDMAN:
- case UNT_FLASHER:
- skill_additional_effect(ss,bl,sg->skill_id,sg->skill_lv,BF_MISC,tick);
- break;
- case UNT_BLASTMINE:
- case UNT_CLAYMORETRAP:
- //Special property: Each target is hit N times (N = number of targets on splash area)
- if (!count) count = 1;
- for(i=0;i<count;i++)
- skill_attack(BF_MISC,ss,src,bl,sg->skill_id,sg->skill_lv,tick,0);
- break;
- case UNT_FREEZINGTRAP:
- skill_attack(BF_WEAPON,ss,src,bl,sg->skill_id,sg->skill_lv,tick,0);
- break;
- }
- }
+ if(battle_check_target(src,bl,BCT_ENEMY) <= 0)
+ return 0;
- return 0;
+ switch(sg->unit_id){
+ case UNT_SHOCKWAVE:
+ case UNT_SANDMAN:
+ case UNT_FLASHER:
+ skill_additional_effect(ss,bl,sg->skill_id,sg->skill_lv,BF_MISC,tick);
+ break;
+ case UNT_BLASTMINE:
+ case UNT_CLAYMORETRAP:
+ //Special property: Each target is hit N times (N = number of targets on splash area)
+ if (!count) count = 1;
+ for(i=0;i<count;i++)
+ skill_attack(BF_MISC,ss,src,bl,sg->skill_id,sg->skill_lv,tick,0);
+ break;
+ case UNT_FREEZINGTRAP:
+ skill_attack(BF_WEAPON,ss,src,bl,sg->skill_id,sg->skill_lv,tick,0);
+ break;
+ case UNT_GROUNDDRIFT_WIND:
+ if(skill_attack(BF_WEAPON,ss,src,bl,sg->skill_id,sg->skill_lv,tick,sg->val1))
+ sc_start(bl,SC_STUN,5,sg->skill_lv,skill_get_time2(sg->skill_id, sg->skill_lv));
+ break;
+ case UNT_GROUNDDRIFT_DARK:
+ if(skill_attack(BF_WEAPON,ss,src,bl,sg->skill_id,sg->skill_lv,tick,sg->val1))
+ sc_start(bl,SC_BLIND,5,sg->skill_lv,skill_get_time2(sg->skill_id, sg->skill_lv));
+ break;
+ case UNT_GROUNDDRIFT_POISON:
+ if(skill_attack(BF_WEAPON,ss,src,bl,sg->skill_id,sg->skill_lv,tick,sg->val1))
+ sc_start(bl,SC_POISON,5,sg->skill_lv,skill_get_time2(sg->skill_id, sg->skill_lv));
+ break;
+ case UNT_GROUNDDRIFT_WATER:
+ if(skill_attack(BF_WEAPON,ss,src,bl,sg->skill_id,sg->skill_lv,tick,sg->val1))
+ sc_start(bl,SC_FREEZE,5,sg->skill_lv,skill_get_time2(sg->skill_id, sg->skill_lv));
+ break;
+ case UNT_GROUNDDRIFT_FIRE:
+ if(skill_attack(BF_WEAPON,ss,src,bl,sg->skill_id,sg->skill_lv,tick,sg->val1))
+ skill_blown(src,bl,skill_get_blewcount(sg->skill_id,sg->skill_lv));
+ break;
+ default:
+ return 0;
+ }
+ return 1;
}
/*==========================================
diff --git a/src/map/status.c b/src/map/status.c
index 2c5a5c7e5..8820fa505 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -5523,8 +5523,8 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
break;
case SC_FLING:
- val2 = 3*val1; //Def reduction
- val3 = 3*val1; //Def2 reduction
+ val2 = 5*val1; //Def reduction
+ val3 = 5*val1; //Def2 reduction
break;
case SC_PROVOKE:
//val2 signals autoprovoke.