summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-12-09 15:38:05 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-12-09 15:38:05 +0000
commit4d1b09949d8dfb0e111a2070486c79bb5ffbf971 (patch)
tree54a35cdbab6c630f98b0d82ff00e1e0a3cc10278 /src/map
parent12aacd58a920722a6946ae326f6b779ddbdf05e4 (diff)
downloadhercules-4d1b09949d8dfb0e111a2070486c79bb5ffbf971.tar.gz
hercules-4d1b09949d8dfb0e111a2070486c79bb5ffbf971.tar.bz2
hercules-4d1b09949d8dfb0e111a2070486c79bb5ffbf971.tar.xz
hercules-4d1b09949d8dfb0e111a2070486c79bb5ffbf971.zip
- Cleaned up a bit the code for HVAN_CHAOTIC
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11875 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/skill.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index f68466af3..e3fc49a7a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5064,12 +5064,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
break;
case HVAN_CHAOTIC: //[orn]
{
- static const int per[10][2]={{20,50},{50,60},{25,75},{60,64},{34,67},
- {34,67},{34,67},{34,67},{34,67},{34,67}};
+ static const int per[5][2]={{20,50},{50,60},{25,75},{60,64},{34,67}};
int rnd = rand()%100;
- if(rnd<per[skilllv-1][0]) //Self
+ i = (skilllv-1)%5;
+ if(rnd<per[i][0]) //Self
bl = src;
- else if(rnd<per[skilllv-1][1]) //Master
+ else if(rnd<per[i][1]) //Master
bl = battle_get_master(src);
else //Enemy
bl = map_id2bl(battle_gettarget(src));