summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-30 20:31:28 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-30 20:31:28 +0000
commitfc9bda5ac3dff71807027e0b09aae72f817909a0 (patch)
treee1c32192b84f6592b84f0d0b322752e0c155c117 /src/map/pc.c
parent5d2225fbbf84324c1cf370bb11776b1c0a671b4a (diff)
downloadhercules-fc9bda5ac3dff71807027e0b09aae72f817909a0.tar.gz
hercules-fc9bda5ac3dff71807027e0b09aae72f817909a0.tar.bz2
hercules-fc9bda5ac3dff71807027e0b09aae72f817909a0.tar.xz
hercules-fc9bda5ac3dff71807027e0b09aae72f817909a0.zip
- Corrected GS skill ranges using Aegis data. All their targetted skills have a base range of 9 T_T, and Dust (Choke) has a range of 2.
- Updated the code so mobs can use ChainAction as a targetted skill. - Added GroundDrift effects for Wind (Stun) and Fire (knockback). The knockback value is unknown, so 3 is used for now. - Cleaned up some more the steal code, now you can't steal the last slot regardless of skill level used. - Added consideration of Chain Action when cloning GunSlingers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9100 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 210181527..5ad01d285 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3173,25 +3173,24 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, int lv)
if(!sd || !bl || bl->type!=BL_MOB)
return 0;
+ md = (TBL_MOB *)bl;
+
+ if(md->state.steal_flag == UCHAR_MAX || md->sc.opt1) //already stolen from / status change check
+ return 0;
+
sd_status= status_get_status_data(&sd->bl);
md_status= status_get_status_data(bl);
- md = (TBL_MOB *)bl;
- if(md->state.steal_flag == UCHAR_MAX || //already stolen from
- md_status->mode&MD_BOSS || md->master_id ||
+ if(md->master_id || md_status->mode&MD_BOSS ||
(md->class_>=1324 && md->class_<1364) || // prevent stealing from treasure boxes [Valaris]
- map[md->bl.m].flag.nomobloot || // check noloot map flag [Lorky]
- md->sc.opt1 //status change check
- )
- return 0;
-
- if(battle_config.skill_steal_max_tries &&
- md->state.steal_flag++ >= battle_config.skill_steal_max_tries)
- { //Reached limit of steal attempts.
+ map[bl->m].flag.nomobloot || // check noloot map flag [Lorky]
+ (battle_config.skill_steal_max_tries && //Reached limit of steal attempts. [Lupus]
+ md->state.steal_flag++ >= battle_config.skill_steal_max_tries)
+ ) { //Can't steal from
md->state.steal_flag = UCHAR_MAX;
return 0;
}
-
+
rate = battle_config.skill_steal_type
? (sd_status->dex - md_status->dex)/2 + lv*6 + 10
: (sd_status->dex - md_status->dex) + lv*3 + 10;
@@ -3203,10 +3202,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, int lv)
//preliminar statistical data hints at this behaviour:
//each steal attempt: try to steal against ONE mob drop, and no more.
- if (lv > 5) //Include last slot (card slot)
- i = rand()%MAX_MOB_DROP;
- else //Do not include card slot
- i = rand()%(MAX_MOB_DROP-1);
+ i = rand()%(MAX_MOB_DROP-1); //You can't steal from the last slot.
if(rand() % 10000 >= md->db->dropitem[i].p*rate/100)
return 0;