summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-16 21:57:15 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-16 21:57:15 +0000
commit491a29e76c56358d0d33f583389a92f296980ab8 (patch)
tree458e79eb84650ada2f11d3b139ce3e92d81057d3
parent84567e0e4af0c4913547f1945d76bccf345b5316 (diff)
downloadhercules-491a29e76c56358d0d33f583389a92f296980ab8.tar.gz
hercules-491a29e76c56358d0d33f583389a92f296980ab8.tar.bz2
hercules-491a29e76c56358d0d33f583389a92f296980ab8.tar.xz
hercules-491a29e76c56358d0d33f583389a92f296980ab8.zip
Added pk_min_level and modified cloaking checks a liiittle bit
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@226 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog.txt4
-rw-r--r--conf-tmpl/battle_athena.conf7
-rw-r--r--src/map/battle.c7
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/skill.c44
5 files changed, 35 insertions, 28 deletions
diff --git a/Changelog.txt b/Changelog.txt
index 3decfbc99..c6a20d0b8 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -15,6 +15,10 @@ Date Added
* Added 'indoors' mapflag : When in-doors players will not be affected by Night [celest]
* Skill updates [celest]
- Assumptio is now disabled in GvG maps.
+ - Changed cloaking checks a bit.
+ - Tidied up some parts of skill.c abit. ;P
+ * Added pk_min_level option in battle_athena.conf. Change this to define the
+ minimum level players can attack others when pk_mode is on. [celest]
11/15
* Added a Database Changelog.txt File, use it for any changes inside the db folder. [shadowlady]
diff --git a/conf-tmpl/battle_athena.conf b/conf-tmpl/battle_athena.conf
index 4061056c6..d8776138f 100644
--- a/conf-tmpl/battle_athena.conf
+++ b/conf-tmpl/battle_athena.conf
@@ -596,7 +596,7 @@ player_skill_partner_check: yes
// Is the character of a GM account set as the object of a display by @ command etc. or not?
hide_GM_session: no
-// ユニット移動処-摯-@。0で-{鯖仕-l(回線負荷→重、鯖処-掾ィ軽)、1でAthena仕-l(回線負荷→軽、鯖処-掾ィ重)
+// ユニット移動処-摯?@。0で-{鯖仕-l(回線負荷→重、鯖処-掾ィ軽)、1でAthena仕-l(回線負荷→軽、鯖処-掾ィ重)
// translation (babelfish):
// Unit portable place - ? @.
// With 0 - {mackerel SI -l (circuit load -> heavily, the mackerel place - the ? ? lightly),
@@ -607,7 +607,7 @@ unit_movement_type: 0
// It does not accept by no accepted by yes.
invite_request_check: yes
-// リムーブトラップの仕-l 0:-{鯖仕-l、罠1個 1:Athena仕-l、使ったアイテムを使った個数
+// リ??ブトラップの仕-l 0:-{鯖仕-l、罠1個 1:Athena仕-l、使ったアイテ?を使った個数
// translation (babelfish):
// SI of ???????? -l
// 0: - {Mackerel SI -l, trap 1
@@ -649,6 +649,9 @@ equipment_break_rate: 100
// Normal pvp counter and rank display are disabled as well.
pk_mode: no
+// For PK Server Mode. Change this to define the minimum level players can start PK-ing
+pk_min_level: 55
+
// Turn this on to allow a player to level up more than once from a kill. (Note 1)
multi_level_up: no
diff --git a/src/map/battle.c b/src/map/battle.c
index 27efdd9e8..23bdca930 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -4810,7 +4810,10 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
if(map[ss->m].flag.pvp || pc_iskiller((struct map_session_data *)ss, (struct map_session_data*)target)) { // [MouseJstr]
if(su && su->group->target_flag==BCT_NOENEMY)
return 1;
- else if(battle_config.pk_mode && (((struct map_session_data*)ss)->status.class==0 || ((struct map_session_data*)target)->status.class==0))
+ else if (battle_config.pk_mode &&
+ (((struct map_session_data*)ss)->status.class==0 || ((struct map_session_data*)target)->status.class==0 ||
+ ((struct map_session_data*)ss)->status.base_level < battle_config.pk_min_level ||
+ ((struct map_session_data*)target)->status.base_level < battle_config.pk_min_level))
return 1; // prevent novice engagement in pk_mode [Valaris]
else if(map[ss->m].flag.pvp_noparty && s_p > 0 && t_p > 0 && s_p == t_p)
return 1;
@@ -5110,6 +5113,7 @@ 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]
//SQL-only options start
#ifndef TXT_ONLY
{ "mail_system", &battle_config.mail_system }, // added by [Valaris]
@@ -5331,6 +5335,7 @@ void battle_set_defaults() {
battle_config.max_cloth_color = 4;
battle_config.zeny_from_mobs = 0;
battle_config.mobs_level_up = 0;
+ battle_config.pk_min_level = 55;
battle_config.castrate_dex_scale = 150;
diff --git a/src/map/battle.h b/src/map/battle.h
index 97fa369a4..5499256d8 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -333,6 +333,7 @@ extern struct Battle_Config {
int zeny_from_mobs; // [Valaris]
int mobs_level_up; // [Valaris]
+ int pk_min_level; // [celest]
#ifndef TXT_ONLY /* SQL-only options */
int mail_system; // [Valaris]
diff --git a/src/map/skill.c b/src/map/skill.c
index a656423fd..e858d49df 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2828,22 +2828,22 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
break;
case SA_ABRACADABRA:
- //require 1 yellow gemstone even with mistress card or Into the Abyss
- if (pc_search_inventory(sd, 715) <= 0 ) {
- clif_skill_fail(sd,sd->skillid,0,0);
+ //require 1 yellow gemstone even with mistress card or Into the Abyss
+ if (pc_search_inventory(sd, 715) <= 0 ) {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ break;
+ }
+ pc_delitem(sd, pc_search_inventory(sd, 715), 1, 0);
+ //
+ do{
+ abra_skillid=skill_abra_dataset(skilllv);
+ }while(abra_skillid == 0);
+ abra_skilllv=skill_get_max(abra_skillid)>pc_checkskill(sd,SA_ABRACADABRA)?pc_checkskill(sd,SA_ABRACADABRA):skill_get_max(abra_skillid);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ sd->skillitem=abra_skillid;
+ sd->skillitemlv=abra_skilllv;
+ clif_item_skill(sd,abra_skillid,abra_skilllv,"アブラカダブラ");
break;
- }
- pc_delitem(sd, pc_search_inventory(sd, 715), 1, 0);
- //
- do{
- abra_skillid=skill_abra_dataset(skilllv);
- }while(abra_skillid == 0);
- abra_skilllv=skill_get_max(abra_skillid)>pc_checkskill(sd,SA_ABRACADABRA)?pc_checkskill(sd,SA_ABRACADABRA):skill_get_max(abra_skillid);
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- sd->skillitem=abra_skillid;
- sd->skillitemlv=abra_skilllv;
- clif_item_skill(sd,abra_skillid,abra_skilllv,"アブラカダブラ");
- break;
case SA_COMA:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
@@ -4240,11 +4240,6 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
break;
-
-
-
-
-
case RG_CLEANER: //AppleGirl
clif_skill_nodamage(src,bl,skillid,skilllv,1);
{
@@ -9245,17 +9240,16 @@ int skill_status_change_clear(struct block_list *bl, int type)
/* クロ?キング?査(周りに移動不可能地?があるか) */
int skill_check_cloaking(struct block_list *bl)
{
- struct map_session_data *sd=NULL;
static int dx[]={-1, 0, 1,-1, 1,-1, 0, 1};
static int dy[]={-1,-1,-1, 0, 0, 1, 1, 1};
int end=1,i;
nullpo_retr(0, bl);
- sd=(struct map_session_data *)bl; //missing sd [Found by Celest, commited by Aria]
+ //missing sd [Found by Celest, commited by Aria]
+ struct map_session_data *sd=(struct map_session_data *)bl;
- if(pc_checkskill(sd,AS_CLOAKING)>2)
- return 0;
- if(bl->type == BL_PC && battle_config.pc_cloak_check_type&1)
+ 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)
return 0;