Browse Source

Added a config for Banana Bombs (#2211)

* Fixes #2095.
* Added a battle config banana_bomb_duration to allow people to adjust the default duration of Make Bomb - Banana Bomb.
Aleos 8 years ago
parent
commit
e804970c49
4 changed files with 15 additions and 3 deletions
  1. 6 0
      conf/battle/skill.conf
  2. 1 0
      src/map/battle.c
  3. 1 0
      src/map/battle.h
  4. 7 3
      src/map/skill.c

+ 6 - 0
conf/battle/skill.conf

@@ -363,3 +363,9 @@ tarotcard_equal_chance: no
 // On official servers, it's impossible to dispel songs.
 // Hint: Also affects the Rebellion skill "Vanishing Buster".
 dispel_song: no
+
+// Banana Bomb from Genetic's Make Bomb skill sitting duration.
+// Official duration is 1000ms * Thrower's Job Level / 4.
+// 0: Uses the official duration
+// X: Enter a custom duration in milliseconds.
+banana_bomb_duration: 0

+ 1 - 0
src/map/battle.c

@@ -8411,6 +8411,7 @@ static const struct _battle_data {
 	{ "mail_zeny_fee",						&battle_config.mail_zeny_fee,					2,		0,		100,			},
 	{ "mail_attachment_price",				&battle_config.mail_attachment_price,			2500,	0,		INT32_MAX,		},
 	{ "mail_attachment_weight",				&battle_config.mail_attachment_weight,			2000,	0,		INT32_MAX,		},
+	{ "banana_bomb_duration",				&battle_config.banana_bomb_duration,			0,		0,		UINT16_MAX,		},
 
 #include "../custom/battle_config_init.inc"
 };

+ 1 - 0
src/map/battle.h

@@ -622,6 +622,7 @@ extern struct Battle_Config
 	int mail_zeny_fee;
 	int mail_attachment_price;
 	int mail_attachment_weight;
+	int banana_bomb_duration;
 
 #include "../custom/battle_config_struct.inc"
 } battle_config;

+ 7 - 3
src/map/skill.c

@@ -1713,9 +1713,13 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
 					sc_start4(src, bl, SC_MELON_BOMB, 100, skill_lv, 20 + sd->status.job_level, 10 + sd->status.job_level / 2, 0, 1000 * status_get_lv(src) / 4);
 					break;
 				case ITEMID_BANANA_BOMB:
-					sc_start(src,bl, SC_BANANA_BOMB_SITDOWN, status_get_lv(src) + sd->status.job_level + sstatus->dex / 6 - status_get_lv(bl) - tstatus->agi / 4 - tstatus->luk / 5, skill_lv, 1000 * sd->status.job_level / 4);
-					sc_start(src,bl, SC_BANANA_BOMB, 100, skill_lv, 30000);
-					break;
+					{
+						uint16 duration = (battle_config.banana_bomb_duration ? battle_config.banana_bomb_duration : 1000 * sd->status.job_level / 4);
+
+						sc_start(src,bl, SC_BANANA_BOMB_SITDOWN, status_get_lv(src) + sd->status.job_level + sstatus->dex / 6 - status_get_lv(bl) - tstatus->agi / 4 - tstatus->luk / 5, skill_lv, duration);
+						sc_start(src,bl, SC_BANANA_BOMB, 100, skill_lv, 30000);
+						break;
+					}
 			}
 			sd->itemid = -1;
 		}