summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorPlaytester <Playtester@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-18 18:07:09 +0000
committerPlaytester <Playtester@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-18 18:07:09 +0000
commitf9523b89b5ed6900513155e4bb296dbe8a5f8bda (patch)
tree1d1c247c1dc9109121175005d92714c31368c6f6 /src/map/skill.c
parent0f67020b198c036d79e2bbfad1d9e55e5802721a (diff)
downloadhercules-f9523b89b5ed6900513155e4bb296dbe8a5f8bda.tar.gz
hercules-f9523b89b5ed6900513155e4bb296dbe8a5f8bda.tar.bz2
hercules-f9523b89b5ed6900513155e4bb296dbe8a5f8bda.tar.xz
hercules-f9523b89b5ed6900513155e4bb296dbe8a5f8bda.zip
* Further optimization of the skill unit code
- removed code for Crimson Fire Formation it now uses the same code as Fire Wall - added same knockback behavior as Fire Wall for Fire Formation - Heat now does 50 hits a second in pvp too - please let me know of any bugs that might appear git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11510 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c43
1 files changed, 16 insertions, 27 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 659ca6817..1b5797742 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -7288,16 +7288,17 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
switch (sg->unit_id)
{
case UNT_FIREWALL:
+ case UNT_KAENSIN:
if (tstatus->def_ele == ELE_FIRE || battle_check_undead(tstatus->race, tstatus->def_ele)) {
int count=0;
- //Fire property mobs and Undeads are never knocked back by firewall
+ //Fire property mobs and Undeads are never knocked back
//Should hit every 20ms [Playtester]
while (count++ < battle_config.firewall_hits_on_undead && !status_isdead(bl) && src->val2--)
skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*20,1);
} else {
int count=0;
int x = bl->x, y = bl->y;
- //If mob isn't knocked back it should hit every 20ms [Playtester]
+ //If target isn't knocked back it should hit every 20ms [Playtester]
while (count++ < battle_config.firewall_hits_on_undead && x == bl->x && y == bl->y && !status_isdead(bl) && src->val2--)
skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*20,0);
}
@@ -7359,21 +7360,20 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
case SG_SUN_WARM: //SG skills [Komurka]
case SG_MOON_WARM:
case SG_STAR_WARM:
- if(!status_charge(ss, 0, 2)){ //should end when out of sp.
- sg->limit=DIFF_TICK(tick,sg->tick);
- break;
- }
- else if(bl->type==BL_PC){
- //Only damage SP [Skotlex]
- status_zap(bl, 0, 15);
- }
- else{
- int count=1;
+ {
+ int count=0;
int x = bl->x, y = bl->y;
- skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
- //If mob isn't knocked back it should hit every 20ms [Playtester]
- while (count++ < battle_config.firewall_hits_on_undead && x == bl->x && y == bl->y && !status_isdead(bl) && status_charge(ss, 0, 2))
- skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*20,0);
+ //If target isn't knocked back it should hit every 20ms [Playtester]
+ while (count++ < battle_config.firewall_hits_on_undead && x == bl->x && y == bl->y && !status_isdead(bl)){
+ if (!status_charge(ss, 0, 2)){ //should end when out of sp.
+ sg->limit=DIFF_TICK(tick,sg->tick);
+ break;
+ }
+ else if (bl->type==BL_PC)
+ status_zap(bl, 0, 15); //Only damage SP [Skotlex]
+ else
+ skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*20,0);
+ }
}
break;
case WZ_STORMGUST:
@@ -7629,17 +7629,6 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
clif_changetraplook(&src->bl, UNT_FIREPILLAR_ACTIVE);
sg->limit=DIFF_TICK(tick,sg->tick)+1500;
break;
-
- case UNT_KAENSIN:
- {
- int count=0;
- //Should hit every 20ms [Playtester]
- while (count++ < battle_config.firewall_hits_on_undead && !status_isdead(bl) && src->val2--)
- skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*20,0);
- if (src->val2 <= 0)
- skill_delunit(src);
- }
- break;
}
if (sg->state.magic_power && sc && sc->data[SC_MAGICPOWER].timer == -1)