summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c7
-rw-r--r--src/map/battle.h2
-rw-r--r--src/map/pc.c4
-rw-r--r--src/map/skill.c44
4 files changed, 42 insertions, 15 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 23bdca930..c0ba107e6 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -5113,7 +5113,10 @@ static const struct {
{ "muting_players", &battle_config.muting_players}, // added by [Apple]
{ "zeny_from_mobs", &battle_config.zeny_from_mobs}, // [Valaris]
{ "mobs_level_up", &battle_config.mobs_level_up}, // [Valaris]
- { "pk_min_level", &battle_config.pk_min_level}, // [celest]
+ { "pk_min_level", &battle_config.pk_min_level}, // [celest]
+ { "skill_steal_type", &battle_config.skill_steal_type}, // [celest]
+ { "skill_steal_rate", &battle_config.skill_steal_rate}, // [celest]
+
//SQL-only options start
#ifndef TXT_ONLY
{ "mail_system", &battle_config.mail_system }, // added by [Valaris]
@@ -5336,6 +5339,8 @@ void battle_set_defaults() {
battle_config.zeny_from_mobs = 0;
battle_config.mobs_level_up = 0;
battle_config.pk_min_level = 55;
+ battle_config.skill_steal_type = 1;
+ battle_config.skill_steal_rate = 100;
battle_config.castrate_dex_scale = 150;
diff --git a/src/map/battle.h b/src/map/battle.h
index 5499256d8..457a02554 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -334,6 +334,8 @@ extern struct Battle_Config {
int zeny_from_mobs; // [Valaris]
int mobs_level_up; // [Valaris]
int pk_min_level; // [celest]
+ int skill_steal_type; // [celest]
+ int skill_steal_rate; // [celest]
#ifndef TXT_ONLY /* SQL-only options */
int mail_system; // [Valaris]
diff --git a/src/map/pc.c b/src/map/pc.c
index 54207c853..00832d944 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3309,7 +3309,9 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl)
if(!md->state.steal_flag && mob_db[md->class].mexp <= 0 && !(mob_db[md->class].mode&0x20) && md->sc_data[SC_STONE].timer == -1 && md->sc_data[SC_FREEZE].timer == -1 &&
(!(md->class>1324 && md->class<1364))) // prevent stealing from treasure boxes [Valaris]
{
- skill = sd->paramc[4] - mob_db[md->class].dex + pc_checkskill(sd,TF_STEAL)*3 + 10;
+ skill = battle_config.skill_steal_type == 1
+ ? (sd->paramc[4] - mob_db[md->class].dex)/2 + pc_checkskill(sd,TF_STEAL)*6 + 10
+ : sd->paramc[4] - mob_db[md->class].dex + pc_checkskill(sd,TF_STEAL)*3 + 10;
if(0 < skill)
{
diff --git a/src/map/skill.c b/src/map/skill.c
index 5d89b7f84..b47fe14c7 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -973,8 +973,8 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
if((skill*15 + 55) + (skill2 = pc_checkskill(sd,TF_STEAL))*10 > rand()%1000) {
if(pc_steal_item(sd,bl))
clif_skill_nodamage(src,bl,TF_STEAL,skill2,1);
- else
- clif_skill_fail(sd,skillid,0,0);
+ //else
+ // clif_skill_fail(sd,skillid,0,0); // it's annoying! =p [Celest]
}
break;
@@ -4700,6 +4700,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
int i,count=1,limit=10000,val1=0,val2=0;
int target=BCT_ENEMY,interval=1000,range=0;
int dir=0,aoe_diameter=0; // -- aoe_diameter (moonsoul) added for sage Area Of Effect skills
+ struct status_change *sc_data = battle_get_sc_data(src); // for firewall and fogwall - celest
nullpo_retr(0, src);
@@ -4720,8 +4721,12 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
if(dir&1) count=5;
else count=3;
limit=skill_get_time(skillid,skilllv);
- if (((struct map_session_data *)src)->sc_data[SC_VIOLENTGALE].timer!=-1)
- limit *= 1.5;
+ if(sc_data) {
+ if (sc_data[SC_VIOLENTGALE].timer!=-1) limit *= 1.5;
+ }
+ // check for sc_data first - Celest
+ // if (((struct map_session_data *)src)->sc_data[SC_VIOLENTGALE].timer!=-1)
+ // limit *= 1.5;
val2=4+skilllv;
interval=1;
break;
@@ -5006,8 +5011,9 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
case PF_FOGWALL: /* フォグウォ?ル */
count=15;
limit=skill_get_time(skillid,skilllv);
- if (((struct map_session_data *)src)->sc_data[SC_DELUGE].timer!=-1)
- limit *= 2;
+ if(sc_data) {
+ if (sc_data[SC_DELUGE].timer!=-1) limit *= 2;
+ }
break;
case RG_GRAFFITI: /* Graffiti */
count=1; // Leave this at 1 [Valaris]
@@ -8525,11 +8531,11 @@ int skill_status_change_start(struct block_list *bl, int type, int val1, int val
return 0;/* ?ぎ足しができない?態異常である時は?態異常を行わない */
if(type == SC_GRAFFITI){ //異常中にもう一度?態異常になった時に解除してから再度かかる
skill_status_change_end(bl,type,-1);
- }else{
- (*sc_count)--;
- delete_timer(sc_data[type].timer, skill_status_change_timer);
- sc_data[type].timer = -1;
- }
+ } else {
+ (*sc_count)--;
+ delete_timer(sc_data[type].timer, skill_status_change_timer);
+ sc_data[type].timer = -1;
+ }
}
switch(type){ /* 異常の種類ごとの?理 */
@@ -8566,9 +8572,17 @@ int skill_status_change_start(struct block_list *bl, int type, int val1, int val
skill_status_change_end(bl,SC_WINDWALK,-1);
break;
case SC_DECREASEAGI: /* 速度減少 */
+ if (bl->type == BL_PC) // Celest
+ tick>>=1;
calc_flag = 1;
if(sc_data[SC_INCREASEAGI].timer!=-1 )
skill_status_change_end(bl,SC_INCREASEAGI,-1);
+ if(sc_data[SC_ADRENALINE].timer!=-1 )
+ skill_status_change_end(bl,SC_ADRENALINE,-1);
+ if(sc_data[SC_SPEARSQUICKEN].timer!=-1 )
+ skill_status_change_end(bl,SC_SPEARSQUICKEN,-1);
+ if(sc_data[SC_TWOHANDQUICKEN].timer!=-1 )
+ skill_status_change_end(bl,SC_TWOHANDQUICKEN,-1);
break;
case SC_SIGNUMCRUCIS: /* シグナムクルシス */
calc_flag = 1;
@@ -8582,10 +8596,14 @@ int skill_status_change_start(struct block_list *bl, int type, int val1, int val
return 0;
break;
case SC_TWOHANDQUICKEN: /* 2HQ */
+ if(sc_data[SC_DECREASEAGI].timer!=-1)
+ return 0;
*opt3 |= 1;
calc_flag = 1;
break;
case SC_ADRENALINE: /* アドレナリンラッシュ */
+ if(sc_data[SC_DECREASEAGI].timer!=-1)
+ return 0;
calc_flag = 1;
break;
case SC_WEAPONPERFECTION: /* ウェポンパ?フェクション */
@@ -9253,7 +9271,7 @@ int skill_check_cloaking(struct block_list *bl)
if(bl->type == BL_PC &&
(battle_config.pc_cloak_check_type&1 || pc_checkskill(sd,AS_CLOAKING)>2))
return 0;
- if(bl->type == BL_MOB && battle_config.monster_cloak_check_type&1)
+ else if(bl->type == BL_MOB && battle_config.monster_cloak_check_type&1)
return 0;
for(i=0;i<sizeof(dx)/sizeof(dx[0]);i++){
int c=map_getcell(bl->m,bl->x+dx[i],bl->y+dy[i]);
@@ -9275,7 +9293,7 @@ int skill_type_cloaking(struct block_list *bl)
nullpo_retr(0, bl);
if(bl->type == BL_PC && battle_config.pc_cloak_check_type&1)
return 0;
- if(bl->type == BL_MOB && battle_config.monster_cloak_check_type&1)
+ else if(bl->type == BL_MOB && battle_config.monster_cloak_check_type&1)
return 0;
for(i=0; i<sizeof(dx)/sizeof(dx[0]); i++)
{