diff --git a/db/pre-re/skill_db.yml b/db/pre-re/skill_db.yml index 6606e2e507..89f7081a5f 100644 --- a/db/pre-re/skill_db.yml +++ b/db/pre-re/skill_db.yml @@ -9345,20 +9345,20 @@ Body: Hit: Single Duration1: - Level: 1 - Time: 10000 + Time: 5000 - Level: 2 - Time: 15000 + Time: 10000 - Level: 3 - Time: 20000 + Time: 15000 - Level: 4 - Time: 25000 + Time: 20000 - Level: 5 - Time: 30000 - Status: IncHitRate + Time: 25000 + Status: Powerup - Id: 350 Name: NPC_AGIUP - Description: Agility UP - MaxLevel: 5 + Description: Agility Up + MaxLevel: 10 TargetType: Self DamageFlags: NoDamage: true @@ -9369,14 +9369,24 @@ Body: - Level: 1 Time: 10000 - Level: 2 - Time: 15000 - - Level: 3 Time: 20000 - - Level: 4 - Time: 25000 - - Level: 5 + - Level: 3 Time: 30000 - Status: IncFleeRate + - Level: 4 + Time: 40000 + - Level: 5 + Time: 50000 + - Level: 6 + Time: 60000 + - Level: 7 + Time: 70000 + - Level: 8 + Time: 80000 + - Level: 9 + Time: 90000 + - Level: 10 + Time: 100000 + Status: Agiup - Id: 351 Name: NPC_SIEGEMODE Description: Siege Mode diff --git a/db/pre-re/status.yml b/db/pre-re/status.yml index 6665f2f286..8e26af3347 100644 --- a/db/pre-re/status.yml +++ b/db/pre-re/status.yml @@ -2059,7 +2059,6 @@ Body: NoBanishingBuster: true NoClearance: true - Status: Inchitrate - DurationLookup: NPC_POWERUP CalcFlags: Hit: true Flags: @@ -2078,7 +2077,6 @@ Body: NoBanishingBuster: true NoClearance: true - Status: Incfleerate - DurationLookup: NPC_AGIUP CalcFlags: Flee: true Flags: @@ -7062,3 +7060,25 @@ Body: NoClearbuff: true - Status: WeaponBreaker DurationLookup: NPC_WEAPONBRAKER + - Status: Powerup + Icon: EFST_POWERUP + DurationLookup: NPC_POWERUP + CalcFlags: + Hit: true + Flags: + NoClearbuff: true + NoDispell: true + NoBanishingBuster: true + NoClearance: true + - Status: Agiup + Icon: EFST_AGIUP + DurationLookup: NPC_AGIUP + CalcFlags: + Speed: true + Flee: true + Flags: + NoClearbuff: true + NoBanishingBuster: true + NoClearance: true + EndOnStart: + Decreaseagi: true diff --git a/db/re/skill_db.yml b/db/re/skill_db.yml index 16e9746d00..c251c2431a 100644 --- a/db/re/skill_db.yml +++ b/db/re/skill_db.yml @@ -9655,20 +9655,20 @@ Body: Hit: Single Duration1: - Level: 1 - Time: 10000 + Time: 5000 - Level: 2 - Time: 15000 + Time: 10000 - Level: 3 - Time: 20000 + Time: 15000 - Level: 4 - Time: 25000 + Time: 20000 - Level: 5 - Time: 30000 - Status: IncHitRate + Time: 25000 + Status: Powerup - Id: 350 Name: NPC_AGIUP - Description: Agility UP - MaxLevel: 5 + Description: Agility Up + MaxLevel: 10 TargetType: Self DamageFlags: NoDamage: true @@ -9679,14 +9679,24 @@ Body: - Level: 1 Time: 10000 - Level: 2 - Time: 15000 - - Level: 3 Time: 20000 - - Level: 4 - Time: 25000 - - Level: 5 + - Level: 3 Time: 30000 - Status: IncFleeRate + - Level: 4 + Time: 40000 + - Level: 5 + Time: 50000 + - Level: 6 + Time: 60000 + - Level: 7 + Time: 70000 + - Level: 8 + Time: 80000 + - Level: 9 + Time: 90000 + - Level: 10 + Time: 100000 + Status: Agiup - Id: 351 Name: NPC_SIEGEMODE Description: Siege Mode diff --git a/db/re/status.yml b/db/re/status.yml index 572dba72fb..417c6147a0 100644 --- a/db/re/status.yml +++ b/db/re/status.yml @@ -2172,7 +2172,6 @@ Body: NoBanishingBuster: true NoClearance: true - Status: Inchitrate - DurationLookup: NPC_POWERUP CalcFlags: Hit: true Flags: @@ -2191,7 +2190,6 @@ Body: NoBanishingBuster: true NoClearance: true - Status: Incfleerate - DurationLookup: NPC_AGIUP CalcFlags: Flee: true Flags: @@ -8915,3 +8913,25 @@ Body: NoBanishingBuster: true NoClearance: true SendVal1: true + - Status: Powerup + Icon: EFST_POWERUP + DurationLookup: NPC_POWERUP + CalcFlags: + Hit: true + Flags: + NoClearbuff: true + NoDispell: true + NoBanishingBuster: true + NoClearance: true + - Status: Agiup + Icon: EFST_AGIUP + DurationLookup: NPC_AGIUP + CalcFlags: + Speed: true + Flee: true + Flags: + NoClearbuff: true + NoBanishingBuster: true + NoClearance: true + EndOnStart: + Decreaseagi: true diff --git a/doc/status_change.txt b/doc/status_change.txt index d5bd5d655c..530f55645a 100644 --- a/doc/status_change.txt +++ b/doc/status_change.txt @@ -2832,3 +2832,13 @@ SC_WEAPONBREAKER desc: Bonus given when using NPC_WEAPONBRAKER skill val1: Skill level val2: val1 * 2 weapon break chance + +SC_POWERUP + desc: Increases ATKpercent and Hit. + val1: + ATKpercent + val2: +% Hit + +SC_AGIUP + desc: Increase Speed and Flee. + val1: +% Walkspeed + val2: +% Flee diff --git a/src/map/battle.cpp b/src/map/battle.cpp index bd456c78bc..6aa1a416ed 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -4465,6 +4465,8 @@ static unsigned short battle_get_atkpercent(struct block_list& bl, uint16 skill_ atkpercent -= 25; if (sc.getSCE(SC_INCATKRATE)) atkpercent += sc.getSCE(SC_INCATKRATE)->val1; + if (sc.getSCE(SC_POWERUP)) + atkpercent += sc.getSCE(SC_POWERUP)->val1; if (sc.getSCE(SC_SKE)) atkpercent += 300; if (sc.getSCE(SC_BLOODLUST)) diff --git a/src/map/script_constants.hpp b/src/map/script_constants.hpp index c0999ec985..4bc4c7ffd3 100644 --- a/src/map/script_constants.hpp +++ b/src/map/script_constants.hpp @@ -1912,10 +1912,9 @@ export_constant(SC_HIDDEN_CARD); export_constant(SC_PERIOD_RECEIVEITEM_2ND); export_constant(SC_PERIOD_PLUSEXP_2ND); - -#ifdef RENEWAL export_constant(SC_EXTREMITYFIST2); -#endif + export_constant(SC_POWERUP); + export_constant(SC_AGIUP); /* status icons */ export_deprecated_constant2("SI_BLANK",-1); diff --git a/src/map/skill.cpp b/src/map/skill.cpp index 043ddaef5e..3d26daed4e 100755 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -9651,6 +9651,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui //Remove bonus_script by Dispell if (dstsd) pc_bonus_script_clear(dstsd,BSF_REM_ON_DISPELL); + // Monsters will unlock their target instead + else if (dstmd) + mob_unlocktarget(dstmd, tick); if(!tsc || !tsc->count) break; @@ -9997,15 +10000,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui break; case NPC_POWERUP: - sc_start(src,bl,SC_INCATKRATE,100,200,skill_get_time(skill_id, skill_lv)); clif_skill_nodamage(src,bl,skill_id,skill_lv, - sc_start(src,bl,type,100,100,skill_get_time(skill_id, skill_lv))); + sc_start2(src,bl,type,100,200,100,skill_get_time(skill_id, skill_lv))); break; case NPC_AGIUP: - sc_start(src,bl,SC_SPEEDUP1,100,50,skill_get_time(skill_id, skill_lv)); clif_skill_nodamage(src,bl,skill_id,skill_lv, - sc_start(src,bl,type,100,100,skill_get_time(skill_id, skill_lv))); + sc_start2(src,bl,type,100,50,100,skill_get_time(skill_id, skill_lv))); break; case NPC_INVISIBLE: diff --git a/src/map/status.cpp b/src/map/status.cpp index 828395a574..c279bf8732 100644 --- a/src/map/status.cpp +++ b/src/map/status.cpp @@ -7403,6 +7403,8 @@ static signed short status_calc_hit(struct block_list *bl, status_change *sc, in hit += sc->getSCE(SC_MTF_HITFLEE)->val1; if(sc->getSCE(SC_INCHITRATE)) hit += hit * sc->getSCE(SC_INCHITRATE)->val1/100; + if (sc->getSCE(SC_POWERUP)) + hit += hit * sc->getSCE(SC_POWERUP)->val2 / 100; if(sc->getSCE(SC_BLIND)) hit -= hit * 25/100; if(sc->getSCE(SC_HEAT_BARREL)) @@ -7519,6 +7521,8 @@ static signed short status_calc_flee(struct block_list *bl, status_change *sc, i // Rate value if(sc->getSCE(SC_INCFLEERATE)) flee += flee * sc->getSCE(SC_INCFLEERATE)->val1/100; + if (sc->getSCE(SC_AGIUP)) + flee += flee * sc->getSCE(SC_AGIUP)->val2 / 100; if(sc->getSCE(SC_SPIDERWEB) || sc->getSCE(SC_WIDEWEB)) flee -= flee * 50/100; if(sc->getSCE(SC_BERSERK)) @@ -8012,8 +8016,10 @@ static unsigned short status_calc_speed(struct block_list *bl, status_change *sc speed_rate = 150; // GetMoveHasteValue1() - if( sc->getSCE(SC_SPEEDUP1) ) // !FIXME: used both by NPC_AGIUP and Speed Potion script + if( sc->getSCE(SC_SPEEDUP1) ) val = max( val, sc->getSCE(SC_SPEEDUP1)->val1 ); + if (sc->getSCE(SC_AGIUP)) + val = max(val, sc->getSCE(SC_AGIUP)->val1); if( sc->getSCE(SC_INCREASEAGI) ) val = max( val, 25 ); if( sc->getSCE(SC_WINDWALK) ) @@ -12888,13 +12894,6 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty if ((val1&0xFFFF) == CG_MOONLIT) sc->opt3 |= OPT3_MOONLIT; break; - case SC_INCATKRATE: - // Simulate Explosion Spirits effect for NPC_POWERUP [Skotlex] - if (bl->type != BL_MOB) { - disable_opt_flag = true; - break; - } - break; } // On Aegis, when turning on a status change, first goes the option packet, then the sc packet. diff --git a/src/map/status.hpp b/src/map/status.hpp index d9c3fd7365..682cc92ee8 100644 --- a/src/map/status.hpp +++ b/src/map/status.hpp @@ -1307,9 +1307,10 @@ enum sc_type : int16 { SC_PERIOD_RECEIVEITEM_2ND, SC_PERIOD_PLUSEXP_2ND, -#ifdef RENEWAL - SC_EXTREMITYFIST2, //! NOTE: This SC should be right before SC_MAX, so it doesn't disturb if RENEWAL is disabled -#endif + SC_EXTREMITYFIST2, + SC_POWERUP, + SC_AGIUP, + SC_MAX, //Automatically updated max, used in for's to check we are within bounds. };