diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-02-21 08:23:38 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-02-21 08:23:38 +0000 |
commit | acba7fdde4f74b57c5d502c1b5b60b65fc5192d1 (patch) | |
tree | 0c0366dfc960f571da976f918065938083834104 /src/map/status.c | |
parent | cf48a28cd318ad30a769de8dd3d1cc36ff504a8f (diff) | |
download | hercules-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/status.c')
-rw-r--r-- | src/map/status.c | 79 |
1 files changed, 39 insertions, 40 deletions
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; |