diff options
author | toms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-29 10:23:11 +0000 |
---|---|---|
committer | toms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-29 10:23:11 +0000 |
commit | 3bc63f72702b2863f1439e69c6b5add1009a02c5 (patch) | |
tree | befa8038a634b39fcdac89160da9317b21bb307d /src/map | |
parent | 089657a99ef08deb2e7202e3d2af6382a2e874f2 (diff) | |
download | hercules-3bc63f72702b2863f1439e69c6b5add1009a02c5.tar.gz hercules-3bc63f72702b2863f1439e69c6b5add1009a02c5.tar.bz2 hercules-3bc63f72702b2863f1439e69c6b5add1009a02c5.tar.xz hercules-3bc63f72702b2863f1439e69c6b5add1009a02c5.zip |
- Applied Mpeg's work on GS
( http://gpegon.free.fr/ea/gunslinger_08-29-06_mpeg.txt )
- Fixed a syntax error in @showmobs
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8528 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/atcommand.c | 2 | ||||
-rw-r--r-- | src/map/battle.c | 18 | ||||
-rw-r--r-- | src/map/pc.c | 3 | ||||
-rw-r--r-- | src/map/skill.c | 76 | ||||
-rw-r--r-- | src/map/skill.h | 7 |
5 files changed, 77 insertions, 29 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index cff8ab8cf..3d604497a 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9805,7 +9805,7 @@ int atcommand_mobinfo( return 0;
}
-*==========================================
+/*=========================================
* @showmobs by KarLaeda
* => For 5 sec displays the mobs on minimap
*------------------------------------------
diff --git a/src/map/battle.c b/src/map/battle.c index ca04db941..a39a006c1 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -858,7 +858,6 @@ static struct Damage battle_calc_weapon_attack( } wd.flag=(wd.flag&~BF_RANGEMASK)|BF_LONG; break; - case GS_MAGICALBULLET: case HT_PHANTASMIC: //Since these do not consume ammo, they need to be explicitly set as arrow attacks. flag.arrow = 1; @@ -882,6 +881,10 @@ static struct Damage battle_calc_weapon_attack( case NPC_GRANDDARKNESS: case NJ_HUUMA: case NJ_TATAMIGAESHI: + case GS_FLING: + case GS_TRIPLEACTION: + case GS_BULLSEYE: + case GS_MAGICALBULLET: wd.flag=(wd.flag&~BF_RANGEMASK)|BF_LONG; break; @@ -1506,13 +1509,10 @@ static struct Damage battle_calc_weapon_attack( break; case GS_BULLSEYE: skillratio += 400; + flag.cardfix = 0; break; case GS_TRACKING: - skillratio += 60*skill_lv; - if (skill_lv == 2) skillratio += 20; - if (skill_lv == 3) skillratio += 80; - if (skill_lv >= 4) skillratio += 60*(skill_lv-3); - if (skill_lv == 10) skillratio += 80; + skillratio += 100 *(skill_lv+1); break; case GS_PIERCINGSHOT: skillratio += 20*skill_lv; @@ -1521,16 +1521,16 @@ static struct Damage battle_calc_weapon_attack( skillratio += 10*skill_lv; break; case GS_DESPERADO: - skillratio += 50*skill_lv - 50; + skillratio += 50*(skill_lv-1); break; case GS_DUST: skillratio += 50*skill_lv; break; case GS_FULLBUSTER: - skillratio += 200 + 100*skill_lv; + skillratio += 100*(skill_lv+2); break; case GS_SPREADATTACK: - skillratio += 20*skill_lv-20; + skillratio += 20*(skill_lv-1); break; case NJ_HUUMA: skillratio += 50 + 150*skill_lv; diff --git a/src/map/pc.c b/src/map/pc.c index 42b8a0ed1..5516b51ab 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4821,6 +4821,9 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) npc_script_event(sd,NPCE_DIE); } + if ( sd && sd->spiritball && (sd->class_&MAPID_BASEMASK)==MAPID_GUNSLINGER ) // maybe also monks' spiritballs ? + pc_delspiritball(sd,sd->spiritball,0); + if (src) switch (src->type) { case BL_MOB: diff --git a/src/map/skill.c b/src/map/skill.c index 3357d8aa6..5b99b7722 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1356,10 +1356,6 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int case GS_BULLSEYE: //0.1% coma rate. status_change_start(bl,SC_COMA,10,skilllv,0,0,0,0,0); break; - case GS_CRACKER: - if (!dstsd) // according to latest patch, should not work on players [Reddozen] - sc_start(bl,SC_STUN,(100 - 10*distance_bl(src, bl)),skilllv,skill_get_time2(skillid,skilllv)); //Temp stun rate - break; case GS_PIERCINGSHOT: sc_start(bl,SC_BLEEDING,(skilllv*3),skilllv,skill_get_time2(skillid,skilllv)); break; @@ -1528,7 +1524,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list * sc_start(src,SkillStatusChangeTable(skillid),100,skilllv,skill_get_time2(skillid,skilllv)); break; case GS_FULLBUSTER: - sc_start(src,SC_BLIND,(2*skilllv),skilllv,skill_get_time2(skillid,skilllv)); + status_change_start(src,SC_BLIND,200*skilllv,skilllv,0,0,0,skill_get_time2(skillid,skilllv),10); break; } @@ -2762,7 +2758,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int case TK_COUNTER: case GS_TRIPLEACTION: case GS_MAGICALBULLET: - case GS_CRACKER: case GS_TRACKING: case GS_PIERCINGSHOT: case GS_RAPIDSHOWER: @@ -3145,7 +3140,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) + 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); @@ -3727,7 +3722,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case GS_MADNESSCANCEL: case GS_ADJUSTMENT: case GS_INCREASING: - case GS_CRACKER: case NJ_KASUMIKIRI: case NJ_UTSUSEMI: case NJ_NEN: @@ -5483,6 +5477,16 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in } break; + case GS_CRACKER: + if (!dstsd) // according to latest patch, should not work on players [Reddozen] + { + int rate=10+(skill_get_range2(src,skillid,skilllv)-distance_bl(src,bl))*20; + clif_skill_nodamage(src,bl,skillid,skilllv,1); + sc_start(bl,SC_STUN,(rate>100)?100:rate,skilllv,skill_get_time2(skillid,skilllv)); //New temp stun rate (by RockmanEXE) + } + else + clif_skill_fail(sd,skillid,0,0); + break; case AM_REST: if (sd) { @@ -6474,6 +6478,7 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid, struct status_data *status; struct status_change *sc; int active_flag=1; + int subunt=0; nullpo_retr(0, src); @@ -6680,17 +6685,36 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid, break; case GS_GROUNDDRIFT: - { //Take on the base element, not the elemental one. - struct status_data *bstatus = status_get_base_status(src); - val1 = bstatus?bstatus->rhw.ele:status->rhw.ele; - if (sd) sd->state.arrow_atk = 0; //Disable consumption right away. - else if (!val1) val1 = ELE_WATER+rand()%(ELE_WIND-ELE_WATER); - break; + { + int element[5]={ELE_WIND,ELE_DARK,ELE_POISON,ELE_WATER,ELE_FIRE}; + + if (src->type == BL_PC) + val1=sd->arrow_ele; + else val1=element[rand()%5]; + + switch (val1) + { + case ELE_FIRE: + subunt++; + case ELE_WATER: + subunt++; + case ELE_POISON: + subunt++; + case ELE_DARK: + subunt++; + case ELE_WIND: + break; + default: + subunt=rand()%5; + break; + } + + break; } } nullpo_retr(NULL, group=skill_initunitgroup(src,(count > 0 ? count : layout->count), - skillid,skilllv,skill_get_unit_id(skillid,flag&1), limit, interval)); + skillid,skilllv,skill_get_unit_id(skillid,flag&1)+subunt, limit, interval)); group->val1=val1; group->val2=val2; group->val3=val3; @@ -7284,8 +7308,26 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0); break; - case UNT_GROUNDDRIFT: + 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_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; + } + sg->unit_id = UNT_USED_TRAPS; clif_changetraplook(&src->bl, UNT_FIREPILLAR_ACTIVE); sg->limit=DIFF_TICK(tick,sg->tick)+1500; @@ -7751,7 +7793,7 @@ int skill_isammotype (TBL_PC *sd, int skill) { return ( (sd->status.weapon == W_BOW || (sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE)) && - skill != HT_PHANTASMIC && skill != GS_MAGICALBULLET && + skill != HT_PHANTASMIC && skill_get_type(skill) == BF_WEAPON && !(skill_get_nk(skill)&NK_NO_DAMAGE) && !skill_get_spiritball(skill,1) //Assume spirit spheres are used as ammo instead. diff --git a/src/map/skill.h b/src/map/skill.h index 1c2e1aab7..c5d3fca58 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -947,8 +947,11 @@ enum { UNT_SUITON = 0xbb,
UNT_TATAMIGAESHI,
UNT_KAENSIN,
- //0xbe, 0xc0, 0xc1 //Maybe the other elements of Ground Drift?
- UNT_GROUNDDRIFT = 0xc2,
+ UNT_GROUNDDRIFT_WIND,
+ UNT_GROUNDDRIFT_DARK,
+ UNT_GROUNDDRIFT_POISON,
+ UNT_GROUNDDRIFT_WATER,
+ UNT_GROUNDDRIFT_FIRE,
};
#endif
|