By Ragnarok.Flippant 2014-08-13 10:01:56
I'm just a "casual" COR, so I'm not 100% sure, practically speaking, what the code quoted above is trying to accomplish, but it is not what others seem to think it is. It is checking if your action is not a Quickdraw, but bullet_name is equal to the value of gear.QDbullet, a condition that will never happen for an Animikii user because, in the first section, bullet_name is assigned to the value of gear.QDbullet if, and only if, you are using Quickdraw. This section will only do something if your QDbullet variable is the same as your RAbullet, WSbullet, or MAbullet during those respective uses. I guess it doesn't want you to run out of ammo on another action because it feels having the correct bullet available for QD is more important.
The section directly above it should cancel most actions in instances you happen to not have the appropriate ammo in your inv/wardrobe so that you don't unintentionally use what you currently have on (QD or not), but I can't think of why that would not cover all the practical situations where you may accidentally shoot off your QD ammo. Does this always fail, or sometimes work successfully? Are you shooting it off even though you still have proper ammo in your inventory or wardrobe? What action is this occurring under? Not really any better way of handling the scenario. You can check if player.equipment.ammo == QD ammo, as the rule was always written in Spellcast, but this (in its current location) would check before you have a chance to change equipment for your current spell and could end up unnecessarily canceling actions; alternatively, as suggested above, you can just take off your ammo after QDs, which is really the safest thing to do as it would prevent the issue from arising to begin with.