clintbellanger / flare

Free Libre Action Roleplaying Engine
http://clintbellanger.net/rpg/
GNU General Public License v3.0
166 stars 41 forks source link

Bomb powers from Polymorphable #839

Closed makrohn closed 12 years ago

makrohn commented 12 years ago

Dorkster implemented a cool feature so that we could create bombs in Polymorphable, and it might be worth merging into FLARE proper. Essentially, there is the ability for HP to tick down, and then explode on_death. A 3-second bomb, then, has two HP and triggers the explode power when it dies. The bomb itself doesn't take damage except for the countdown ticks.

https://github.com/pennomi/polymorphable/commit/cd72895592751261752bbef6505050a589cf8dfe

Dorkster can probably give a better idea of how/why it works, and it could probably be adapted to any kind of timed power, even with an empty/blank sprite stand-in. Think casting Meteor, where it ticks down six seconds, with a standing animation of roiling red clouds, followed by a "dying" animation of an explosion with a simultaneous power on_death. A time-delayed life-regen that glows and then "explodes" to heal nearby creatures. Etc. Etc.

dorkster commented 12 years ago

I'm not sure if I want to merge this with Flare. It was kind of a hack to begin with. If we do want this feature, I'd probably re-implement it using a separate countdown timer instead of decreasing health. Think of an enemy where you have a limited time to defeat it before it explodes. I would like to keep the health normal for such an enemy.

makrohn commented 12 years ago

Good point. Well, I thought I'd bring it up! I'd hate to see a good idea and good work disappear.

pennomi commented 12 years ago

The correct way to implement this would be to create a new behavior class for the enemy. It would be similar to BehaviorStandard.cpp but remove things like movement, etc.

I'd be really interested in seeing a second behavior class to see how/if it works.