summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--db/skill_cast_db.txt2
-rw-r--r--src/map/skill.c11
-rw-r--r--src/map/status.c22
-rw-r--r--src/map/unit.c2
5 files changed, 26 insertions, 14 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index e4c091c32..7e10c6a5f 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/08/30
+ * Updated HLIF_CHANGE to work as explained by Tharis -> It now adds 30*lv
+ vit and 20*lv int, is dispelled on warp, and can-act delay is 5+5*lv
+ minutes. Hp/Sp is no longer set to 10 after a forced expiration. [Skotlex]
* Fixed up char-sql compilation. [Skotlex]
* Added a message to @clearweather stating when climate changes will
dispel. [Skotlex]
diff --git a/db/skill_cast_db.txt b/db/skill_cast_db.txt
index 3d157a558..9c9f15eea 100644
--- a/db/skill_cast_db.txt
+++ b/db/skill_cast_db.txt
@@ -962,7 +962,7 @@
//-- HLIF_AVOID
8002,0,0,0,40000:35000:30000:25000:20000,40000:45000:50000:55000:60000
//-- HLIF_CHANGE
-8004,0,0,0,60000:180000:300000,600000:900000:1200000
+8004,0,600000:900000:1200000,0,60000:180000:300000,0
//-- HAMI_CASTLE
8005,0,0,0,0,60000:70000:80000:90000:129000
//-- HAMI_DEFENCE
diff --git a/src/map/skill.c b/src/map/skill.c
index 5b99b7722..0a6decf22 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -10738,6 +10738,11 @@ int skill_blockpc_start(struct map_session_data *sd, int skillid, int tick)
if (skillid < 1 || skillid > MAX_SKILL)
return -1;
+ if (tick < 1) {
+ sd->blockskill[skillid] = 0;
+ return -1;
+ }
+
sd->blockskill[skillid] = 1;
return add_timer(gettick()+tick,skill_blockpc_end,sd->bl.id,skillid);
}
@@ -10755,7 +10760,7 @@ int skill_blockmerc_end (int tid, unsigned int tick, int id, int data) //[orn]
int skill_blockmerc_start(struct homun_data *hd, int skillid, int tick) //[orn]
{
nullpo_retr (-1, hd);
-
+
if (skillid >= GD_SKILLBASE)
skillid = GD_SKILLRANGEMIN + skillid - GD_SKILLBASE;
if (skillid >= HM_SKILLBASE) //[orn]
@@ -10763,6 +10768,10 @@ int skill_blockmerc_start(struct homun_data *hd, int skillid, int tick) //[orn]
if (skillid < 1 || skillid > MAX_SKILL)
return -1;
+ if (tick < 1) {
+ hd->blockskill[skillid] = 0;
+ return -1;
+ }
hd->blockskill[skillid] = 1;
return add_timer(gettick()+tick,skill_blockmerc_end,hd->bl.id,skillid);
}
diff --git a/src/map/status.c b/src/map/status.c
index 27bce71ce..34459b495 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -379,7 +379,7 @@ void initChangeTables(void) {
add_sc(SA_ELEMENTWIND, SC_ELEMENTALCHANGE);
set_sc(HLIF_AVOID, SC_AVOID, SI_BLANK, SCB_SPEED);
- set_sc(HLIF_CHANGE, SC_CHANGE, SI_BLANK, SCB_MAXHP|SCB_MAXSP);
+ set_sc(HLIF_CHANGE, SC_CHANGE, SI_BLANK, SCB_VIT|SCB_INT);
set_sc(HFLI_FLEET, SC_FLEET, SI_BLANK, SCB_ASPD|SCB_BATK|SCB_WATK);
set_sc(HFLI_SPEED, SC_SPEED, SI_BLANK, SCB_FLEE); //[orn]
set_sc(HAMI_DEFENCE, SC_DEFENCE, SI_BLANK, SCB_DEF); //[orn]
@@ -3126,6 +3126,8 @@ static unsigned short status_calc_vit(struct block_list *bl, struct status_chang
vit += sc->data[SC_INCVIT].val1;
if(sc->data[SC_VITFOOD].timer!=-1)
vit += sc->data[SC_VITFOOD].val1;
+ if(sc->data[SC_CHANGE].timer!=-1)
+ vit += sc->data[SC_CHANGE].val2;
if(sc->data[SC_GUILDAURA].timer != -1 && sc->data[SC_GUILDAURA].val3&0xFFFF)
vit += sc->data[SC_GUILDAURA].val3&0xFFFF;
if(sc->data[SC_TRUESIGHT].timer!=-1)
@@ -3153,6 +3155,8 @@ static unsigned short status_calc_int(struct block_list *bl, struct status_chang
int_ += sc->data[SC_INCINT].val1;
if(sc->data[SC_INTFOOD].timer!=-1)
int_ += sc->data[SC_INTFOOD].val1;
+ if(sc->data[SC_CHANGE].timer!=-1)
+ int_ += sc->data[SC_CHANGE].val3;
if(sc->data[SC_BATTLEORDERS].timer!=-1)
int_ += 5;
if(sc->data[SC_TRUESIGHT].timer!=-1)
@@ -3744,8 +3748,6 @@ static unsigned int status_calc_maxhp(struct block_list *bl, struct status_chang
if(!sc || !sc->count)
return cap_value(maxhp,1,UINT_MAX);
- if(sc->data[SC_CHANGE].timer!=-1)
- maxhp = sc->data[SC_CHANGE].val3;
if(sc->data[SC_INCMHPRATE].timer!=-1)
maxhp += maxhp * sc->data[SC_INCMHPRATE].val1/100;
if(sc->data[SC_APPLEIDUN].timer!=-1)
@@ -3763,8 +3765,6 @@ static unsigned int status_calc_maxsp(struct block_list *bl, struct status_chang
if(!sc || !sc->count)
return cap_value(maxsp,1,UINT_MAX);
- if(sc->data[SC_CHANGE].timer!=-1)
- maxsp = sc->data[SC_CHANGE].val2;
if(sc->data[SC_INCMSPRATE].timer!=-1)
maxsp += maxsp * sc->data[SC_INCMSPRATE].val1/100;
if(sc->data[SC_SERVICE4U].timer!=-1)
@@ -5554,12 +5554,8 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
val2=(val1+1)/2; // number of hits blocked
break;
case SC_CHANGE:
- {
- struct status_data *status = status_get_base_status(bl);
- if (!status) return 0;
- val2= status->max_hp; //Base Max HP
- val3= status->max_sp; //Base Max SP
- }
+ val2= 30*val1; //Vit increase
+ val3= 20*val1; //Int increase
break;
case SC_ARMOR_ELEMENT:
break; // It just change the armor element of the player (used by battle_attr_fix)
@@ -6132,7 +6128,9 @@ int status_change_end( struct block_list* bl , int type,int tid )
}
break; //guess hes not in jail :P
case SC_CHANGE:
- // "lose almost all her HP and SP"
+ if (tid == -1)
+ break;
+ // "lose almost all her HP and SP" on natural expiration.
status_set_hp(bl, 10, 0);
status_set_sp(bl, 10, 0);
break;
diff --git a/src/map/unit.c b/src/map/unit.c
index 8e34eca45..6881d487d 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1529,6 +1529,8 @@ int unit_remove_map(struct block_list *bl, int clrtype) {
status_change_end(bl, SC_CHASEWALK, -1);
if (sc->data[SC_GOSPEL].timer != -1 && sc->data[SC_GOSPEL].val4 == BCT_SELF)
status_change_end(bl, SC_GOSPEL, -1);
+ if (sc->data[SC_CHANGE].timer!=-1)
+ status_change_end(bl, SC_CHANGE, -1);
}
if (bl->type&BL_CHAR) {