diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-05-19 15:50:41 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-05-19 15:50:41 +0000 |
commit | b9804183841afd5381069796096a154edb5b9f53 (patch) | |
tree | 95e6f70d9ecd43e727d0defe1b02a818bc191169 /src/map/battle.c | |
parent | 3bd682b3cb3507c8a57fa6930475808981fd0663 (diff) | |
download | hercules-b9804183841afd5381069796096a154edb5b9f53.tar.gz hercules-b9804183841afd5381069796096a154edb5b9f53.tar.bz2 hercules-b9804183841afd5381069796096a154edb5b9f53.tar.xz hercules-b9804183841afd5381069796096a154edb5b9f53.zip |
Reformatting @_@
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10581 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 65 |
1 files changed, 26 insertions, 39 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index f13125bb7..9ec58981e 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -45,8 +45,7 @@ int battle_getcurrentskill(struct block_list *bl) /*========================================== * Get random targetting enemy - *------------------------------------------ - */ + *------------------------------------------*/ static int battle_gettargeted_sub(struct block_list *bl, va_list ap) { struct block_list **bl_list; @@ -206,8 +205,7 @@ int battle_delay_damage (unsigned int tick, struct block_list *src, struct block * Does attribute fix modifiers. * Added passing of the chars so that the status changes can affect it. [Skotlex] * Note: Passing src/target == NULL is perfectly valid, it skips SC_ checks. - *------------------------------------------ - */ + *------------------------------------------*/ int battle_attr_fix(struct block_list *src, struct block_list *target, int damage,int atk_elem,int def_type, int def_lv) { struct status_change *sc=NULL, *tsc=NULL; @@ -257,8 +255,7 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag /*========================================== * ƒ_ƒ??[ƒW?Å?IŒvŽZ - *------------------------------------------ - */ + *------------------------------------------*/ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,int div_,int skill_num,int skill_lv,int flag) { struct map_session_data *sd = NULL; @@ -514,8 +511,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i /*========================================== * Calculates GVG related damage adjustments. - *------------------------------------------ - */ + *------------------------------------------*/ int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int damage,int div_,int skill_num,int skill_lv,int flag) { struct mob_data *md = NULL; @@ -583,8 +579,7 @@ int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int dama /*========================================== * HP/SP‹zŽû‚ÌŒvŽZ - *------------------------------------------ - */ + *------------------------------------------*/ static int battle_calc_drain(int damage, int rate, int per) { int diff = 0; @@ -603,8 +598,7 @@ static int battle_calc_drain(int damage, int rate, int per) /*========================================== * ?C—ûƒ_ƒ??[ƒW - *------------------------------------------ - */ + *------------------------------------------*/ int battle_addmastery(struct map_session_data *sd,struct block_list *target,int dmg,int type) { int damage,skill; @@ -787,8 +781,7 @@ static int battle_calc_base_damage(struct status_data *status, struct weapon_atk /*========================================== * Consumes ammo for the given skill. - *------------------------------------------ - */ + *------------------------------------------*/ void battle_consume_ammo(TBL_PC*sd, int skill, int lv) { int qty=1; @@ -856,8 +849,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * #define damage_div_fix(dmg, div) { if (div > 1) (dmg)*=div; else if (div < 0) (div)*=-1; } /*========================================== * battle_calc_weapon_attack (by Skotlex) - *------------------------------------------ - */ + *------------------------------------------*/ static struct Damage battle_calc_weapon_attack( struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int wflag) { @@ -2113,8 +2105,7 @@ static struct Damage battle_calc_weapon_attack( /*========================================== * battle_calc_magic_attack [DracoRPG] - *------------------------------------------ - */ + *------------------------------------------*/ struct Damage battle_calc_magic_attack( struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int mflag) { @@ -2435,8 +2426,7 @@ struct Damage battle_calc_magic_attack( /*========================================== * ‚»‚Ì‘¼ƒ_ƒ??[ƒWŒvŽZ - *------------------------------------------ - */ + *------------------------------------------*/ struct Damage battle_calc_misc_attack( struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int mflag) { @@ -2658,10 +2648,8 @@ struct Damage battle_calc_misc_attack( } /*========================================== * ƒ_ƒ??[ƒWŒvŽZˆêŠ‡?ˆ—?—p - *------------------------------------------ - */ -struct Damage battle_calc_attack( int attack_type, - struct block_list *bl,struct block_list *target,int skill_num,int skill_lv,int flag) + *------------------------------------------*/ +struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct block_list *target,int skill_num,int skill_lv,int flag) { struct Damage d; switch(attack_type){ @@ -2783,8 +2771,7 @@ void battle_drain(TBL_PC *sd, struct block_list *tbl, int rdamage, int ldamage, /*========================================== * ’Ê?í?UŒ‚?ˆ—?‚Ü‚Æ‚ß - *------------------------------------------ - */ + *------------------------------------------*/ int battle_weapon_attack(struct block_list* src, struct block_list* target, unsigned int tick, int flag) { struct map_session_data *sd = NULL, *tsd = NULL; @@ -3050,8 +3037,7 @@ struct block_list* battle_get_master(struct block_list *src) * 1: flag holds true (is enemy, party, etc) * -1: flag fails * 0: Invalid target (non-targetable ever) - *------------------------------------------ - */ + *------------------------------------------*/ int battle_check_target( struct block_list *src, struct block_list *target,int flag) { int m,state = 0; //Initial state none @@ -3323,8 +3309,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f } /*========================================== * ŽË’ö”»’è - *------------------------------------------ - */ + *------------------------------------------*/ int battle_check_range(struct block_list *src,struct block_list *bl,int range) { nullpo_retr(0, src); @@ -3635,7 +3620,6 @@ static const struct battle_data_short { { "title_lvl7", &battle_config.title_lvl7}, // [Lupus] { "title_lvl8", &battle_config.title_lvl8}, // [Lupus] - { "duel_enable", &battle_config.duel_enable}, // [LuzZza] { "duel_allow_pvp", &battle_config.duel_allow_pvp}, // [LuzZza] { "duel_allow_gvg", &battle_config.duel_allow_gvg}, // [LuzZza] { "duel_allow_teleport", &battle_config.duel_allow_teleport}, // [LuzZza] @@ -3710,7 +3694,8 @@ static const struct battle_data_int { { "hvan_explosion_intimate", &battle_config.hvan_explosion_intimate }, //[orn] }; -int battle_set_value(const char* w1, const char* w2) { +int battle_set_value(const char* w1, const char* w2) +{ int i; for(i = 0; i < sizeof(battle_data_short) / (sizeof(battle_data_short[0])); i++) if (strcmpi(w1, battle_data_short[i].str) == 0) { @@ -3725,7 +3710,8 @@ int battle_set_value(const char* w1, const char* w2) { return 0; } -int battle_get_value(const char* w1) { +int battle_get_value(const char* w1) +{ int i; for(i = 0; i < sizeof(battle_data_short) / (sizeof(battle_data_short[0])); i++) if (strcmpi(w1, battle_data_short[i].str) == 0) { @@ -3738,7 +3724,8 @@ int battle_get_value(const char* w1) { return 0; } -void battle_set_defaults() { +void battle_set_defaults() +{ battle_config.warp_point_debug=0; battle_config.enable_critical=BL_PC; battle_config.mob_critical_rate=100; @@ -4065,7 +4052,6 @@ void battle_set_defaults() { battle_config.title_lvl7 = 80; battle_config.title_lvl8 = 99; - battle_config.duel_enable = 1; battle_config.duel_allow_pvp = 0; battle_config.duel_allow_gvg = 0; battle_config.duel_allow_teleport = 0; @@ -4300,8 +4286,7 @@ void battle_validate_conf() { /*========================================== * ?Ý’èƒtƒ@ƒCƒ‹‚ð“Ç‚Ý?ž‚Þ - *------------------------------------------ - */ + *------------------------------------------*/ int battle_config_read(const char *cfgName) { char line[1024], w1[1024], w2[1024]; @@ -4334,11 +4319,13 @@ int battle_config_read(const char *cfgName) return 0; } -void do_init_battle(void) { +void do_init_battle(void) +{ delay_damage_ers = ers_new(sizeof(struct delay_damage)); add_timer_func_list(battle_delay_damage_sub, "battle_delay_damage_sub"); } -void do_final_battle(void) { +void do_final_battle(void) +{ ers_destroy(delay_damage_ers); } |