summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-17 13:38:53 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-17 13:38:53 +0000
commit1e279e2478b89dd4cc5717f83aa9b86b99ef2048 (patch)
tree6e84ceaf86cbe3fe9e0a06a1a810d22d21090116
parentb4222488bbe68eb2533e033dd8b14e61fc830ef1 (diff)
downloadhercules-1e279e2478b89dd4cc5717f83aa9b86b99ef2048.tar.gz
hercules-1e279e2478b89dd4cc5717f83aa9b86b99ef2048.tar.bz2
hercules-1e279e2478b89dd4cc5717f83aa9b86b99ef2048.tar.xz
hercules-1e279e2478b89dd4cc5717f83aa9b86b99ef2048.zip
Added skill_steal_type and removed snatcher's steal fail message
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@231 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog.txt6
-rw-r--r--conf-tmpl/battle_athena.conf3
-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
6 files changed, 51 insertions, 15 deletions
diff --git a/Changelog.txt b/Changelog.txt
index 379112174..adf0c799c 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,4 +1,10 @@
Date Added
+11/17 * Added skill_steal_type to battle_athena.conf for the new (but unconfirmed)
+ stealing formula [celest]
+ * Skill updates: [celest]
+ - Removed annoying skill fail messages from rogue's Snatcher
+ - Add sc_data check for firewall and fogwall
+
11/16
* Fix for compiling against gcc 2.95 [MouseJstr]
* Added day of week events (OnSat2000) into scripting engine [MouseJstr]
diff --git a/conf-tmpl/battle_athena.conf b/conf-tmpl/battle_athena.conf
index d8776138f..ee7b4c01f 100644
--- a/conf-tmpl/battle_athena.conf
+++ b/conf-tmpl/battle_athena.conf
@@ -730,5 +730,8 @@ zeny_from_mobs: no
// Monsters level up (monster will level up each time a player is killed and they will grow stronger)
mobs_level_up: no
+// Use kRO new steal formula?
+skill_steal_type: yes
+
import: conf/import/battle_conf.txt
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++)
{