Jump to content

[CHANGE] Throw (ninja, bard, thief)


Erelei

Recommended Posts

  • Implementor
Hot Change Date: 03/29/2018

Throws now actually hit vulns if they exist with the material you're using, and not just a few pre-defined materials. Illithids, vampires, and other races with vulns that weren't defined in the function can now be hit by the vulnerability depending on the object material, as it should have been from the start.


View full hot change

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • Implementor

Previously, edged items were only compared to several different kinds of materials, so it'd have to be forever added to. For those with the code:
 

3796   if ( IS_SET(dam_victim->vuln_flags, VULN_IRON) && strstr(obj->material,"iron"))
3797     dam_type = DAM_IRON;
3798   else if ( IS_SET(dam_victim->vuln_flags, VULN_SILVER) && strstr(obj->material,"silver"))
3799     dam_type = DAM_SILVER;
3800   else if ( IS_SET(dam_victim->vuln_flags, VULN_MITHRIL) && strstr(obj->material,"mithril"))
3801     dam_type = DAM_MITHRIL;
3802   else if ( IS_SET(dam_victim->vuln_flags, VULN_WOOD) && strstr(obj->material,"wood"))
3803     dam_type = DAM_WOOD;
3804   else if ( IS_SET(dam_victim->vuln_flags, VULN_WOOD) && strstr(obj->material,"wood"))
3805     dam_type = DAM_WOOD;
3806   else if ( IS_SET(dam_victim->vuln_flags, VULN_COLD)
3807     && (strstr(obj->material,"ice") || strstr(obj->material,"cold")))
3808     dam_type = DAM_COLD;
3809   else if ( IS_SET(dam_victim->vuln_flags, VULN_FIRE) && strstr(obj->material,"fire"))
3810     dam_type = DAM_FIRE;
3811   else
3812     dam_type = attack_table[obj->value[3]].damage;

As you can see, only the above races/vulns were hit. No others were hit. No "air" vuln, mental vuln, light/holy vuln for qraces/classes, etc.

  • Like 1
Link to comment
Share on other sites

@Erelei There's an item made of 'Iron' with a capital 'I' rather than the typical 'iron' with the lower case 'i'. Would that now be considered iron regardless of the difference in capitalization, or is it something that is just overlooked? I'm mainly asking out of curiosity as I don't play classes that throw all that often.

Link to comment
Share on other sites

  • Implementor

I got that covered. Just for this skill actually...
 

  95 char *to_lower(char *t){
  96   for (int tl = 0; t[tl]; tl++)
  97     t[tl] = tolower(t[tl]);
  98   return t;
  99 }

3751   sprintf(obj_mat, "%s", obj->material);
3752   to_lower(obj_mat);

 

Link to comment
Share on other sites

2 hours ago, Erelei said:

As you can see, only the above races/vulns were hit. No others were hit. No "air" vuln, mental vuln, light/holy vuln for qraces/classes, etc.

I could've sword I've fought some vampires/undeads/squids and so on and was hitting their vuln with light/holy shurikens.

The amount of time I spent killing a certain strong mob just to obtain holy shurikens for Donovan was uncanny. Was that all in vain?

Link to comment
Share on other sites

  • Implementor
1 hour ago, f0xx said:

I could've sword I've fought some vampires/undeads/squids and so on and was hitting their vuln with light/holy shurikens.

If it was a weapon, the damage of the weapon was copied over. Armor, however, did not.

Link to comment
Share on other sites

  • Implementor

This is still the case, too, in case people are wondering.

Armor did not have the same affect  - this fixes that issue. If you edge a rare weapon with 'rays' damage, it'll hit with that dam_type. If you edged a piece of rare armor with 'light' material, pre-change, it would not hit for light damage. Now it does.

  • Like 2
Link to comment
Share on other sites

×
×
  • Create New...