summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-21 08:23:38 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-21 08:23:38 +0000
commitacba7fdde4f74b57c5d502c1b5b60b65fc5192d1 (patch)
tree0c0366dfc960f571da976f918065938083834104 /src/map
parentcf48a28cd318ad30a769de8dd3d1cc36ff504a8f (diff)
downloadhercules-acba7fdde4f74b57c5d502c1b5b60b65fc5192d1.tar.gz
hercules-acba7fdde4f74b57c5d502c1b5b60b65fc5192d1.tar.bz2
hercules-acba7fdde4f74b57c5d502c1b5b60b65fc5192d1.tar.xz
hercules-acba7fdde4f74b57c5d502c1b5b60b65fc5192d1.zip
* Updated Bleeding effect
* Removed some unused code for Graffiti git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1147 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/mob.c3
-rw-r--r--src/map/pc.c3
-rw-r--r--src/map/skill.c2
-rw-r--r--src/map/status.c79
-rw-r--r--src/map/status.h54
5 files changed, 59 insertions, 82 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 6b2e4e37a..74a1c5889 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2811,9 +2811,10 @@ int mob_class_change(struct mob_data *md,int *value)
*/
int mob_heal(struct mob_data *md,int heal)
{
- int max_hp = status_get_max_hp(&md->bl);
+ int max_hp;
nullpo_retr(0, md);
+ max_hp = status_get_max_hp(&md->bl);
md->hp += heal;
if( max_hp < md->hp )
diff --git a/src/map/pc.c b/src/map/pc.c
index fc67196d5..416e05f97 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6538,7 +6538,8 @@ static int pc_natural_heal_sp(struct map_session_data *sd)
nullpo_retr(0, sd);
if (sd->sc_count && (sd->sc_data[SC_TRICKDEAD].timer != -1 || // Modified by RoVeRT
- sd->sc_data[SC_BERSERK].timer != -1))
+ sd->sc_data[SC_BERSERK].timer != -1 ||
+ sd->sc_data[SC_BLEEDING].timer != -1))
return 0;
if (sd->no_regen & 2)
diff --git a/src/map/skill.c b/src/map/skill.c
index 1eb09a8b7..9ae3e2ba4 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1019,7 +1019,7 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
{//?件が良く分からないので適?に
int race=status_get_race(bl);
if( !(battle_check_undead(race,status_get_elem_type(bl)) || race == 6) && rand()%100 < (2*skilllv+10)*sc_def_vit/100 )
- status_change_start(bl,SC_HEADCRUSH,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
}
break;
case LK_JOINTBEAT: /* ジョイントビ?ト */
diff --git a/src/map/status.c b/src/map/status.c
index 7b2edb38d..0d35572d0 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -241,7 +241,7 @@ int SkillStatusChangeTable[]={ /* status.hのenumのSC_***とあわせること */
SC_MOONLIT,
SC_MARIONETTE,
-1,
- SC_HEADCRUSH,
+ SC_BLEEDING,
SC_JOINTBEAT,
/* 400 */
-1,-1,
@@ -3072,13 +3072,9 @@ int status_change_start(struct block_list *bl,int type,int val1,int val2,int val
return 0;
if ((type >=SC_STAN && type <= SC_BLIND) || type == SC_DPOISON)
return 0;/* ?ぎ足しができない?態異常である時は?態異常を行わない */
- if(type == SC_GRAFFITI){ //異常中にもう一度?態異常になった時に解除してから再度かかる
- status_change_end(bl,type,-1);
- } else {
- (*sc_count)--;
- delete_timer(sc_data[type].timer, status_change_timer);
- sc_data[type].timer = -1;
- }
+ (*sc_count)--;
+ delete_timer(sc_data[type].timer, status_change_timer);
+ sc_data[type].timer = -1;
}
switch(type){ /* 異常の種類ごとの?理 */
@@ -3648,7 +3644,7 @@ int status_change_start(struct block_list *bl,int type,int val1,int val2,int val
case SC_AURABLADE: /* オ?ラブレ?ド */
case SC_PARRYING: /* パリイング */
// case SC_ASSUMPTIO: /* */
- case SC_HEADCRUSH: /* ヘッドクラッシュ */
+// case SC_HEADCRUSH: /* ヘッドクラッシュ */
// case SC_JOINTBEAT: /* ジョイントビ?ト */
// case SC_MARIONETTE: /* マリオネットコントロ?ル */
@@ -3764,14 +3760,6 @@ int status_change_start(struct block_list *bl,int type,int val1,int val2,int val
val2 = 3; //3回詠唱を1/3にする
break;
- case SC_GRAFFITI: /* グラフィティ */
- {
- struct skill_unit_group *sg = skill_unitsetting(bl,RG_GRAFFITI,val1,val2,val3,0);
- if(sg)
- val4 = (int)sg;
- }
- break;
-
case SC_SPLASHER: /* ベナムスプラッシャ? */
break;
@@ -3783,6 +3771,18 @@ int status_change_start(struct block_list *bl,int type,int val1,int val2,int val
case SC_PRESERVE:
break;
+ case SC_BLEEDING:
+ {
+ // every 1 vit deducts 1 second
+ val3 = tick - status_get_vit(bl) * 1000;
+ // minimum 50 seconds
+ if (val3 < 50000)
+ val3 = 50000;
+ val4 = 10000;
+ tick = 1000;
+ }
+ break;
+
case SC_SLOWDOWN:
case SC_SPEEDUP0:
calc_flag = 1;
@@ -4073,13 +4073,6 @@ int status_change_end( struct block_list* bl , int type,int tid )
}
calc_flag = 1;
break;
- case SC_GRAFFITI:
- {
- struct skill_unit_group *sg=(struct skill_unit_group *)sc_data[type].val4; //val4がグラフィティのgroup_id
- if(sg)
- skill_delunitgroup(sg);
- }
- break;
case SC_NOCHAT: //チャット禁止?態
{
struct map_session_data *sd=NULL;
@@ -4470,9 +4463,9 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
if( (--sc_data[type].val3) > 0) {
int hp = status_get_max_hp(bl);
if(status_get_hp(bl) > hp>>2) {
- if(bl->type == BL_PC) {
+ if(sd) {
hp = 3 + hp*3/200;
- pc_heal((struct map_session_data *)bl,-hp,0);
+ pc_heal(sd,-hp,0);
}
else if(bl->type == BL_MOB) {
struct mob_data *md;
@@ -4526,22 +4519,28 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
status_change_end(&sd->bl,SC_TENSIONRELAX,-1);
}
break;
- case SC_HEADCRUSH: // temporary damage [celest]
-// case SC_BLEEDING:
- if((--sc_data[type].val3) > 0) {
- int hp = status_get_max_hp(bl);
- if(sd) {
- hp = 3 + hp*3/200;
- pc_heal(sd,-hp,0);
+ case SC_BLEEDING: // [celest]
+ // i hope i haven't interpreted it wrong.. which i might ^^;
+ // Source:
+ // - 10ゥェエェネェヒHPェャハ盒
+ // - ェホェ゙ェ゙ォオ?ォミケヤムェ茘ォォーェキェニェ?ヘェマ眈ェィェハェ、
+ if((sc_data[type].val3 -= 1000) > 0) {
+ if((sc_data[type].val4 -= 1000) > 0) {
+ int hp = rand()%300+400;
+ if(sd) {
+ pc_heal(sd,-hp,0);
+ sd->canmove_tick = tick+1000;
+ }
+ else if(bl->type == BL_MOB) {
+ struct mob_data *md;
+ nullpo_retr(0, md=(struct mob_data *)bl);
+ md->hp -= hp;
+ }
}
- else if(bl->type == BL_MOB) {
- struct mob_data *md;
- nullpo_retr(0, md=(struct mob_data *)bl);
- /*if((md=((struct mob_data *)bl)) == NULL)
- break;*/
- hp = 3 + hp/200;
- md->hp -= hp;
+ if (sd) {
+ sd->canact_tick = tick+1000;
}
+
sc_data[type].timer=add_timer(1000+tick,status_change_timer, bl->id, data );
}
break;
diff --git a/src/map/status.h b/src/map/status.h
index 672bfc0da..d788c7b50 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -37,6 +37,8 @@ enum { // struct map_session_data の status_changeの番?テ?ブル
SC_TRICKDEAD = 29,
SC_LOUD = 30,
SC_ENERGYCOAT = 31,
+ SC_BROKNARMOR = 32,
+ SC_BROKNWEAPON = 33,
SC_HALLUCINATION = 34,
SC_WEIGHT50 = 35,
SC_WEIGHT90 = 36,
@@ -44,7 +46,9 @@ enum { // struct map_session_data の status_changeの番?テ?ブル
SC_SPEEDPOTION1 = 38,
SC_SPEEDPOTION2 = 39,
SC_SPEEDPOTION3 = 40,
-//-- 40-50
+ SC_SPEEDUP0 = 41, // for skill speedup
+ SC_SPEEDUP1 = 42, // for skill speedup
+//-- 43-50
SC_STRIPWEAPON = 50,
SC_STRIPSHIELD = 51,
SC_STRIPARMOR = 52,
@@ -78,7 +82,7 @@ enum { // struct map_session_data の status_changeの番?テ?ブル
SC_ASSUMPTIO = 110, /* アシャンプティオ */
//-- 111, 112
SC_MAGICPOWER = 113, /* 魔法力?幅 */
-//-- 114
+ SC_EDP = 114, /* エフェクトが判明したら移動 */
SC_TRUESIGHT = 115, /* トゥル?サイト */
SC_WINDWALK = 116, /* ウインドウォ?ク */
SC_MELTDOWN = 117, /* メルトダウン */
@@ -86,8 +90,9 @@ enum { // struct map_session_data の status_changeの番?テ?ブル
//-- 119
SC_REJECTSWORD = 120, /* リジェクトソ?ド */
SC_MARIONETTE = 121, /* マリオネットコントロ?ル */
-//-- 122, 123
- SC_HEADCRUSH = 124, /* ヘッドクラッシュ */
+ SC_MARIONETTE2 = 122, // Marionette target
+//-- 123
+ SC_BLEEDING = 124, /* ヘッドクラッシュ */
SC_JOINTBEAT = 125, /* ジョイントビ?ト */
//-- 126, 127
@@ -103,7 +108,7 @@ enum { // struct map_session_data の status_changeの番?テ?ブル
SC_CONFUSION = 135,
SC_BLIND = 136,
SC_DIVINA = SC_SILENCE,
-
+//-- 137-139
SC_SAFETYWALL = 140,
SC_PNEUMA = 141,
SC_WATERBALL = 142,
@@ -111,7 +116,7 @@ enum { // struct map_session_data の status_changeの番?テ?ブル
SC_DANCING = 144,
SC_KEEPING = 145,
SC_BARRIER = 146,
-
+//-- 147,148
SC_MAGICROD = 149,
SC_SIGHT = 150,
SC_RUWACH = 151,
@@ -122,8 +127,7 @@ enum { // struct map_session_data の status_changeの番?テ?ブル
SC_BLADESTOP_WAIT = 156,
SC_BLADESTOP = 157,
SC_EXTREMITYFIST = 158,
- SC_GRAFFITI = 159,
-
+//-- 159
SC_LULLABY =160,
SC_RICHMANKIM =161,
SC_ETERNALCHAOS =162,
@@ -143,7 +147,6 @@ enum { // struct map_session_data の status_changeの番?テ?ブル
SC_FORTUNE =176,
SC_SERVICE4U =177,
SC_SPIDERWEB =180, /* スパイダ?ウェッブ */
-// SC_EDP // moved
SC_SACRIFICE =184, /* サクリファイス */
SC_WEDDING =187, //結婚用(結婚衣裳になって?くのが?いとか)
SC_NOCHAT =188, //赤エモ?態
@@ -153,16 +156,11 @@ enum { // struct map_session_data の status_changeの番?テ?ブル
SC_DPOISON =198, /* 猛毒 */
// Used by English Team
- SC_BROKNARMOR =32,
- SC_BROKNWEAPON =33,
- SC_SPEEDUP0 =41, // for skill speedup
- SC_SPEEDUP1 =42, // for skill speedup
SC_SLOWDOWN =45, // for skill slowdown
SC_AUTOBERSERK =46,
SC_SIGHTTRASHER =73,
- SC_BASILICA =102, // temporarily use this before an actual id is found [celest]
- SC_EDP =114, /* エフェクトが判明したら移動 */
- SC_MARIONETTE2 =122, // Marionette target
+ SC_BASILICA =102, // temporarily use this before an actual id is found [celest]
+
SC_ENSEMBLE =159,
SC_FOGWALL =178,
SC_GOSPEL =179,
@@ -176,29 +174,7 @@ enum { // struct map_session_data の status_changeの番?テ?ブル
SC_LANDPROTECTOR =193,
SC_ADAPTATION =194,
SC_CHASEWALK =195,
- SC_REGENERATION =196,
-
-
-// [Celest]
- SC_BLEEDING = 124, // Temporarily same id as headcrush
-
-// -- testing various SC effects
-// SC_AURABLADE =81,
-// SC_CONCENTRATION =83,
-// SC_TENSIONRELAX =84,
-// SC_BERSERK =85,
-// SC_CALLSPIRITS =100,
-// SC_PARRYING =100,
-// SC_FREECAST =101,
-// SC_ABSORBSPIRIT =102,
-// SC_ASSUMPTIO =114,
-// SC_SHARPSHOOT =127,
-// SC_GANGSTER =184,
-// SC_CANNIBALIZE =186,
-// SC_SPHEREMINE =187,
-// SC_METEOSTORM =189,
-// SC_CASTCANCEL =190,
-// SC_SPIDERWEB =191,
+ SC_REGENERATION =196,
};
extern int SkillStatusChangeTable[];