summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-02 15:31:16 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-02 15:31:16 +0000
commit0aeec655ffcf8b5ec07403d28230f58c6aa60a15 (patch)
tree919fbb16119fb4983bad299b92126f419692281c /src/map
parent9f50edd607e15ab31109bce9f914ec86a184154a (diff)
downloadhercules-0aeec655ffcf8b5ec07403d28230f58c6aa60a15.tar.gz
hercules-0aeec655ffcf8b5ec07403d28230f58c6aa60a15.tar.bz2
hercules-0aeec655ffcf8b5ec07403d28230f58c6aa60a15.tar.xz
hercules-0aeec655ffcf8b5ec07403d28230f58c6aa60a15.zip
- Gospel no longer blocks item usage of whoever is in the area of effect.
- Added the long/near attack_def_rate card effects to battle_calc_magic - Cleaned up a bit the slim pitcher code. - Elemental fields should vanish on map-change now. - Land Protector only blocks magical skills. - Adjusted the duration of blind/bleeding of Meteor Assault git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5426 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c6
-rw-r--r--src/map/pc.c16
-rw-r--r--src/map/skill.c49
3 files changed, 44 insertions, 27 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index ee7c4e6a8..4a5105d84 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2671,6 +2671,12 @@ struct Damage battle_calc_magic_attack(
continue;
}
}
+ //It was discovered that ranged defense also counts vs magic! [Skotlex]
+ if (ad.flag&BF_SHORT)
+ cardfix=cardfix*(100-tsd->near_attack_def_rate)/100;
+ else
+ cardfix=cardfix*(100-tsd->long_attack_def_rate)/100;
+
cardfix=cardfix*(100-tsd->magic_def_rate)/100;
MATK_RATE(cardfix);
diff --git a/src/map/pc.c b/src/map/pc.c
index 0be77386f..4b73572eb 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2710,7 +2710,7 @@ int pc_useitem(struct map_session_data *sd,int n)
sd->sc.data[SC_MARIONETTE].timer!=-1 ||
sd->sc.data[SC_GRAVITATION].timer!=-1 ||
//Cannot use Potions/Healing items while under Gospel.
- (sd->sc.data[SC_GOSPEL].timer!=-1 && sd->sc.data[SC_GOSPEL].val4 != BCT_SELF && sd->inventory_data[n]->type == 0)
+ (sd->sc.data[SC_GOSPEL].timer!=-1 && sd->sc.data[SC_GOSPEL].val4 == BCT_SELF && sd->inventory_data[n]->type == 0)
))
return 0;
@@ -3134,6 +3134,14 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
status_change_end(&sd->bl,SC_STAR_COMFORT,-1);
}
}
+
+ if (sd->mapindex != mapindex)
+ { //Misc map-changing settings
+ party_send_dot_remove(sd); //minimap dot fix [Kevin]
+ guild_send_dot_remove(sd);
+ skill_clear_element_field(&sd->bl);
+ }
+
if(sd->status.pet_id > 0 && sd->pd && sd->pet.intimate > 0) {
pet_stopattack(sd->pd);
pet_changestate(sd->pd,MS_IDLE,0);
@@ -3240,12 +3248,6 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
clif_changemap(sd,map[m].index,x,y); // [MouseJstr]
}
- if (sd->mapindex != mapindex) //minimap dot fix [Kevin]
- {
- party_send_dot_remove(sd);
- guild_send_dot_remove(sd);
- }
-
sd->mapindex = mapindex;
sd->bl.m = m;
sd->to_x = x;
diff --git a/src/map/skill.c b/src/map/skill.c
index 6207a639a..4c1a7dd57 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2466,10 +2466,12 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s
return 1;
if (skillid && skill_get_type(skillid) == BF_MAGIC &&
- !battle_config.gtb_pvp_only && status_isimmune(bl))
+ !battle_config.gtb_pvp_only && status_isimmune(bl)) {
+ if (sd) clif_skill_fail(sd,skillid,0,0);
//GTB makes all targetted skills silently fail.
return 1;
-
+ }
+
sc = status_get_sc(src);
if (sc && !sc->count)
sc = NULL; //Unneeded
@@ -5243,21 +5245,19 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
// Slim Pitcher
case CR_SLIMPITCHER:
- {
- if (sd && flag&1) {
- struct block_list tbl;
- int hp = potion_hp * (100 + pc_checkskill(sd,CR_SLIMPITCHER)*10 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)/100;
- hp = hp * (100 + (status_get_vit(bl)<<1))/100;
- if (dstsd) {
- hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10)/100;
- }
- tbl.id = 0;
- tbl.m = src->m;
- tbl.x = src->x;
- tbl.y = src->y;
- clif_skill_nodamage(&tbl,bl,AL_HEAL,hp,1);
- battle_heal(NULL,bl,hp,0,0);
+ if (potion_hp) {
+ struct block_list tbl;
+ int hp = potion_hp;
+ hp = hp * (100 + (status_get_vit(bl)<<1))/100;
+ if (dstsd) {
+ hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10)/100;
}
+ tbl.id = 0;
+ tbl.m = src->m;
+ tbl.x = src->x;
+ tbl.y = src->y;
+ clif_skill_nodamage(&tbl,bl,AL_HEAL,hp,1);
+ battle_heal(NULL,bl,hp,0,0);
}
break;
// Full Chemical Protection
@@ -6120,6 +6120,12 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
pc_delitem(sd,j,skill_db[skillid].amount[i],0);
potion_flag = 0;
clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
+ //Apply skill bonuses
+ potion_hp = potion_hp * (100
+ + pc_checkskill(sd,CR_SLIMPITCHER)*10
+ + pc_checkskill(sd,AM_POTIONPITCHER)*10
+ + pc_checkskill(sd,AM_LEARNINGPOTION)*5
+ )/100;
if(potion_hp > 0) {
i = skill_get_splash(skillid, skilllv);
map_foreachinarea(skill_area_sub,
@@ -6634,7 +6640,8 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
nullpo_retr(0, sg=src->group);
nullpo_retr(0, ss=map_id2bl(sg->src_id));
- if (map_getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR))
+ if (skill_get_type(sg->skill_id) == BF_MAGIC &&
+ map_getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR))
return 0; //AoE skills are ineffective. [Skotlex]
if (battle_check_target(&src->bl,bl,sg->target_flag)<=0)
@@ -6741,13 +6748,15 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
if(src->limit + sg->tick > tick + 700)
src->limit = DIFF_TICK(tick+700,sg->tick);
break;
+/* Removed. Gospel does not blocks item usage for others. [Skotlex]
case UNT_GOSPEL:
if (sg->src_id != bl->id && sc && sc->data[type].timer==-1
&& battle_check_target(ss,bl,BCT_PARTY)>0)
//Start Gospel Effect to prevent item usage affects party only. [Skotlex]
status_change_start(bl,type,100,sg->skill_lv,0,0,BCT_ALL,sg->limit,0);
break;
- }
+*/
+ }
return sg->skill_id;
}
@@ -9536,8 +9545,8 @@ int skill_landprotector(struct block_list *bl, va_list ap )
return 1;
}
- if (skill_get_inf2(unit->group->skill_id)&INF2_TRAP)
- return 0; //Traps cannot be removed by Land Protector/Ganbantein
+ if (skill_get_type(unit->group->skill_id) != BF_MAGIC)
+ return 0; //Only blocks out magical skills.````````
if (skillid == SA_LANDPROTECTOR || skillid == HW_GANBANTEIN ) {
skill_delunit(unit);