Skip to content

Commit

Permalink
Jack Frost, Status Traps, Stone Fling, Leap, Cannon Spear
Browse files Browse the repository at this point in the history
* Fixed status base chances of Jack Frost and Status Traps (fixes #997)
-- Jack Frost: 200% freeze chance instead of 100%
-- Land Mine: 10% stun chance instead of 35%-55%
-- Flasher: 100% blind chance instead of 40%-80%
-- Freezing Trap: 100% freeze chance of instead 38%-50%
* Sandman Sleep and Throw Stone Blind base duration is now 30s in pre-re and 20s in renewal
* Leap now has a shorter distance when used diagonally (fixes #1007)
* Cannon Spear now shows the skill animation even if it doesn't hit anything (fixes #1004)
  • Loading branch information
Playtester committed Mar 3, 2016
1 parent 3a5f3a3 commit 61a48b9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
6 changes: 3 additions & 3 deletions db/pre-re/skill_cast_db.txt
Expand Up @@ -207,7 +207,7 @@
//-- HT_SHOCKWAVE
118,0,0,0,200000:160000:120000:80000:40000,0,0
//-- HT_SANDMAN
119,0,0,0,150000:120000:90000:60000:30000,12000:14000:16000:18000:20000,0
119,0,0,0,150000:120000:90000:60000:30000,30000,0
//-- HT_FLASHER
120,0,0,0,150000:120000:90000:60000:30000,30000,0
//-- HT_FREEZINGTRAP
Expand Down Expand Up @@ -257,7 +257,7 @@
//-- TF_PICKSTONE
151,500,0,0,0,0,0
//-- TF_THROWSTONE
152,0,0,0,5000,8000,0
152,0,0,0,5000,30000,0

//-- MC_LOUD
155,0,0,0,300000,0,0
Expand Down Expand Up @@ -297,7 +297,7 @@
177,0,0,0,0,30000,0
//-- NPC_SILENCEATTACK
178,0,0,0,0,30000,0
//-- NPC0,_STUNATTACK
//-- NPC_STUNATTACK
179,0,0,0,0,5000,0
//-- NPC_PETRIFYATTACK
180,0,0,0,0,20000,0
Expand Down
4 changes: 2 additions & 2 deletions db/re/skill_cast_db.txt
Expand Up @@ -208,7 +208,7 @@
//-- HT_SHOCKWAVE
118,0,0,0,200000:160000:120000:80000:40000,0,0,0
//-- HT_SANDMAN
119,0,0,0,150000:120000:90000:60000:30000,12000:14000:16000:18000:20000,0,0
119,0,0,0,150000:120000:90000:60000:30000,20000,0,0
//-- HT_FLASHER
120,0,0,0,150000:120000:90000:60000:30000,20000,0,0
//-- HT_FREEZINGTRAP
Expand Down Expand Up @@ -255,7 +255,7 @@
//-- TF_PICKSTONE
151,0,0,0,0,0,0,500
//-- TF_THROWSTONE
152,0,100,0,5000,8000,0,0
152,0,100,0,5000,20000,0,0

//-- MC_LOUD
155,0,0,0,300000,0,0,0
Expand Down
24 changes: 18 additions & 6 deletions src/map/skill.c
Expand Up @@ -1164,16 +1164,16 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1

case HT_FREEZINGTRAP:
case MA_FREEZINGTRAP:
sc_start(src,bl,SC_FREEZE,(3*skill_lv+35),skill_lv,skill_get_time2(skill_id,skill_lv));
sc_start(src,bl,SC_FREEZE,100,skill_lv,skill_get_time2(skill_id,skill_lv));
break;

case HT_FLASHER:
sc_start(src,bl,SC_BLIND,(10*skill_lv+30),skill_lv,skill_get_time2(skill_id,skill_lv));
sc_start(src,bl,SC_BLIND,100,skill_lv,skill_get_time2(skill_id,skill_lv));
break;

case HT_LANDMINE:
case MA_LANDMINE:
sc_start(src,bl,SC_STUN,(5*skill_lv+30),skill_lv,skill_get_time2(skill_id,skill_lv));
sc_start(src,bl,SC_STUN,10,skill_lv,skill_get_time2(skill_id,skill_lv));
break;

case HT_SHOCKWAVE:
Expand Down Expand Up @@ -1453,7 +1453,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
}
break;
case WL_JACKFROST:
sc_start(src,bl,SC_FREEZE,100,skill_lv,skill_get_time(skill_id,skill_lv));
sc_start(src,bl,SC_FREEZE,200,skill_lv,skill_get_time(skill_id,skill_lv));
break;
case RA_WUGBITE: {
int wug_rate = (50 + 10 * skill_lv) + 2 * ((sd) ? pc_checkskill(sd,RA_TOOTHOFWUG)*2 : skill_get_max(RA_TOOTHOFWUG)) - (status_get_agi(bl) / 4);
Expand Down Expand Up @@ -4468,6 +4468,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
case NC_FLAMELAUNCHER:
if (sd) pc_overheat(sd,1);
case LG_CANNONSPEAR:
if(skill_id == LG_CANNONSPEAR)
clif_skill_damage(src, bl, tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6);
skill_area_temp[1] = bl->id;
if (battle_config.skill_eightpath_algorithm) {
//Use official AoE algorithm
Expand Down Expand Up @@ -7675,6 +7677,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
) {
x = src->x;
y = src->y;
} else if(dir%2) {
//Diagonal
x = src->x + dirx[dir]*(skill_lv*4)/3;
y = src->y + diry[dir]*(skill_lv*4)/3;
} else {
x = src->x + dirx[dir]*skill_lv*2;
y = src->y + diry[dir]*skill_lv*2;
Expand Down Expand Up @@ -16612,8 +16618,14 @@ int skill_attack_area(struct block_list *bl, va_list ap)
flag = va_arg(ap,int);
type = va_arg(ap,int);

if (skill_area_temp[1] == bl->id) //This is the target of the skill, do a full attack and skip target checks.
return (int)skill_attack(atk_type,src,dsrc,bl,skill_id,skill_lv,tick,flag);
if (skill_area_temp[1] == bl->id) { //This is the target of the skill, do a full attack and skip target checks.
switch (skill_id) {
case LG_CANNONSPEAR:
return (int)skill_attack(atk_type,src,dsrc,bl,skill_id,skill_lv,tick,flag|SD_ANIMATION);

This comment has been minimized.

Copy link
@cydh

cydh Mar 3, 2016

Contributor

I seem this is kinda wrong,
I know there is flag that can be passed from somewhere in skill_castend_nodamage_id before this skill_attack_area called.

if (flag&1)
    map_foreach.....(... flag|SD_ANIMATION...);
else
   clif_skill_damage ...

This comment has been minimized.

Copy link
@Playtester

Playtester Mar 4, 2016

Author Member

Yes, could already set the flag in skill_castend, but currently it's done in skill_attack_area for the other cases too, so I wanted it to be consistent.

default:
return (int)skill_attack(atk_type,src,dsrc,bl,skill_id,skill_lv,tick,flag);
}
}

if(battle_check_target(dsrc,bl,type) <= 0 ||
!status_check_skilluse(NULL, bl, skill_id, 2))
Expand Down

0 comments on commit 61a48b9

Please sign in to comment.