[engine] Extended Drain
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
[engine] Extended Drain
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).
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
-JW's personality quiz
Re: Extended Drain
Seconded.
Anything that gives WML more power is good
Anything that gives WML more power is good
Re: Extended Drain
Suicide bombers? Urban decay Era might happen afterall.
Project Battlescar: An rpg engine of my own design.
http://battlescar.wikispaces.com/
http://battlescar.wikispaces.com/
Re: Extended Drain
Right. The AI does not perform any simulation, so it only knows about "static" attributes.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)
Re: Extended Drain
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.
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
-JW's personality quiz