Jump to content
  • 0

Reflect on magic skill.


PewN

Question


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

hi im having a problem with reflect..

 

how can i revert it on old?

 

cuz example. i cast a fire bolt on enemy ( having reflect items )

then i can resist the reflect by using fire resist. how can i do that reflect can't resist?

 

im using pre-renewal

Edited by TrojanWorm
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  429
  • Reputation:   60
  • Joined:  08/19/12
  • Last Seen:  

hmm we got opposite problem dud :D hahaha i have a prob too.. but for me i want a magic reflect resist (property) .. using pre-re (3ceam) .. xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

hi im having a problem with reflect..

 

how can i revert it on old?

 

cuz example. i cast a fire bolt on enemy ( having reflect items )

then i can resist the reflect by using fire resist. how can i do that reflect can't resist?

 

im using pre-renewal

It seems that  the magic reflect behavior changed   relate to this upgrade  17286

 

try reverting this part of code snippet in skill.c to return old behavior

-                        if( dmg.dmg_lv != ATK_MISS )//Wiz SL cancelled and consumed fragment
-                                dmg = battle_calc_attack(BF_MAGIC,bl,bl,skill_id,skill_lv,flag&0xFFF);
+                        if( dmg.dmg_lv != ATK_MISS ){//Wiz SL cancelled and consumed fragment
+                                short s_ele = skill_get_ele(skill_id, skill_lv);
+
+                                if (s_ele == -1) // the skill takes the weapon's element
+                                        s_ele = sstatus->rhw.ele;
+                                else if (s_ele == -2) //Use status element
+                                        s_ele = status_get_attack_sc_element(src,status_get_sc(src));
+                                else if( s_ele == -3 ) //Use random element
+                                        s_ele = rnd()%ELE_MAX;
+
+                                dmg.damage = battle_attr_fix(bl, bl, dmg.damage, s_ele, status_get_element(bl), status_get_element_level(bl));
+
+                                if( sc && sc->data[SC_ENERGYCOAT] ) {
+                                        struct status_data *status = status_get_status_data(bl);
+                                        int per = 100*status->sp / status->max_sp -1; //100% should be counted as the 80~99% interval
+                                        per /=20; //Uses 20% SP intervals.
+                                        //SP Cost: 1% + 0.5% per every 20% SP
+                                        if (!status_charge(bl, 0, (10+5*per)*status->max_sp/1000))
+                                                status_change_end(bl, SC_ENERGYCOAT, INVALID_TIMER);
+                                        //Reduction: 6% + 6% every 20%
+                                        dmg.damage -= dmg.damage * (6 * (1+per)) / 100;
+                                }
+                }
Edited by QQfoolsorellina
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...