summaryrefslogtreecommitdiff
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
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
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--db/Changelog.txt2
-rw-r--r--db/skill_db.txt2
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/skill.c43
5 files changed, 25 insertions, 28 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index db0654449..2b00ed4fd 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,11 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2007/10/18
+ * Further optimization of the skill unit code [Playtester]
+ - 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
* Optimized the skill unit code [Playtester]
- reverted the unit timer interval to 100ms to save CPU usage
- rewrote the unit code of Fire Wall, Fire Formation and Heat so that they hit
diff --git a/db/Changelog.txt b/db/Changelog.txt
index a2354478d..171843732 100644
--- a/db/Changelog.txt
+++ b/db/Changelog.txt
@@ -33,6 +33,8 @@
13034 Desert_Twilight Small chance to activate max Attack Speed for 7 seconds.
=======================
+10/18
+ * Added knockback to Crimson Fire Formation [Playtester]
10/16
* Fixed used levels of NPC_CRITICALWOUND [Playtester]
10/15
diff --git a/db/skill_db.txt b/db/skill_db.txt
index 7d18ed5d2..f077f6ab6 100644
--- a/db/skill_db.txt
+++ b/db/skill_db.txt
@@ -574,7 +574,7 @@
532,0,6,4,0,0x1,0,10,1,yes,0,0,0,magic,0 //NJ_BUNSINJYUTSU#NJ_BUNSINJYUTSU#
533,0,0,0,0,0,0,10,0,no,0,0,0,none,0 //NJ_NINPOU#NJ_NINPOU#
534,9,8,1,3,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0 //NJ_KOUENKA#NJ_KOUENKA#
-535,0,8,4,3,0,0,10,1,yes,0,0,0,magic,0 //NJ_KAENSIN#NJ_KAENSIN#
+535,0,8,4,3,0,0,10,1,yes,0,0,0,magic,1 //NJ_KAENSIN#NJ_KAENSIN#
536,9,8,1,3,0x2,2,5,3,yes,0,0,0,magic,0 //NJ_BAKUENRYU#NJ_BAKUENRYU#
537,9,8,1,1,0,0,10,3:4:5:6:7:8:9:10:11:12,yes,0,0,0,magic,0 //NJ_HYOUSENSOU#NJ_HYOUSENSOU#
538,9,6,2,0,0x1,0,10,1,yes,0,0,0,magic,0 //NJ_SUITON#NJ_SUITON#
diff --git a/src/map/battle.c b/src/map/battle.c
index eade2f167..a6e6d64ab 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2156,6 +2156,7 @@ struct Damage battle_calc_magic_attack(
switch(skill_num)
{
case MG_FIREWALL:
+ case NJ_KAENSIN:
ad.dmotion = 0; //No flinch animation.
if(mflag) //mflag has a value when it was checked against an undead in skill.c [Skotlex]
ad.blewcount = 0; //No knockback
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)