diff options
author | Fate <fate-tmw@googlemail.com> | 2009-05-14 09:13:20 +0000 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2009-05-14 09:13:20 +0000 |
commit | 226d345c10e5271f026584083090e46ebc580f3e (patch) | |
tree | 42cb54ba995715912dd7cbbee6dd40dc6cf401e7 | |
parent | f5f588157c209bc90f7c9f14ec4ed1403fdd1ee7 (diff) | |
download | tmwa-226d345c10e5271f026584083090e46ebc580f3e.tar.gz tmwa-226d345c10e5271f026584083090e46ebc580f3e.tar.bz2 tmwa-226d345c10e5271f026584083090e46ebc580f3e.tar.xz tmwa-226d345c10e5271f026584083090e46ebc580f3e.zip |
Fine-tuned poison: lower HP further and slow down health item regeneration
-rw-r--r-- | src/map/mob.c | 4 | ||||
-rw-r--r-- | src/map/pc.c | 6 | ||||
-rw-r--r-- | src/map/skill.c | 12 | ||||
-rw-r--r-- | src/map/skill.h | 2 |
4 files changed, 14 insertions, 10 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 5a57472..51a83d2 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -3093,10 +3093,8 @@ int mobskill_castend_id( int tid, unsigned int tick, int id,int data ) printf("mobskill_castend_id nullpo mbl->id:%d\n",mbl->id); return 0; } - if( md->bl.type!=BL_MOB || md->bl.prev==NULL ) return 0; - if( md->skilltimer != tid ) // タイマIDの確認 return 0; @@ -3335,6 +3333,7 @@ int mobskill_use_id(struct mob_data *md,struct block_list *target,int skill_idx) range = skill_get_range(skill_id,skill_lv); if(range < 0) range = battle_get_range(&md->bl) - (range + 1); + if(!battle_check_range(&md->bl,target,range)) return 0; @@ -4200,6 +4199,7 @@ static int mob_readskilldb(void) } ms->skill_id=atoi(sp[3]); ms->skill_lv=atoi(sp[4]); + ms->permillage=atoi(sp[5]); ms->casttime=atoi(sp[6]); ms->delay=atoi(sp[7]); diff --git a/src/map/pc.c b/src/map/pc.c index 9703ee0..8933000 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7090,10 +7090,12 @@ static int pc_natural_heal_sub(struct map_session_data *sd,va_list ap) { } if (sd->sc_data[SC_HALT_REGENERATE].timer != -1) - return 0; + return 0; if (sd->quick_regeneration_hp.amount || sd->quick_regeneration_sp.amount) { - int hp_bonus = pc_quickregenerate_effect(&sd->quick_regeneration_hp, sd->nhealhp); + int hp_bonus = pc_quickregenerate_effect(&sd->quick_regeneration_hp, + sd->sc_data[SC_POISON].timer == -1 ? + sd->nhealhp : 1); // [fate] slow down when poisoned int sp_bonus = pc_quickregenerate_effect(&sd->quick_regeneration_sp, sd->nhealsp); pc_itemheal_effect(sd, hp_bonus, sp_bonus); diff --git a/src/map/skill.c b/src/map/skill.c index 40eaeaa..8a25f64 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1075,7 +1075,7 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s case NPC_SILENCEATTACK: case NPC_STUNATTACK: if(rand()%100 < sc_def_vit) - skill_status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0); + skill_status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skilllv * skilllv * 5000,0); break; case NPC_CURSEATTACK: if(rand()%100 < sc_def_luk) @@ -7965,8 +7965,9 @@ int skill_status_change_timer(int tid, unsigned int tick, int id, int data) case SC_POISON: if(sc_data[SC_SLOWPOISON].timer == -1) { if( (--sc_data[type].val3) > 0) { - int hp = battle_get_max_hp(bl); - if(battle_get_hp(bl) > hp>>2) { + + int hp = battle_get_max_hp(bl); + if(battle_get_hp(bl) > hp>>4) { if(bl->type == BL_PC) { hp = 3 + hp*3/200; pc_heal((struct map_session_data *)bl,-hp,0); @@ -7983,9 +7984,10 @@ int skill_status_change_timer(int tid, unsigned int tick, int id, int data) } } else - sc_data[type].timer=add_timer(1000+tick,skill_status_change_timer, bl->id, data ); + sc_data[type].timer=add_timer(2000+tick,skill_status_change_timer, bl->id, data ); break; - case SC_TENSIONRELAX: /* テンションリラックス */ + + case SC_TENSIONRELAX: /* テンションリラックス */ if(sd){ /* SPがあって、HPが満タンでなければ継続 */ if( sd->status.sp > 12 && sd->status.max_hp > sd->status.hp ){ if(sc_data[type].val2 % (sc_data[type].val1+3) ==0 ){ diff --git a/src/map/skill.h b/src/map/skill.h index 0060878..bfbe93e 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -377,7 +377,7 @@ enum { TF_MISS, TF_STEAL, TF_HIDING, - TF_POISON, + TF_POISON, // 52 TF_DETOXIFY, ALL_RESURRECTION, |