diff options
author | Komurka <Komurka@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-18 13:16:21 +0000 |
---|---|---|
committer | Komurka <Komurka@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-18 13:16:21 +0000 |
commit | 05f88e6753ee38eb54be04bece08ad7b1a8382fd (patch) | |
tree | 7c1dfa31ec01f218c68213bb9a5fd5b358e77e10 | |
parent | b59572d87acb01a6d813b83e6eb7bbe15759858a (diff) | |
download | hercules-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
-rw-r--r-- | Changelog-Trunk.txt | 8 | ||||
-rw-r--r-- | conf-tmpl/battle/skill.conf | 446 | ||||
-rw-r--r-- | src/map/battle.c | 15 | ||||
-rw-r--r-- | src/map/battle.h | 3 | ||||
-rw-r--r-- | src/map/mob.c | 4 | ||||
-rw-r--r-- | src/map/pc.c | 7 | ||||
-rw-r--r-- | src/map/skill.c | 13 | ||||
-rw-r--r-- | src/map/status.c | 2 | ||||
-rw-r--r-- | src/map/status.h | 1 |
9 files changed, 271 insertions, 228 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 9e24f6711..5695ddb4a 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -5,6 +5,14 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
2006/02/18
+ * Implemented SG_MIRACLE (Miracle of the Sun, Moon and Stars) [Komurka]
+ - 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
* Added upgrade file upgrade_svn5322.sql because apparently not everyone
has the guild table with autoincremental guild_id defined. [Skotlex]
- If you can't create guilds, chances are you need to apply this ugprade.
diff --git a/conf-tmpl/battle/skill.conf b/conf-tmpl/battle/skill.conf index 9c61ab6d2..6b163af3c 100644 --- a/conf-tmpl/battle/skill.conf +++ b/conf-tmpl/battle/skill.conf @@ -1,220 +1,226 @@ -// ______ __ __ -// /\ _ \/\ \__/\ \ -// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __ -// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\ -///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_ -//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\ -// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/ -// _ _ _ _ _ _ _ _ _ _ _ _ _ -// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ -//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a ) -// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ -// -//-------------------------------------------------------------- -// eAthena Battle Configuration File -// Originally Translated by Peter Kieser <pfak@telus.net> -// Made in to plainer English by Ancyker -//-------------------------------------------------------------- -//Note 1: Directives can be set using on/off, yes/no or 1/0. -//Note 2: All rates are in percents, 100 would mean 100%, 200 -// would mean 200%, etc -//Note 3: Value is not limited to 60K (see below) -// Other Information: -// All options are limited to a max of 60K (aprox) which is 600% -// or 60secs as appropiate. -// 1000 miliseconds is 1 second. -// Unless otherwise specified, the minimum value is 0 for all -// features. -//-------------------------------------------------------------- - -// The rate of time it takes to cast a spell (Note 2, 0 = No casting time) -casting_rate: 100 - -// Delay time after casting (Note 2) -delay_rate: 100 - -// Is the delay time is dependent on the caster's DEX? (Note 1) -// Note: On Official servers Dex does NOT affect delay time -delay_dependon_dex: no - -// Minimum allowed delay for ANY skills after casting (in miliseconds) (Note 1) -// Note: Setting this to anything above 0 can stop speedhacks. -min_skill_delay_limit: 100 - -// At what dex does the cast time become zero (instacast) -castrate_dex_scale: 150 - -// Will normal attacks be able to ignore the delay after skills? (Note 1) -skill_delay_attack_enable: no - -// Range added to player skills after their cast time finishes. -// Decides how far away the target can walk away after the skill began casting before the skill fails. -player_skill_add_range: 15 - -// If the target moves out of range while casting, do we take the items and SP for the skill anyway? (Note 1) -skill_out_range_consume: no - -// Range added to mob skills after their cast time finishes. -// Decides how far away the target can walk away after the skill began casting before the skill fails. -monster_skill_add_range: 15 - -// Does the distance between caster and target define if the skill is a ranged skill? -// If set, when the distance between caster and target is greater than 3 the skill is considered long-range, otherwise it's a melee range. -// If not set, then the range is determined by the skill (eg: Double Strafe is always long-ranged). -// Mask values (add as necessary): -// 1: Players -// 2: Mobs -// 4: Pets -// Default 6 (mobs + pets) -skillrange_by_distance: 6 - -// Should the equipped weapon's range override the skill's range defined in the skill_db for most weapon-based skills? (Note 1) -// NOTE: Skills affected by this option are those whose range in the skill_db are negative. -skillrange_from_weapon: no - -// Should a check on the caster's status be performed in all skill attacks? -// When set to yes, meteors, storm gust and any other ground skills will have -// no effect while the caster is unable to fight (eg: stunned). -skill_caster_check: yes - -// Should skill casting be cancelled when inflicted by curse/stun/sleep/etc? -status_cast_cancel: no - -//Setting this to YES will override the target mode of ground-based skills with the flag 0x01 to "No Enemies" -//The two skills affected by default are Pneuma and Safety Wall (if set to yes, those two skills will not protect everyone, but only allies) -//See db/skill_unit_db.txt for more info. -defunit_not_enemy: no - -// Do skills do at least 'hits' damage when they don't miss/are blocked? -//(for example, will firebolts always do "number of bolts" damage versus plants?) -//Values (add as appropiate): 1 for weapon-based attacks, 2 for magic attacks, 4 for misc attacks. -skill_min_damage: 6 - -// The delay rate of monk's combo (Note 2) -combo_delay_rate: 100 - -// Counter Attack Skill Type -// 0 = 100% critical -// 1 = disregard DEF and HIT+20, CRI*2 -// Players -player_auto_counter_type: 0 -// Monsters -monster_auto_counter_type: 0 - -// Whether or not, ground skills of the players' will stack. (Note 1) -player_skill_reiteration: no - -//Whether or not, ground skills of the monsters' will pile up. (Note 1) -monster_skill_reiteration: no - -// Whether players are not allowed to cast ground based skills of a certain type such -// as traps straight onto or nearby other players/monsters. (Note 1) -player_skill_nofootset: yes - -// Whether monsters are not allowed to cast ground based skills of a certain type such -// as traps straight onto or nearby other players. (Note 1) -monster_skill_nofootset: no - -// Whether placed down skills will check walls (Note 1) -// (Makes it so that Storm Gust/Lord of Vermillion/etc when casted next to a wall, won't hit on the other side) -// NOTE: It may degrade performance to enable this. -skill_wall_check: no - -// When a player is cloaking, Whether the wall is checked or not. (Note 1) -// Note: When set to no players can always cloak away from walls and move around -// freely even if the skill level is below 3. -// no or 0 = doesn't check for walls (you can cloak without walls) -// 1 = it checks for walls -// 2 = it doesn't checks for walls + your cloaking lasts forever -// 3 = it checks for walls + your cloaking lasts forever (it is not cancelled on attack) -player_cloak_check_type: 1 - -// When a monster is cloaking, Whether the wall is checked or not. (Note 1) -monster_cloak_check_type: no - -// Will Player Skills Stay Within Land Limit or not? (Note 1) -player_land_skill_limit: yes - -// Will Monster Skills Stay Within Land Limit or not? (Note 1) -monster_land_skill_limit: yes - -// If skill fails by delay, should it display or not. (Note 1) -display_delay_skill_fail: yes - -// Display Snatcher skill failures -display_snatcher_skill_fail: yes - -// Can a player in chat room (in-game), be warped by a warp portal? (Note 1) -chat_warpportal: no - -// Can a monster be warped by a warp portal? (Note 1) -mob_warpportal: no - -// What should the wizard's "Sense" skill display on the defense fields? -// 0: Do not show defense -// 1: Base defense -// 2: Vit/Int defense -// 3: Both (the addition of both) [default] -sense_type: 3 - -// Which finger offensive style can be used? -// 0 = Aegis style -// 1 = Athena style -finger_offensive_type: 0 - -// Number of hits at a time that undead/fire elemental enemies receive from firewall. -// NOTE: Officially, it is one hit at a time on a very fast rate, however eA's timer system -// doesn't triggers enough "hits" to exhaust the firewall before the mob walks through it. -// A value of 5 would suffice for a vertical firewall to take full effect on undead. -firewall_hits_on_undead: 1 - -// Grandcross Settings (Dont mess with these) -// If set to no, hit interval is increased based on the amount of mobs standing on the same cell -// (means that when there's stacked mobs in the same cell, they won't receive all hits) -gx_allhit: no - -// Grandcross display type (Default 1) -// 0: Yellow character -// 1: White character -gx_disptype: 1 - -// Max Level Difference for Devotion -devotion_level_difference: 10 - -// If no than you can use the ensemble skills alone. (Note 1) -player_skill_partner_check: yes - -// Remove trap type -// 0 - Aegis system : Returns 1 'Trap' item -// 1 - Athena system : Allows the returned item and amount to be defined -skill_removetrap_type: 0 - -// Does using bow to do a backstab give a 50% damage penalty? (Note 1) -backstab_bow_penalty: yes - -// Use kRO new steal formula? -skill_steal_type: yes - -// Can Rogues plagiarize advanced job skills -// 0 = no restriction -// 1 = only stalker may plagiarize advanced skills -// 2 = advanced skills cannot be plagiarized by anyone -// Official servers setting: 2 -copyskill_restrict: 2 - -// Does Berserk/Frenzy cancel other self-buffs when used? -berserk_cancels_buffs: no - -// Max Possible Level of Monster skills -// Note: If your MVPs are too tough, reduce it to 10. -mob_max_skilllvl: 100 - -// Allows players to skip menu when casting Teleport level 1 -// Menu contains two options. "Random" and "Cancel" -skip_teleport_lv1_menu: no - -// Allow use of SG skills without proper day (Sun/Moon/Star) ? -allow_skill_without_day: no - -// Allow use of ES-type magic on players? -allow_es_magic_player: no +// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+// eAthena Battle Configuration File
+// Originally Translated by Peter Kieser <pfak@telus.net>
+// Made in to plainer English by Ancyker
+//--------------------------------------------------------------
+//Note 1: Directives can be set using on/off, yes/no or 1/0.
+//Note 2: All rates are in percents, 100 would mean 100%, 200
+// would mean 200%, etc
+//Note 3: Value is not limited to 60K (see below)
+// Other Information:
+// All options are limited to a max of 60K (aprox) which is 600%
+// or 60secs as appropiate.
+// 1000 miliseconds is 1 second.
+// Unless otherwise specified, the minimum value is 0 for all
+// features.
+//--------------------------------------------------------------
+
+// The rate of time it takes to cast a spell (Note 2, 0 = No casting time)
+casting_rate: 100
+
+// Delay time after casting (Note 2)
+delay_rate: 100
+
+// Is the delay time is dependent on the caster's DEX? (Note 1)
+// Note: On Official servers Dex does NOT affect delay time
+delay_dependon_dex: no
+
+// Minimum allowed delay for ANY skills after casting (in miliseconds) (Note 1)
+// Note: Setting this to anything above 0 can stop speedhacks.
+min_skill_delay_limit: 100
+
+// At what dex does the cast time become zero (instacast)
+castrate_dex_scale: 150
+
+// Will normal attacks be able to ignore the delay after skills? (Note 1)
+skill_delay_attack_enable: no
+
+// Range added to player skills after their cast time finishes.
+// Decides how far away the target can walk away after the skill began casting before the skill fails.
+player_skill_add_range: 15
+
+// If the target moves out of range while casting, do we take the items and SP for the skill anyway? (Note 1)
+skill_out_range_consume: no
+
+// Range added to mob skills after their cast time finishes.
+// Decides how far away the target can walk away after the skill began casting before the skill fails.
+monster_skill_add_range: 15
+
+// Does the distance between caster and target define if the skill is a ranged skill?
+// If set, when the distance between caster and target is greater than 3 the skill is considered long-range, otherwise it's a melee range.
+// If not set, then the range is determined by the skill (eg: Double Strafe is always long-ranged).
+// Mask values (add as necessary):
+// 1: Players
+// 2: Mobs
+// 4: Pets
+// Default 6 (mobs + pets)
+skillrange_by_distance: 6
+
+// Should the equipped weapon's range override the skill's range defined in the skill_db for most weapon-based skills? (Note 1)
+// NOTE: Skills affected by this option are those whose range in the skill_db are negative.
+skillrange_from_weapon: no
+
+// Should a check on the caster's status be performed in all skill attacks?
+// When set to yes, meteors, storm gust and any other ground skills will have
+// no effect while the caster is unable to fight (eg: stunned).
+skill_caster_check: yes
+
+// Should skill casting be cancelled when inflicted by curse/stun/sleep/etc?
+status_cast_cancel: no
+
+//Setting this to YES will override the target mode of ground-based skills with the flag 0x01 to "No Enemies"
+//The two skills affected by default are Pneuma and Safety Wall (if set to yes, those two skills will not protect everyone, but only allies)
+//See db/skill_unit_db.txt for more info.
+defunit_not_enemy: no
+
+// Do skills do at least 'hits' damage when they don't miss/are blocked?
+//(for example, will firebolts always do "number of bolts" damage versus plants?)
+//Values (add as appropiate): 1 for weapon-based attacks, 2 for magic attacks, 4 for misc attacks.
+skill_min_damage: 6
+
+// The delay rate of monk's combo (Note 2)
+combo_delay_rate: 100
+
+// Counter Attack Skill Type
+// 0 = 100% critical
+// 1 = disregard DEF and HIT+20, CRI*2
+// Players
+player_auto_counter_type: 0
+// Monsters
+monster_auto_counter_type: 0
+
+// Whether or not, ground skills of the players' will stack. (Note 1)
+player_skill_reiteration: no
+
+//Whether or not, ground skills of the monsters' will pile up. (Note 1)
+monster_skill_reiteration: no
+
+// Whether players are not allowed to cast ground based skills of a certain type such
+// as traps straight onto or nearby other players/monsters. (Note 1)
+player_skill_nofootset: yes
+
+// Whether monsters are not allowed to cast ground based skills of a certain type such
+// as traps straight onto or nearby other players. (Note 1)
+monster_skill_nofootset: no
+
+// Whether placed down skills will check walls (Note 1)
+// (Makes it so that Storm Gust/Lord of Vermillion/etc when casted next to a wall, won't hit on the other side)
+// NOTE: It may degrade performance to enable this.
+skill_wall_check: no
+
+// When a player is cloaking, Whether the wall is checked or not. (Note 1)
+// Note: When set to no players can always cloak away from walls and move around
+// freely even if the skill level is below 3.
+// no or 0 = doesn't check for walls (you can cloak without walls)
+// 1 = it checks for walls
+// 2 = it doesn't checks for walls + your cloaking lasts forever
+// 3 = it checks for walls + your cloaking lasts forever (it is not cancelled on attack)
+player_cloak_check_type: 1
+
+// When a monster is cloaking, Whether the wall is checked or not. (Note 1)
+monster_cloak_check_type: no
+
+// Will Player Skills Stay Within Land Limit or not? (Note 1)
+player_land_skill_limit: yes
+
+// Will Monster Skills Stay Within Land Limit or not? (Note 1)
+monster_land_skill_limit: yes
+
+// If skill fails by delay, should it display or not. (Note 1)
+display_delay_skill_fail: yes
+
+// Display Snatcher skill failures
+display_snatcher_skill_fail: yes
+
+// Can a player in chat room (in-game), be warped by a warp portal? (Note 1)
+chat_warpportal: no
+
+// Can a monster be warped by a warp portal? (Note 1)
+mob_warpportal: no
+
+// What should the wizard's "Sense" skill display on the defense fields?
+// 0: Do not show defense
+// 1: Base defense
+// 2: Vit/Int defense
+// 3: Both (the addition of both) [default]
+sense_type: 3
+
+// Which finger offensive style can be used?
+// 0 = Aegis style
+// 1 = Athena style
+finger_offensive_type: 0
+
+// Number of hits at a time that undead/fire elemental enemies receive from firewall.
+// NOTE: Officially, it is one hit at a time on a very fast rate, however eA's timer system
+// doesn't triggers enough "hits" to exhaust the firewall before the mob walks through it.
+// A value of 5 would suffice for a vertical firewall to take full effect on undead.
+firewall_hits_on_undead: 1
+
+// Grandcross Settings (Dont mess with these)
+// If set to no, hit interval is increased based on the amount of mobs standing on the same cell
+// (means that when there's stacked mobs in the same cell, they won't receive all hits)
+gx_allhit: no
+
+// Grandcross display type (Default 1)
+// 0: Yellow character
+// 1: White character
+gx_disptype: 1
+
+// Max Level Difference for Devotion
+devotion_level_difference: 10
+
+// If no than you can use the ensemble skills alone. (Note 1)
+player_skill_partner_check: yes
+
+// Remove trap type
+// 0 - Aegis system : Returns 1 'Trap' item
+// 1 - Athena system : Allows the returned item and amount to be defined
+skill_removetrap_type: 0
+
+// Does using bow to do a backstab give a 50% damage penalty? (Note 1)
+backstab_bow_penalty: yes
+
+// Use kRO new steal formula?
+skill_steal_type: yes
+
+// Can Rogues plagiarize advanced job skills
+// 0 = no restriction
+// 1 = only stalker may plagiarize advanced skills
+// 2 = advanced skills cannot be plagiarized by anyone
+// Official servers setting: 2
+copyskill_restrict: 2
+
+// Does Berserk/Frenzy cancel other self-buffs when used?
+berserk_cancels_buffs: no
+
+// Max Possible Level of Monster skills
+// Note: If your MVPs are too tough, reduce it to 10.
+mob_max_skilllvl: 100
+
+// Allows players to skip menu when casting Teleport level 1
+// Menu contains two options. "Random" and "Cancel"
+skip_teleport_lv1_menu: no
+
+// Allow use of SG skills without proper day (Sun/Moon/Star) ?
+allow_skill_without_day: no
+
+// Allow use of ES-type magic on players?
+allow_es_magic_player: no
+
+//Miracle of the Sun, Moon and Stars skill ratio (100% = 10000)
+sg_miracle_skill_ratio: 1
+
+//Miracle of the Sun, Moon and Stars skill duration in milisecons
+sg_miracle_skill_duration: 600000
diff --git a/src/map/battle.c b/src/map/battle.c index f7965a5b7..7439760b5 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1995,7 +1995,12 @@ static struct Damage battle_calc_weapon_attack( { //SG Anger bonus - ATK_ADDRATE [Komurka]
static int type[] = { SG_SUN_ANGER, SG_MOON_ANGER, SG_STAR_ANGER };
short t_class = status_get_class(target);
- for (i = 0; i < 3; i++)
+ if (sc->data && sc->data[SC_MIRACLE].timer!=-1 && (skill = pc_checkskill(sd,type[2])))
+ {
+ skillratio = (sd->status.base_level + status_get_str(src) + status_get_dex(src)+ status_get_luk(src))/(skill<4?12-3*skill:1);
+ ATK_ADDRATE(skillratio);
+ }
+ else for (i = 0; i < 3; i++)
{
if (t_class == sd->hate_mob[i] && (skill = pc_checkskill(sd,type[i])))
{
@@ -3826,6 +3831,7 @@ static const struct battle_data_short { { "mob_status_def_rate", &battle_config.mob_sc_def_rate },
{ "pc_max_status_def", &battle_config.pc_max_sc_def },
{ "mob_max_status_def", &battle_config.mob_max_sc_def },
+ { "sg_miracle_skill_ratio", &battle_config.sg_miracle_skill_ratio },
};
static const struct battle_data_int {
@@ -3861,6 +3867,8 @@ static const struct battle_data_int { { "day_duration", &battle_config.day_duration }, // added by [Yor]
{ "night_duration", &battle_config.night_duration }, // added by [Yor]
{ "mob_remove_delay", &battle_config.mob_remove_delay },
+ { "sg_miracle_skill_duration", &battle_config.sg_miracle_skill_duration },
+
};
int battle_set_value(char *w1, char *w2) {
@@ -4221,6 +4229,8 @@ void battle_set_defaults() { battle_config.mob_sc_def_rate = 100;
battle_config.pc_max_sc_def = 10000;
battle_config.mob_max_sc_def = 5000;
+ battle_config.sg_miracle_skill_ratio=1;
+ battle_config.sg_miracle_skill_duration=600000;
}
void battle_validate_conf() {
@@ -4413,6 +4423,9 @@ void battle_validate_conf() { battle_config.pc_max_sc_def = 10000;
if (battle_config.mob_max_sc_def > 10000)
battle_config.mob_max_sc_def = 10000;
+ if (battle_config.sg_miracle_skill_ratio > 10000)
+ battle_config.sg_miracle_skill_ratio = 10000;
+
#ifdef CELL_NOSTACK
if (battle_config.cell_stack_limit < 1)
battle_config.cell_stack_limit = 1;
diff --git a/src/map/battle.h b/src/map/battle.h index 92828223e..09eddf294 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -427,6 +427,9 @@ extern struct Battle_Config { unsigned short pc_max_sc_def;
unsigned short mob_max_sc_def;
+ unsigned short sg_miracle_skill_ratio;
+ int sg_miracle_skill_duration;
+
} battle_config;
void do_init_battle(void);
diff --git a/src/map/mob.c b/src/map/mob.c index 6be660c9e..af8cb9dea 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2474,7 +2474,9 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type) per *= 1.15; // pk_mode additional exp if monster >20 levels [Valaris]
//SG additional exp from Blessings [Komurka] - probably can be optimalized ^^;;
- if(md->class_ == tmpsd[i]->hate_mob[0] && (battle_config.allow_skill_without_day || is_day_of_sun()))
+ if (tmpsd[i]->sc.data[SC_MIRACLE].timer!=-1)
+ per += per*20*pc_checkskill(tmpsd[i],SG_STAR_BLESS)/100.;
+ else if(md->class_ == tmpsd[i]->hate_mob[0] && (battle_config.allow_skill_without_day || is_day_of_sun()))
per += per*10*pc_checkskill(tmpsd[i],SG_SUN_BLESS)/100.;
else if(md->class_ == tmpsd[i]->hate_mob[1] && (battle_config.allow_skill_without_day || is_day_of_moon()))
per += per*10*pc_checkskill(tmpsd[i],SG_MOON_BLESS)/100.;
diff --git a/src/map/pc.c b/src/map/pc.c index 0d10dfc69..216d9cfd2 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3728,6 +3728,13 @@ int pc_walktoxy (struct map_session_data *sd, int x, int y) map_foreachinrange(skill_guildaura_sub, &sd->bl,2, BL_PC,
sd->bl.id, sd->status.guild_id, &guildflag);
}
+ //SG_MIRACLE [Komurka]
+ if (sd->sc.data && sd->sc.data[SC_MIRACLE].timer==-1 && ((sd->status.class_==JOB_STAR_GLADIATOR) || (sd->status.class_==JOB_STAR_GLADIATOR2)) && (rand()%10000 < battle_config.sg_miracle_skill_ratio) )
+ {
+ clif_displaymessage(sd->fd,"[Miracle of the Sun, Moon and Stars]");
+ status_change_start(&sd->bl,SC_MIRACLE,100,
+ 1,0,0,0,battle_config.sg_miracle_skill_duration,0);
+ }
return 0;
}
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;
diff --git a/src/map/status.c b/src/map/status.c index 1dc45a26f..6c1350a0f 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -302,6 +302,7 @@ void initChangeTables(void) { StatusIconChangeTable[SC_ASPDPOTION3] = SI_ASPDPOTION;
StatusIconChangeTable[SC_SPEEDUP0] = SI_SPEEDPOTION;
StatusIconChangeTable[SC_SPEEDUP1] = SI_SPEEDPOTION;
+ StatusIconChangeTable[SC_MIRACLE] = SI_SPIRIT;
//Guild skills don't fit due to their range being beyond MAX_SKILL
StatusIconChangeTable[SC_GUILDAURA] = SI_GUILDAURA;
@@ -4366,6 +4367,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val case SC_STEELBODY: //
case SC_SKA:
case SC_TWOHANDQUICKEN: /* 2HQ */
+ case SC_MIRACLE:
calc_flag = 1;
break;
diff --git a/src/map/status.h b/src/map/status.h index 2ad97bf9b..13989080f 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -229,6 +229,7 @@ enum { SC_SWOO, // [marquis007]
SC_SKA, // [marquis007]
SC_TKDORI, // [marquis007]
+ SC_MIRACLE, //SG 'hidden' skill [Komurka]
//
SC_MAX, //Automatically updated max, used in for's and at startup to check we are within bounds. [Skotlex]
};
|