Skip to content
Permalink
Browse files

Implemented Magma Eruption Dot Damage (#3929)

* Fixes #3898.
* Implemented Magma Eruption Dot Damage which is the second attack for Magma Eruption.
Thanks to @exneval and @Balferian!
  • Loading branch information...
aleos89 committed Mar 25, 2019
1 parent 972a14e commit 9f4a569ecc0af179e6926c2b31062b2fff3bd771
Showing with 31 additions and 27 deletions.
  1. +3 −2 db/pre-re/skill_cast_db.txt
  2. +2 −1 db/pre-re/skill_db.txt
  3. +3 −1 db/re/skill_cast_db.txt
  4. +2 −1 db/re/skill_db.txt
  5. +6 −5 src/map/battle.cpp
  6. +12 −17 src/map/skill.cpp
  7. +1 −0 src/map/skill.hpp
  8. +2 −0 src/map/status.cpp
@@ -1318,8 +1318,9 @@
2282,0,0,0,20000:30000:40000:50000:60000,0,0
//-- NC_DISJOINT
2283,2000,0,0,0,0,0
//-- NC_MAGMA_ERUPTION
5006,1000,500,0,5000,42000,10000:9000:8000:7000:6000
5006,1000,500,0,5000,5000,10000:9000:8000:7000:6000
//-- NC_MAGMA_ERUPTION_DOTDAMAGE
5015,0,0,0,0,20000,0
//==========================================

//===== Shadow Chaser ======================
@@ -1345,7 +1345,7 @@
5003,7,6,1,-1,0x2,4:5:6:7:-1,5,1,no,0,0,0,weapon,0,0x0, GN_ILLUSIONDOPING,Illusion Doping
5004,9,6,2,1,0x42,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0x40000,0,weapon,0,0x0, RK_DRAGONBREATH_WATER,Dragon Breath - Water
5005,0,6,4,0,0x3,3,1,1,no,0,0,0,none,0,0x0, RK_LUXANIMA,Lux Anima
5006,1,6,2,3,0,0,5,1,no,0,0,3,misc,0,0x4000, NC_MAGMA_ERUPTION,Magma Eruption
5006,1,6,2,-1,0x2,3,5,1,no,0,0,3,weapon,0,0x4000, NC_MAGMA_ERUPTION,Magma Eruption
5007,0,6,4,0,0x3,5:6:7:8:9,5,1,no,0,0,0,none,0,0x0, WM_FRIGG_SONG,Frigg's Song
5008,0,6,4,0,0x3,11,5,1,no,0,0,0,none,0,0x0, SO_ELEMENTAL_SHIELD,Elemental Shield
5009,1,6,1,0,0x1,0,5,1,no,0,0,0,none,0,0x0, SR_FLASHCOMBO,Flash Combo
@@ -1354,6 +1354,7 @@
5012,0,6,4,0,0x1,0,5,1,no,0,0,0,none,0,0x0, WL_TELEKINESIS_INTENSE,Intense Telekinesis
5013,0,6,4,0,0x3,0,5,1,no,0,0,0,none,0,0x0, LG_KINGS_GRACE,King's Grace
5014,0,6,4,0,0x1,0,5,1,no,0,0,0,none,0,0x4000, ALL_FULL_THROTTLE,Full Throttle
5015,1,6,1,0,0xC0,0,5,1,no,0,0,0,misc,0,0, NC_MAGMA_ERUPTION_DOTDAMAGE,Magma Eruption Dot Damage

// Summoner - Placeholder
5018,0,0,0,0,0,0,1,0,no,0,0,0,none,0,0x0, SU_BASIC_SKILL,New Basic Skill
@@ -1347,7 +1347,9 @@
//-- NC_DISJOINT
2283,2000,0,0,0,0,0,-1
//-- NC_MAGMA_ERUPTION
5006,1000,500,0,5000,42000,10000:9000:8000:7000:6000,-1
5006,1000,500,0,5000,5000,10000:9000:8000:7000:6000,-1
//-- NC_MAGMA_ERUPTION_DOTDAMAGE
5015,0,0,0,0,20000,0,-1
//==========================================

//===== Shadow Chaser ======================
@@ -1399,7 +1399,7 @@
5003,7,6,1,-1,0x2,4:5:6:7:-1,5,1,no,0,0,0,weapon,0,0x0, GN_ILLUSIONDOPING,Illusion Doping
5004,9,6,2,1,0x42,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0x40000,0,weapon,0,0x0, RK_DRAGONBREATH_WATER,Dragon Breath - Water
5005,0,6,4,0,0x3,3,1,1,no,0,0,0,none,0,0x0, RK_LUXANIMA,Lux Anima
5006,1,6,2,3,0x2,3,5,1,no,0,0,3,misc,0,0x4000, NC_MAGMA_ERUPTION,Magma Eruption
5006,1,6,2,-1,0x2,3,5,1,no,0,0,3,weapon,0,0x4000, NC_MAGMA_ERUPTION,Magma Eruption
5007,0,6,4,0,0x3,5:6:7:8:9,5,1,no,0,0,0,none,0,0x0, WM_FRIGG_SONG,Frigg's Song
5008,0,6,4,0,0x3,11,5,1,no,0,0,0,none,0,0x0, SO_ELEMENTAL_SHIELD,Elemental Shield
5009,1,6,1,0,0x1,0,5,1,no,0,0,0,none,0,0x0, SR_FLASHCOMBO,Flash Combo
@@ -1408,6 +1408,7 @@
5012,0,6,4,0,0x1,0,5,1,no,0,0,0,none,0,0x0, WL_TELEKINESIS_INTENSE,Intense Telekinesis
5013,0,6,4,0,0x3,0,5,1,no,0,0,0,none,0,0x0, LG_KINGS_GRACE,King's Grace
5014,0,6,4,0,0x1,0,5,1,no,0,0,0,none,0,0x4000, ALL_FULL_THROTTLE,Full Throttle
5015,1,6,1,0,0xC0,0,5,1,no,0,0,0,misc,0,0, NC_MAGMA_ERUPTION_DOTDAMAGE,Magma Eruption Dot Damage

// Summoner
5018,0,0,0,0,0,0,1,0,no,0,0,0,none,0,0x0, SU_BASIC_SKILL,New Basic Skill
@@ -2874,6 +2874,7 @@ static void battle_calc_element_damage(struct Damage* wd, struct block_list *src
case SR_GATEOFHELL:
case SR_TIGERCANNON:
case KO_BAKURETSU:
//case NC_MAGMA_ERUPTION:
//Forced to neutral element
wd->damage = battle_attr_fix(src, target, wd->damage, ELE_NEUTRAL, tstatus->def_ele, tstatus->ele_lv);
break;
@@ -3946,8 +3947,7 @@ static int battle_calc_attack_skill_ratio(struct Damage* wd, struct block_list *
skillratio += 300 + 100 * skill_lv;
break;
case NC_MAGMA_ERUPTION: // 'Slam' damage
skillratio += 450 + 50 * skill_lv;
RE_LVL_DMOD(100);
skillratio += 350 + 50 * skill_lv;
break;
case NC_AXETORNADO:
skillratio += 100 + 100 * skill_lv + status_get_vit(src);
@@ -5576,6 +5576,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
case SR_GATEOFHELL:
case GN_FIRE_EXPANSION_ACID:
case KO_BAKURETSU:
//case NC_MAGMA_ERUPTION:
// Forced to neutral element
wd.damage = battle_attr_fix(src, target, wd.damage, ELE_NEUTRAL, tstatus->def_ele, tstatus->ele_lv);
break;
@@ -6457,9 +6458,6 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
md.flag |= battle_range_type(src, target, skill_id, skill_lv);

switch (skill_id) {
case NC_MAGMA_ERUPTION: // 'Eruption' damage
md.damage = 800 + 200 * skill_lv;
break;
case TF_THROWSTONE:
md.damage = 50;
md.flag |= BF_WEAPON;
@@ -6655,6 +6653,9 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
md.damage = md.damage * 200 / (skill_id == RA_CLUSTERBOMB ? 50 : 100);
nk |= NK_NO_ELEFIX|NK_IGNORE_FLEE|NK_NO_CARDFIX_DEF;
break;
case NC_MAGMA_ERUPTION_DOTDAMAGE: // 'Eruption' damage
md.damage = 800 + 200 * skill_lv;
break;
case WM_SOUND_OF_DESTRUCTION:
md.damage = 1000 * skill_lv + sstatus->int_ * ((sd) ? pc_checkskill(sd,WM_LESSON) : 1);
md.damage += md.damage * 10 * ((sd) ? battle_calc_chorusbonus(sd) / 100 : 0);
@@ -1822,11 +1822,11 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
case MH_XENO_SLASHER:
sc_start4(src, bl, SC_BLEEDING, skill_lv, skill_lv, src->id, 0, 0, skill_get_time2(skill_id, skill_lv));
break;
case NC_MAGMA_ERUPTION:
if (attack_type&BF_WEAPON) // Stun effect from 'slam'
sc_start(src, bl, SC_STUN, 90, skill_lv, skill_get_time(skill_id, skill_lv));
if (attack_type&BF_MISC) // Burning effect from 'eruption'
sc_start4(src, bl, SC_BURNING, 10 * skill_lv, skill_lv, 1000, src->id, 0, skill_get_time2(skill_id, skill_lv));
case NC_MAGMA_ERUPTION: // Stun effect from 'slam'
sc_start(src, bl, SC_STUN, 90, skill_lv, skill_get_time2(skill_id, skill_lv));
break;
case NC_MAGMA_ERUPTION_DOTDAMAGE: // Burning effect from 'eruption'
sc_start4(src, bl, SC_BURNING, 10 * skill_lv, skill_lv, 1000, src->id, 0, skill_get_time2(skill_id, skill_lv));
break;
case GN_ILLUSIONDOPING:
if( sc_start(src,bl,SC_ILLUSIONDOPING,100 - skill_lv * 10,skill_lv,skill_get_time(skill_id,skill_lv)) )
@@ -3515,7 +3515,6 @@ int64 skill_attack (int attack_type, struct block_list* src, struct block_list *
case EL_HURRICANE_ATK:
case KO_BAKURETSU:
case GN_CRAZYWEED_ATK:
case NC_MAGMA_ERUPTION:
case SU_SV_ROOTTWIST_ATK:
dmg.dmotion = clif_skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,dmg.div_,skill_id,-1,DMG_SPLASH);
break;
@@ -12511,11 +12510,9 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
// 1st, AoE 'slam' damage
i = skill_get_splash(skill_id, skill_lv);
map_foreachinarea(skill_area_sub, src->m, x-i, y-i, x+i, y+i, BL_CHAR,
src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill_castend_damage_id);
if (skill_get_unit_id(NC_MAGMA_ERUPTION,0)) {
// 2nd, AoE 'eruption' unit
skill_addtimerskill(src,gettick()+500,0,x,y,skill_id,skill_lv,BF_MISC,flag);
}
src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_ANIMATION|1, skill_castend_damage_id);
// 2nd, AoE 'eruption' unit
skill_addtimerskill(src,tick + status_get_amotion(src) * 2,0,x,y,skill_id,skill_lv,0,flag);
break;
case SU_LOPE:
{
@@ -13167,11 +13164,6 @@ struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 skill_
val2 = y;
val3 = 0; // Suck target at n seconds.
break;
case NC_MAGMA_ERUPTION:
// Since we have no 'place' anymore. time1 for Stun duration, time2 for burning duration
// Officially, duration (limit) is 5secs, interval 0.5secs damage interval.
limit = interval * 10;
break;
case MH_VOLCANIC_ASH:
if (!map_flag_vs(src->m))
target = BCT_ENEMY;
@@ -13772,7 +13764,6 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, t_t
case UNT_FIREWALK:
case UNT_ELECTRICWALK:
case UNT_PSYCHIC_WAVE:
case UNT_MAGMA_ERUPTION:
case UNT_MAKIBISHI:
case UNT_VENOMFOG:
case UNT_ICEMINE:
@@ -14395,6 +14386,10 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, t_t
skill_attack(skill_get_type(sg->skill_id),ss,&unit->bl,bl,sg->skill_id,sg->skill_lv,tick,SD_ANIMATION|SD_SPLASH),
1,sg->skill_id,sg->skill_lv,DMG_SKILL);
break;

case UNT_MAGMA_ERUPTION:
skill_attack(skill_get_type(NC_MAGMA_ERUPTION_DOTDAMAGE), ss, &unit->bl, bl, NC_MAGMA_ERUPTION_DOTDAMAGE, sg->skill_lv, tick, 0);
break;
}

if (bl->type == BL_MOB && ss != bl)
@@ -1813,6 +1813,7 @@ enum e_skill {
WL_TELEKINESIS_INTENSE,
LG_KINGS_GRACE,
ALL_FULL_THROTTLE,
NC_MAGMA_ERUPTION_DOTDAMAGE,

SU_BASIC_SKILL = 5018,
SU_BITE,
@@ -710,6 +710,8 @@ void initChangeTables(void)
set_sc( NC_MAGNETICFIELD , SC_MAGNETICFIELD , EFST_MAGNETICFIELD , SCB_NONE );
set_sc( NC_NEUTRALBARRIER , SC_NEUTRALBARRIER , EFST_NEUTRALBARRIER , SCB_DEF|SCB_MDEF );
set_sc( NC_STEALTHFIELD , SC_STEALTHFIELD , EFST_STEALTHFIELD , SCB_SPEED );
add_sc( NC_MAGMA_ERUPTION , SC_STUN );
add_sc( NC_MAGMA_ERUPTION_DOTDAMAGE, SC_BURNING );

/* Royal Guard */
set_sc( LG_REFLECTDAMAGE , SC_REFLECTDAMAGE , EFST_LG_REFLECTDAMAGE , SCB_NONE );

0 comments on commit 9f4a569

Please sign in to comment.
You can’t perform that action at this time.