Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Energy weapons rework #2803

Merged
merged 6 commits into from Sep 2, 2013

Conversation

Projects
None yet
3 participants
@swwu
Copy link
Contributor

commented Sep 1, 2013

Reworked visual effects etc on a bunch of energy weapons, see http://smf.cataclysmdda.com/index.php?topic=3061.0

The short version:

  • added an ammo_effects field to weapons, which will be appended to the ammo's own effects field when the weapon is fired.
  • added a NO_AMMO flag for weapons, which causes the weapon to not consume or require ammunition when fired.
  • added USE_UPS_20 and USE_UPS_40 flags for weapons that drain 20/12 and 40/24 UPS energy per shot, respectively.
  • UPS energy drain from weapons fire has been moved to the per-shot loop in game::fire so that burst-fired weapons with USE_UPS can drain the proper amount of energy.
  • added a pierce field to weapons that is added to the ammo's pierce field when calculating armor reduction. It's optional in the JSON (defaults to 0 if not specified). Also added item::gun_pierce(bool), which is essentially identical to item::gun_damage(bool) except it returns the pierce value.
  • added plasma and laser weapon vfx, which uses ammo_effects and custom fields.
  • make_gun_sound_effect() now makes different sounds for different volumes of energy weapons fire.
  • all fusion pack weapons now use UPS power, and only the fusion gun still uses fusion packs as ammunition.
  • tweaks to numbers in JSON for balance purposes.

swwu added some commits Sep 1, 2013

Some energy weapons changes
* Weapons now have an ammo_effects field in the JSON, all effects in that
field will be added to ammunition fired from that weapon
* Added plasma trail effect to plasma guns
Sounds, ammoless weapons, tweaks
* added NO_AMMO flag for weapons, and tweaked weapon numbers accordingly
* laser rifle, v29, and homemade v29 now use UPS but no ammo
* fusion gun now uses UPS as well as fusion packs
* tweaks to laserbeam effect
Changed UPS drain behavior, some balancing
* added USE_UPS_20 and USE_UPS_40 flags, which causes weapons to drain 20/12
and 40/24 UPS power per shot, respectively
* laser weapons now drain more UPS power (20/12 for pistols 40/24 for rifle)
* NO_AMMO and USE_UPS now both work correctly with burst-fire
* UPS energy drain now occurs inside the "shots" loop of game::fire in order
to drain the right amount of power during burst-fire
@KA101

This comment has been minimized.

Copy link
Contributor

commented Sep 1, 2013

It'd be nice to have fusion packs be useful for something other than powering a fusion gun--fusion guns aren't that common. Perhaps a recipe to disassemble them to plutonium cells, if that's not already in?

@swwu

This comment has been minimized.

Copy link
Contributor Author

commented Sep 1, 2013

Yeah, AFAIK fusion packs already disassemble back into plutonium cells since the fusion pack recipe is reversible.

@kevingranade kevingranade merged commit a9451bd into CleverRaven:master Sep 2, 2013

1 check passed

default Merged build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.