summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorKomurka <Komurka@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-18 13:16:21 +0000
committerKomurka <Komurka@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-18 13:16:21 +0000
commit05f88e6753ee38eb54be04bece08ad7b1a8382fd (patch)
tree7c1dfa31ec01f218c68213bb9a5fd5b358e77e10 /src/map/skill.c
parentb59572d87acb01a6d813b83e6eb7bbe15759858a (diff)
downloadhercules-05f88e6753ee38eb54be04bece08ad7b1a8382fd.tar.gz
hercules-05f88e6753ee38eb54be04bece08ad7b1a8382fd.tar.bz2
hercules-05f88e6753ee38eb54be04bece08ad7b1a8382fd.tar.xz
hercules-05f88e6753ee38eb54be04bece08ad7b1a8382fd.zip
* Implemented SG_MIRACLE (Miracle of the Sun, Moon and Stars)
- duration is stored in battle_config.sg_miracle_skill_duration (currently it's set to 10 minutes) - ratio is stored in battle_config.sg_miracle_skill_ratio (currently it's set to 0.01% chance per character move) - this skill enables you usage of all Warmth skills, Comfort skills, and also all mobs will be target of the Stars regardless of the day and map - you'll see message "[Miracle of the Sun, Moon and Stars]" when skill kicks in git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5323 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index d18b87c22..405e5a109 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -7968,36 +7968,37 @@ int skill_check_condition(struct map_session_data *sd,int type)
clif_skill_fail(sd,skill,0,0);
return 0;
}
+ //SHOULD BE OPTIMALIZED [Komurka]
case SG_SUN_WARM:
- if(sd->bl.m == sd->feel_map[0].m)
+ if ((sd->bl.m == sd->feel_map[0].m) || (sd->sc.data[SC_MIRACLE].timer!=-1))
break;
clif_skill_fail(sd,skill,0,0);
return 0;
break;
case SG_MOON_WARM:
- if(sd->bl.m == sd->feel_map[1].m)
+ if ((sd->bl.m == sd->feel_map[1].m) || (sd->sc.data[SC_MIRACLE].timer!=-1))
break;
clif_skill_fail(sd,skill,0,0);
return 0;
break;
case SG_STAR_WARM:
- if(sd->bl.m == sd->feel_map[2].m)
+ if ((sd->bl.m == sd->feel_map[2].m) || (sd->sc.data[SC_MIRACLE].timer!=-1))
break;
clif_skill_fail(sd,skill,0,0);
return 0;
break;
case SG_SUN_COMFORT:
- if(sd->bl.m == sd->feel_map[0].m && (battle_config.allow_skill_without_day || is_day_of_sun()))
+ if ((sd->bl.m == sd->feel_map[0].m && (battle_config.allow_skill_without_day || is_day_of_sun())) || (sd->sc.data[SC_MIRACLE].timer!=-1))
break;
clif_skill_fail(sd,skill,0,0);
return 0;
case SG_MOON_COMFORT:
- if(sd->bl.m == sd->feel_map[1].m && (battle_config.allow_skill_without_day || is_day_of_moon()))
+ if ((sd->bl.m == sd->feel_map[1].m && (battle_config.allow_skill_without_day || is_day_of_moon())) || (sd->sc.data[SC_MIRACLE].timer!=-1))
break;
clif_skill_fail(sd,skill,0,0);
return 0;
case SG_STAR_COMFORT:
- if(sd->bl.m == sd->feel_map[2].m && (battle_config.allow_skill_without_day || is_day_of_star()))
+ if ((sd->bl.m == sd->feel_map[2].m && (battle_config.allow_skill_without_day || is_day_of_star())) || (sd->sc.data[SC_MIRACLE].timer!=-1))
break;
clif_skill_fail(sd,skill,0,0);
return 0;