Skip to content

Commit

Permalink
Initial release for Monster Transformation Scrolls.(Thanks to Beret)
Browse files Browse the repository at this point in the history
(http://hercules.ws/board/topic/1087-scroll-transform/)
Fixed Bug#7372
-where bows should not benefit matk bonus from upgrade. Thanks to Ryuuzaki

Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
  • Loading branch information
malufett committed Jun 15, 2013
1 parent 8fb06fb commit 6fd440e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
1 change: 1 addition & 0 deletions db/const.txt
Expand Up @@ -1289,6 +1289,7 @@ SC_KINGS_GRACE 557
SC_TELEKINESIS_INTENSE 558
SC_OFFERTORIUM 559
SC_FRIGG_SONG 560
SC_MONSTER_TRANSFORM 563

e_gasp 0
e_what 1
Expand Down
20 changes: 14 additions & 6 deletions db/re/item_db.txt
Expand Up @@ -5899,6 +5899,14 @@
12646,Fried_Octopus_Legs,Fried Octopus Legs,2,20,,30,,,,,,,,,,,,,{},{},{}
12647,Sea_Ink,Sea Ink,2,20,,30,,,,,,,,,,,,,{},{},{}
//
12658,Transformation_Scroll(Deviruchi),Transformation Scroll(Deviruchi),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1109,0,0,0; },{},{}
12659,Transformation_Scroll(Raydric),Transformation Scroll(Raydric),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1276,0,0,0; },{},{}
12660,Transformation_Scroll(Mavka),Transformation Scroll(Mavka),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1884,0,0,0; },{},{}
12661,Transformation_Scroll(Marduk),Transformation Scroll(Marduk),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1140,0,0,0; },{},{}
12662,Transformation_Scroll(Banshee),Transformation Scroll(Banshee),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1867,0,0,0; },{},{}
12663,Transformation_Scroll(Poring),Transformation Scroll(Poring),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1002,0,0,0; },{},{}
12664,Transformation_Scroll(Golem),Transformation Scroll(Golem),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1040,0,0,0; },{},{}
//
12699,Tikbalang_Belt,Tikbalang Belt,2,20,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 2313; },{},{}
12700,Upside_Down_Shirt,Upside Down Shirt,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ warp "malaya",242,211; },{},{}
12701,Old_Blue_Box_F,Old Blue Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
Expand Down Expand Up @@ -7586,13 +7594,13 @@
17030,St_Pat_Hat_box,St Pat Hat box,18,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 18565,1; },{},{}
17035,Energetic_Pisces_Scroll,Energetic Pisces Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
17036,Energetic_Pisces_Box,Energetic Pisces Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
17037,Trans_Box_Devi,Trans Box Devi,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
17038,Trans_Box_Ray_Arch,Trans Box Ray Arch,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
17039,Trans_Box_Mavka,Trans Box Mavka,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
17040,Trans_Box_Marduk,Trans Box Marduk,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
17041,Trans_Box_Banshee,Trans Box Banshee,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
17037,Trans_Box_Devi,Trans Box Devi,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12658,10; },{},{}
17038,Trans_Box_Ray_Arch,Trans Box Ray Arch,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12659,10; },{},{}
17039,Trans_Box_Mavka,Trans Box Mavka,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12660,10; },{},{}
17040,Trans_Box_Marduk,Trans Box Marduk,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12661,10; },{},{}
17041,Trans_Box_Banshee,Trans Box Banshee,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12662,10; },{},{}
17042,Trans_Box_Poring,Trans Box Poring,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12663,10; },{},{}
17043,Trans_Box_Golem,Trans Box Golem,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
17043,Trans_Box_Golem,Trans Box Golem,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12664,10; },{},{}
17050,Aries_Scroll,Aries Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
17051,Aries_Scroll_Box,Aries Scroll Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
17052,Holy_Mom_Blaze_Box,Holy Mom Blaze Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 6472,1; },{},{}
Expand Down
13 changes: 11 additions & 2 deletions src/map/status.c
Expand Up @@ -915,6 +915,7 @@ void initChangeTables(void) {
StatusIconChangeTable[SC_PUSH_CART] = SI_ON_PUSH_CART;
StatusIconChangeTable[SC_REBOUND] = SI_REBOUND;
StatusIconChangeTable[SC_ALL_RIDING] = SI_ALL_RIDING;
StatusIconChangeTable[SC_MONSTER_TRANSFORM] = SI_MONSTER_TRANSFORM;

//Other SC which are not necessarily associated to skills.
StatusChangeFlagTable[SC_ATTHASTE_POTION1] = SCB_ASPD;
Expand Down Expand Up @@ -2500,7 +2501,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
#ifdef RENEWAL
wa->matk += sd->inventory_data[index]->matk;
wa->wlv = wlv;
if( r ) // renewal magic attack refine bonus
if( r && sd->weapontype1 != W_BOW ) // renewal magic attack refine bonus
wa->matk += refine_info[wlv].bonus[r-1] / 100;
#endif

Expand Down Expand Up @@ -8712,6 +8713,11 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
tick_time = 10000;
val4 = tick / tick_time;
break;
case SC_MONSTER_TRANSFORM:
if( !mobdb_checkid(val1) )
val1 = 1002; // default poring
val_flag |= 1;
break;
default:
if( calc_flag == SCB_NONE && StatusSkillChangeTable[type] == 0 && StatusIconChangeTable[type] == 0 )
{ //Status change with no calc, no icon, and no skill associated...?
Expand Down Expand Up @@ -8739,8 +8745,12 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_SUMMON3:
case SC_SUMMON4:
case SC_SUMMON5:
case SC_MONSTER_TRANSFORM:
val_flag |= 1;
break;
case SC_KYOUGAKU:
clif->status_change(bl, SI_ACTIVE_MONSTER_TRANSFORM, 1, 0, 1002, 0, 0); // Poring in disguise
break;
}
}

Expand Down Expand Up @@ -9646,7 +9656,6 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
}
break;
case SC_KYOUGAKU:
clif->sc_end(&sd->bl,sd->bl.id,AREA,SI_KYOUGAKU);
clif->sc_end(&sd->bl,sd->bl.id,AREA,SI_ACTIVE_MONSTER_TRANSFORM);
break;
case SC_CLAIRVOYANCE:
Expand Down
2 changes: 2 additions & 0 deletions src/map/status.h
Expand Up @@ -671,6 +671,8 @@ typedef enum sc_type {
SC_ALL_RIDING,
SC_HANBOK,

SC_MONSTER_TRANSFORM,

SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
} sc_type;

Expand Down

0 comments on commit 6fd440e

Please sign in to comment.