summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-05 23:10:47 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-05 23:10:47 +0000
commit5eb3f45f49a8437e82fa27a52c70c0a611acaeb3 (patch)
tree8a92fc9ac462787ea804d064477318eb6e3cdb80 /src/map/pc.c
parentcf7fd037745119d150db5e91fb3978b00f2b8851 (diff)
downloadhercules-5eb3f45f49a8437e82fa27a52c70c0a611acaeb3.tar.gz
hercules-5eb3f45f49a8437e82fa27a52c70c0a611acaeb3.tar.bz2
hercules-5eb3f45f49a8437e82fa27a52c70c0a611acaeb3.tar.xz
hercules-5eb3f45f49a8437e82fa27a52c70c0a611acaeb3.zip
- Updated the code so that now a range of a skill is determined by the skill's range in the db. Now only skills with less than 5 cells of range are melee.
- The inf2 parameter of the skill_db is now red as an hexadecimal. - Updated comments and inf2 values of the skill_db to use the new format. - Soul Change now can't be casted on self. - Updated range of Grandcross, Granddarkness and Gospel to 5 so when they attack their attack type is counted as ranged. - Splitted the super novice flag in two, to keep seperate counters for the chant and for the self-revival. The self-revive will now trigger only once per level per session, if you relog you can have it trigger again. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9794 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index b268ed629..82f85c1ca 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -282,9 +282,9 @@ int pc_setrestartvalue(struct map_session_data *sd,int type) {
if (type&1)
{ //Normal resurrection
status->hp = 1; //Otherwise status_heal may fail if dead.
- if(sd->state.snovice_flag == 4) { // [Celest]
+ if(sd->state.snovice_dead_flag == 1) { // [Celest]
status_heal(&sd->bl, status->max_hp, status->max_sp, 1);
- sd->state.snovice_flag = 0;
+ sd->state.snovice_dead_flag = 2;
sc_start(&sd->bl,SkillStatusChangeTable(MO_STEELBODY),100,1,skill_get_time(MO_STEELBODY,1));
} else
status_heal(&sd->bl, b_status->hp, b_status->sp>status->sp?b_status->sp-status->sp:0, 1);
@@ -4090,6 +4090,8 @@ int pc_checkbaselevelup(struct map_session_data *sd)
sc_start(&sd->bl,SkillStatusChangeTable(PR_MAGNIFICAT),100,1,skill_get_time(PR_MAGNIFICAT,1));
sc_start(&sd->bl,SkillStatusChangeTable(PR_GLORIA),100,1,skill_get_time(PR_GLORIA,1));
sc_start(&sd->bl,SkillStatusChangeTable(PR_SUFFRAGIUM),100,1,skill_get_time(PR_SUFFRAGIUM,1));
+ if (sd->state.snovice_dead_flag == 2)
+ sd->state.snovice_dead_flag = 0; //Reenable steelbody resurrection on dead.
} else
if((sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON || (sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR)
{
@@ -5021,15 +5023,16 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
}
// activate Steel body if a super novice dies at 99+% exp [celest]
- if ((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE) {
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && !sd->state.snovice_dead_flag)
+ {
if ((i=pc_nextbaseexp(sd))<=0)
i=sd->status.base_exp;
if (i>0 && (j=sd->status.base_exp*1000/i)>=990 && j<1000 && !map_flag_gvg(sd->bl.m))
- sd->state.snovice_flag = 4;
+ sd->state.snovice_dead_flag = 1;
}
// changed penalty options, added death by player if pk_mode [Valaris]
- if(battle_config.death_penalty_type && sd->state.snovice_flag != 4
+ if(battle_config.death_penalty_type && sd->state.snovice_dead_flag != 1
&& (sd->class_&MAPID_UPPERMASK) != MAPID_NOVICE // only novices will receive no penalty
&& !map[sd->bl.m].flag.noexppenalty && !map_flag_gvg(sd->bl.m)
&& sd->sc.data[SC_BABY].timer == -1)
@@ -5172,14 +5175,14 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
sc_start(&sd->bl,SkillStatusChangeTable(PR_KYRIE),100,10,skill_get_time2(SL_KAIZEL,j));
return 0;
}
- if (sd->state.snovice_flag == 4)
+ if (sd->state.snovice_dead_flag == 1)
{
pc_setstand(sd);
status_change_clear(&sd->bl,0);
clif_skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,1,1);
status_percent_heal(&sd->bl, 100, 100);
clif_resurrection(&sd->bl, 1);
- sd->state.snovice_flag = 0;
+ sd->state.snovice_dead_flag = 2;
if(battle_config.pc_invincible_time)
pc_setinvincibletimer(sd, battle_config.pc_invincible_time);
sc_start(&sd->bl,SkillStatusChangeTable(MO_STEELBODY),100,1,skill_get_time(MO_STEELBODY,1));