[engine] Extended Drain

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
Post Reply
Brilliand
Posts: 80
Joined: July 11th, 2009, 12:15 am

[engine] Extended Drain

Post by Brilliand »

I propose that the "value," "add" and "multiply" attributes apply to the "drain" weapon special (AbilitiesWML), with "multiply" defaulting to 0.5 (for backwards compatibility) and negative values being legal for all three attributes. This would allow for various powers of drain, as well as "sacrifice" abilities, for instance a "suicide bomber" unit that deals to itself twice as much damage as it deals to the enemy (and has a ridiculously powerful attack) or a durable unit that must sacrifice some of its health to deal damage. Since it would be strange for a suicide bomber to not die when blowing up a skeleton, I also propose an "affects_nonliving" attribute for the "drain" weapon special that defaults to "no."

Due to the possibility of "apply_to=opponent", this could also be used to implement the "fiery" ability mentioned in "Giving your idea the best chance of being accepted."

A "works_on_miss" attribute (defaulting to "no") would complete the "suicide bomber" setup, while allowing for a large number of abilities in between.

While all of these effects can be achieved with events, the AI does not understand event-based abilities at all (right? I'm a bit unsure about this, but it's what I'd expect), and it would be nice to have this range of abilities show up in the damage calculations (which would cause the AI to take them into account).
You are a Dark Adept: you dimmerse yourself in the dark arts...potentially with great rewards....
-JW's personality quiz
User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: Extended Drain

Post by Gambit »

Seconded.

Anything that gives WML more power is good :)
User avatar
Zachron
Posts: 416
Joined: July 24th, 2007, 5:12 pm
Location: North Central Texas
Contact:

Re: Extended Drain

Post by Zachron »

Suicide bombers? Urban decay Era might happen afterall.
Project Battlescar: An rpg engine of my own design.
http://battlescar.wikispaces.com/
silene
Posts: 1109
Joined: August 28th, 2004, 10:02 pm

Re: Extended Drain

Post by silene »

Brilliand wrote:the AI does not understand event-based abilities at all (right? I'm a bit unsure about this, but it's what I'd expect)
Right. The AI does not perform any simulation, so it only knows about "static" attributes.
Brilliand
Posts: 80
Joined: July 11th, 2009, 12:15 am

Re: Extended Drain

Post by Brilliand »

I have actually coded this suggestion: http://gna.org/patch/?3083

I'm looking at a few different options for how it would work:
1. Drain effects work similarly to damage modifiers, with the base value
being half of the damage dealt (against living) or zero (against nonliving)
2. Same as above, but the [drain] tag never affects nonliving, and a
[heal_on_hit] tag is added for that
3. Drain effects are a percentage value out of the damage dealt, with a base
of 50%, and never work against nonliving. A separate [heal_on_hit] tag heals
the attacker a constant amount regardless of nonliving.

#3 is what I currently have written, but switching to one of the others would be very easy.

I could also reverse [heal_on_hit] and call it [sacrifice_health], since come to think of it the "damage self on hit" case will probably be more common than the "heal self on hit" case. Either way, the tag would accept negative numbers to get the opposite effect.
You are a Dark Adept: you dimmerse yourself in the dark arts...potentially with great rewards....
-JW's personality quiz
Post Reply