Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.94 KB | None | 0 0
  1. void spell_rasengan (int sn, int level, CHAR_DATA * ch, void *vo,
  2. int target)
  3. {
  4. CHAR_DATA *victim = (CHAR_DATA *) vo;
  5. static const sh_int dam_each[] = {
  6. 0,
  7. 0, 0, 0, 0, 14, 17, 20, 23, 26, 29,
  8. 29, 29, 30, 30, 31, 31, 32, 35, 39, 42,
  9. 45, 48, 52, 55, 58, 59, 60, 61, 62, 64,
  10. 65, 66, 68, 70, 72, 75, 78, 82, 85, 88,
  11. 92, 96, 100, 105, 110, 114, 118, 122, 126, 130,
  12. 135, 140, 144, 148, 152, 156, 160, 165, 170, 175,
  13. 180, 185, 190, 195, 200, 205, 210, 215, 220, 225,
  14. 230, 235, 240, 245, 250, 255, 260, 265, 270, 275,
  15. 280, 285, 290, 295, 300, 305, 310, 315, 320, 325,
  16. 330, 335, 340, 345, 350, 355, 360, 365, 370, 375,
  17. 381, 387, 193, 399, 405, 411, 417, 423, 429, 435,
  18. 441, 447, 453, 459, 465, 471, 477, 483, 489, 495,
  19. 501, 506, 512, 518, 524, 530, 536, 542, 548, 554,
  20. 561, 568, 575, 592, 599, 606, 613, 620, 627, 634,
  21. 641, 648, 655, 662, 669, 676, 683, 690, 697, 704,
  22. 711, 718, 725, 732, 739, 746, 753, 760, 767, 774,
  23. 782, 790, 798, 806, 814, 822, 830, 838, 844, 852,
  24. 860, 868, 876, 894, 902, 910, 918, 926, 934, 942,
  25. 950, 958, 966, 974, 982, 990, 998, 1006, 1014, 1022,
  26. 1032, 1043, 1054, 1065, 1076, 1087, 1098, 1209, 1220, 1232,
  27. 1244, 1256, 1268, 1280, 1292, 1304, 1316, 1328, 1340, 1352
  28.  
  29. };
  30. int dam;
  31. int chakra_cost = 0;
  32.  
  33. level = UMIN (level, sizeof (dam_each) / sizeof (dam_each[0]) - 1);
  34. level = UMAX (0, level);
  35. dam = number_range (dam_each[level] / 2, dam_each[level] * 2);
  36. if (saves_spell (level, victim, DAM_ENERGY))
  37. dam /= 2;
  38.  
  39. act ("{WYou yell 'Rasengan!'{x and gather {Ca ball of chakra{x in your hands.\n\r You run towards $N and touch them with your {CRasengan{x", ch, NULL, victim, TO_CHAR);
  40. act ("{W$n yells, 'Rasengan!'{x and gathers {Ca ball of chakra{x in their hands.\n\r They run towards you and touch you with their {CRasengan{x", ch, NULL, victim, TO_VICT);
  41. act ("{W$n yells, 'Rasengan!'{x and gathers {Ca ball of chakra{x in their hands.\n\r They run towards $N and touch them with their {CRasengan{x", ch, NULL, victim, TO_NOTVICT);
  42.  
  43. if (is_affected (ch, skill_lookup ("nature earth")))
  44. {
  45. act ("{WYour earth nature mixes itself with your jutsu. {CNature change: {GR{ya{Gs{ye{Gn{D-{GA{yv{Ga{yl{Ga{yn{Gc{yh{Ge{W.{x", ch, NULL, victim, TO_CHAR);
  46. act ("{W$n's earth nature mixes with thier jutsu. {CNature change: {GR{ya{Gs{ye{Gn{D-{GA{yv{Ga{yl{Ga{yn{Gc{yh{Ge{W.{x", ch, NULL, victim, TO_VICT);
  47. act ("{W$n's earth nature mixes with thier jutsu. {CNature change: {GR{ya{Gs{ye{Gn{D-{GA{yv{Ga{yl{Ga{yn{Gc{yh{Ge{W.{x", ch, NULL, victim, TO_NOTVICT);
  48. chakra_cost += ch->level
  49. dam += (((ch->level) + (get_curr_stat (ch, STAT_CON)) * 2)
  50. dam += dam * 3
  51.  
  52. if (dam > max_dam)
  53. dam = max_dam;
  54.  
  55. if (chakra_cost > ch->mana)
  56. chakra_cost = (ch->mana);
  57.  
  58. if (IS_NPC (victim))
  59.  
  60. else
  61.  
  62. if (hasearth (victim))
  63. dam -= dam /3;
  64. }
  65.  
  66. if (is_affected (ch, skill_lookup ("nature fire")))
  67. {
  68. act ("{WYour fire nature mixes itself with your jutsu. {CNature change: {YR{Ra{ys{Re{Yn{D-{YF{Ri{yr{re{yb{ra{Rl{Yl{W.{x", ch, NULL, victim, TO_CHAR);
  69. act ("{W$n's fire nature mixes with thier jutsu. {CNature change: {YR{Ra{ys{Re{Yn{D-{YF{Ri{yr{re{yb{ra{Rl{Yl{W.{x", ch, NULL, victim, TO_VICT);
  70. act ("{W$n's fire nature mixes with thier jutsu. {CNature change: {YR{Ra{ys{Re{Yn{D-{YF{Ri{yr{re{yb{ra{Rl{Yl{W.{x", ch, NULL, victim, TO_NOTVICT);
  71. chakra_cost += ch->level
  72. dam += (((ch->level) + (get_curr_stat (ch, STAT_STR)) * 2)
  73. dam += dam * 3
  74.  
  75. if (dam > max_dam)
  76. dam = max_dam;
  77.  
  78. if (IS_SET (victim->imm_flags, IMM_FIRE))
  79. dam = 0;
  80. if (IS_SET (victim->res_flags, RES_FIRE))
  81. dam -= dam / 3;
  82. if (IS_SET (victim->vuln_flags, VULN_FIRE))
  83. dam += dam / 2;
  84.  
  85. if (chakra_cost > ch->mana)
  86. chakra_cost = (ch->mana);
  87.  
  88. if (IS_NPC (victim))
  89.  
  90. else
  91.  
  92. if (hasfire (victim))
  93. dam -= dam /3;
  94. }
  95.  
  96. if (is_affected (ch, skill_lookup ("nature lightning")))
  97. {
  98. act ("{WYour lightning nature mixes itself with your jutsu. {CNature change: {CR{Ya{cs{Ye{Cn{D-{CV{Yo{cl{Yt{ca{Yg{Ce{W.{x", ch, NULL, victim, TO_CHAR);
  99. act ("{W$n's lightning nature mixes with thier jutsu. {CNature change: {CR{Ya{cs{Ye{Cn{D-{CV{Yo{cl{Yt{ca{Yg{Ce{W.{x", ch, NULL, victim, TO_VICT);
  100. act ("{W$n's lightning nature mixes with thier jutsu. {CNature change: {CR{Ya{cs{Ye{Cn{D-{CV{Yo{cl{Yt{ca{Yg{Ce{W.{x", ch, NULL, victim, TO_NOTVICT);
  101. chakra_cost += ch->level
  102. dam += (((ch->level) + (get_curr_stat (ch, STAT_DEX)) * 2)
  103. dam += dam * 3
  104.  
  105. if (dam > max_dam)
  106. dam = max_dam;
  107.  
  108. if (IS_SET (victim->imm_flags, IMM_LIGHTNING))
  109. dam = 0;
  110. if (IS_SET (victim->res_flags, RES_LIGHTNING))
  111. dam -= dam / 3;
  112. if (IS_SET (victim->vuln_flags, VULN_LIGHTNING))
  113. dam += dam / 2;
  114.  
  115. if (chakra_cost > ch->mana)
  116. chakra_cost = (ch->mana);
  117.  
  118. if (IS_NPC (victim))
  119.  
  120. else
  121.  
  122. if (haslightning (victim))
  123. dam -= dam /3;
  124. }
  125.  
  126. if (is_affected (ch, skill_lookup ("nature water")))
  127. {
  128. act ("{WYour water nature mixes itself with your jutsu. {CNature change: {CR{wa{cs{we{Cn{D-{CT{ws{cu{Wn{ca{wm{Ce{W.{x", ch, NULL, victim, TO_CHAR);
  129. act ("{W$n's water nature mixes with thier jutsu. {CNature change: {CR{wa{cs{we{Cn{D-{CT{ws{cu{Wn{ca{wm{Ce{W.{x", ch, NULL, victim, TO_VICT);
  130. act ("{W$n's water nature mixes with thier jutsu. {CNature change: {CR{wa{cs{we{Cn{D-{CT{ws{cu{Wn{ca{wm{Ce{W.{x", ch, NULL, victim, TO_NOTVICT);
  131. chakra_cost += ch->level
  132. dam += (((ch->level) + (get_curr_stat (ch, STAT_WIS)) * 2)
  133. dam += dam * 3
  134.  
  135. if (dam > max_dam)
  136. dam = max_dam;
  137.  
  138. if (chakra_cost > ch->mana)
  139. chakra_cost = (ch->mana);
  140.  
  141. if (IS_NPC (victim))
  142.  
  143. else
  144.  
  145. if (haswater (victim))
  146. dam -= dam /3;
  147. }
  148.  
  149. if (is_affected (ch, skill_lookup ("nature air")))
  150. {
  151. act ("{WYour air nature mixes itself with your jutsu. {CNature change: {DR{Ca{Ms{Ce{Dn{w-{DS{Ch{Mi{mr{cu{Mk{Ce{Dn{W.{x", ch, NULL, victim, TO_CHAR);
  152. act ("{W$n's air nature mixes with thier jutsu. {CNature change: {DR{Ca{Ms{Ce{Dn{w-{DS{Ch{Mi{mr{cu{Mk{Ce{Dn{W.{x", ch, NULL, victim, TO_VICT);
  153. act ("{W$n's air nature mixes with thier jutsu. {CNature change: {DR{Ca{Ms{Ce{Dn{w-{DS{Ch{Mi{mr{cu{Mk{Ce{Dn{W.{x", ch, NULL, victim, TO_NOTVICT);
  154. chakra_cost += ch->level
  155. dam += (((ch->level) + (get_curr_stat (ch, STAT_INT)) * 2)
  156. dam += dam * 3
  157.  
  158. if (dam > max_dam)
  159. dam = max_dam;
  160.  
  161. if (chakra_cost > ch->mana)
  162. chakra_cost = (ch->mana);
  163.  
  164. if (IS_NPC (victim))
  165.  
  166. else
  167.  
  168. if (hasair (victim))
  169. dam -= dam /3;
  170. }
  171.  
  172. if (is_protected (ch, victim, FALSE))
  173. return;
  174.  
  175. if (IS_SET (victim->imm_flags, IMM_NINJUTSU))
  176. dam = 0;
  177. if (IS_SET (victim->res_flags, RES_NINJUTSU))
  178. dam -= dam / 3;
  179. if (IS_SET (victim->vuln_flags, VULN_NINJUTSU))
  180. dam += dam / 2;
  181.  
  182. damage (ch, victim, dam, sn, DAM_ENERGY, TRUE);
  183. if (clone_ninjutsu (ch))
  184. {
  185. int number_shadows = num_shadows (ch);
  186. int shadow_copied = 0;
  187. while ((number_shadows > 0) && (shadow_copied < 5))
  188. {
  189. shadow_copied ++;
  190. CHAR_DATA * shadow_clone = shadow (ch, number_shadows);
  191. deduct_clone_cost (shadow_clone, 15);
  192. if (check_shadow_clone (shadow_clone))
  193. destroy_shadow_clone (ch, shadow_clone, FALSE);
  194. else
  195. spell_oodama_rasengan (sn, level, shadow_clone, vo, target);
  196. number_shadows --;
  197. }
  198. }
  199. return;
  200. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement