Opened 13 years ago
Last modified 3 years ago
#995 new enhancement
[PATCH] Trampling
Reported by: | historic_bruno | Owned by: | Freagarach |
---|---|---|---|
Priority: | Should Have | Milestone: | Work In Progress |
Component: | Simulation | Keywords: | patch |
Cc: | Patch: | Phab:D1838 |
Description (last modified by )
Units with trample damage passively damage opponents in trample range.
There's some outdated info in the design doc:
Attachments (4)
Change History (38)
by , 8 years ago
Attachment: | ticket995_trampling_1.diff added |
---|
comment:1 by , 8 years ago
Milestone: | Backlog → Alpha 20 |
---|
Some things need to be done:
- "Icon" for this aura.
- Maybe change the "2 HP per second" in a proper hack/pierce attack. (It is 2 not 1 in the patch, my mistake)
- Include for all units with trample attack.
- Other number for walking/running/charging (when implanted).
- Balancing.
Any other things?
comment:2 by , 8 years ago
Keywords: | patch added |
---|---|
Summary: | Trampling → [PATCH] Trampling |
- are you sure this actually harms the enemy and doesn't heal him?
- also the damage would be applied if the elephant is standing, which might be a bit weird when playing
comment:3 by , 8 years ago
Also Im not sure its the intended fix i thin it needs stamina then charging then trample
by , 8 years ago
Attachment: | ticket995_trampling_3.diff added |
---|
New version, allow actionmultipliers so an idle unit won't trample.
comment:4 by , 8 years ago
New patch allows "actionMultipliers", so a different value can be set for different "unitStates". In the patch there is only a value for "IDLE", "WALKING" and "APPROACHING" others need to be entered (just by putting them into the template). Trampling is only implanted for champion horse archers (read chariots), needs to be done for elephants and hero's too. Also the Aura icon is still a placeholder and numbers should be tweaked.
The idea of "actionMultipliers" can also solve #3606 by implanting those for techs too. Maybe FSM.js should call a combined function for auras and techs. Or even this function should be called from UnitAI.js.
comment:6 by , 8 years ago
Replying to stanislas69:
Why does the name have to be in caps ?
This way it is already stored in game, so we get the current state this way from the "getCurrentState" function.
comment:7 by , 8 years ago
Keywords: | review added |
---|
comment:9 by , 8 years ago
- Needs to be rebased since recent aura-updates (redundant code was removed, maybe your code will be shorter too now, specifically
Auras.prototype.ApplyBonus
) - Name of the action in CAPS -> UnitAI state
if (this.auras[name].actionMultiplier[action])
sure that this works intentionally for0
?ActionMultiplier
->StateMultiplier
?- ++x instead of x++
- The change to
StatusBars.js
looks okay, but do you recall why it is needed? - That what Palaxin said, but likely more than 2m (can be checked using the aura icon)
- Indentation problem with the XML
If the code works as advertized, it should be committed IMO :)
comment:10 by , 8 years ago
Replying to elexis:
- Needs to be rebased since recent aura-updates (redundant code was removed, maybe your code will be shorter too now, specifically
Auras.prototype.ApplyBonus
)- Name of the action in CAPS -> UnitAI state
- ++x instead of x++
ActionMultiplier
->StateMultiplier
?- Indentation problem with the XML
Done
if (this.auras[name].actionMultiplier[action])
sure that this works intentionally for0
?
With testing it works...
- The change to
StatusBars.js
looks okay, but do you recall why it is needed?
Yes, if we have an "add" modification of 0 or "multiply of 1, we don't change anything so no icon needs to be showed and this is what the code does. (Also the modifications are not called through to the Auramanager, BTW). Removing auras is done for any aura (e.g. because of moving out of range) also aura's without any modification (e.g add == 0) are removed. What happens than is that we try to remove an icon which is never added and that will trow an error.
- That what Palaxin said, but likely more than 2m (can be checked using the aura icon)
Made it 5 now (it was 100 for easy testing --> lazy me)
comment:11 by , 8 years ago
- Elephants (including gaia) should also deal trample damage
- Radius can be increased, 10m seems to be okay, maybe even more
- There is a problem, the aura is small and only active while the unit moves. The patch above doesn't inflict any damage at all due to that fact.
- Usually being kicked by horses and elephants isn't too healthy and should therefore be quite devastating (i.e. stronger than 1HP (/sec?))
- On the other side, it may not become so OP, that you can kill so many units just by running pass them (which could yield a game where only that unit becomes relevant)
comment:12 by , 8 years ago
The radius is hard to set. Unit must at first charge and gets really close to attacked unit, then if it runs then it makes trample damage. So radius must be small. As charge attack is not yet implemented, it's really hard to deal with that.
It is explained in design docs :
Also while in charge mode they will ignore the bounding boxes of mobile enemy units and attempt to pathfind straight through them. Some units (cavalry, including chariots and elephants, and military ships) have the Run.Trample attributes so gain "trample damage" when in charge mode: opponents within a specified range (typically one cell -- contact range) of the unit suffer a specified amount of damage. Since the unit has to stay in motion in order to retain the charge, they're considered to be crushed under hooves or chariot wheels, rammed by a ship, etc.
In irc logs i saw that too " (an elephant or chariot could charge right through, pushing units out of the way and dealing to them their "tample" aura damage)."
Imo, we really need charging before trampling.
comment:13 by , 8 years ago
Why don't the radius to type of damage, example is not same type damage by scythed chariot, ( by the blades) than a Elephant( by crush?)
by , 8 years ago
Attachment: | ticket995_trampling_5.diff added |
---|
included elephants and a bit of balancing
comment:14 by , 8 years ago
Patch above has this balance:
20 chariots decline 36 hp when walking over a unit 10 war elephants: 48 hp 20 archer elephant: 15 hp
We will need to update some tooltips but that will be a different patch (to prevent megapatches).
follow-up: 18 comment:15 by , 8 years ago
As player, i really want to have this. It's very nice you work on it. (I still think we must have charge before.)
Don't forget it for some warship too (trireme) as roaming is trampling.
I have another question. Wouldn't it be cleaner/better to use a Trample component (like the Heal one) ?
comment:16 by , 8 years ago
I want test this one, what I need to do, I'm using tortoise SVN , I have experience using patches ( apply over the SVN ) but I don't know how make build, so this need a build? Or compile or that kind stuff.
follow-up: 19 comment:18 by , 8 years ago
I have another question. Wouldn't it be cleaner/better to use a Trample component (like the Heal one) ?
Not sure it is need but can be considered (we mainly need to duplicate almost all aura code to the new component)
I want test this one, what I need to do, I'm using tortoise SVN , I have experience using patches ( apply over the SVN ) but I don't know how make build, so this need a build? Or compile or that kind stuff.
I don't need to rebuild here for this patch, so I think u can just apply patch and try it out ;)
comment:19 by , 8 years ago
Replying to bb:
I don't need to rebuild here for this patch, so I think u can just apply patch and try it out ;)
Thank You.
follow-up: 21 comment:20 by , 8 years ago
Trampling is finally the same as healing. We can heal with an entity can heal with Aura or Heal component. Imo, but it's vague, we don't have to modify Aura this way, and a Trample component (in the same way as Heal) would be cleaner and will be more robust for future. I don't knwow what you think about that.
comment:21 by , 8 years ago
Replying to fatherbushido: Heal affects only one target, while an aura affects all units in range
comment:22 by , 8 years ago
Yes elexis, that why we need another component (but we need only some mods). Moreover, heal have been recently modified to check state of target. In a same way, trample can check state of the source.
comment:23 by , 8 years ago
Ok here go my feedback, work fine better than I though, only need some visual consistency, a melee animation, specially elephants that are ranged.
comment:24 by , 8 years ago
Milestone: | Alpha 20 → Alpha 21 |
---|
comment:25 by , 8 years ago
Description: | modified (diff) |
---|---|
Keywords: | review removed |
As aura code has been modified, i put the patch out of the review queue.
Moreover i have some remarks.
- it seems that in the current version, a unit can only
receive damagesbe under the trample aura of one elephant if there are 10 elephants around it (see stackable auras). - for the unitAI states, taking there are some other case as APPROACHING, ATTACKING, WALKINGTOPOINT. Perhaps we should take care about that. We can also just check
GetCurrentSpeed
inCmpUnitMotion
(a low speed for elephants, and a higher for melee cav and chariots). I have not look at that in details. - at least, perhaps it would be better to wait for #3610.
comment:26 by , 8 years ago
I think we should take the direction of travel into account with the aura (maybe like a 90 degree sweep centered on the forward direction) because imo it would look very strange for an elephant to be running away from a melee cavalry attacking its rear and have trample damage applied to the cavalry.
comment:28 by , 7 years ago
Description: | modified (diff) |
---|---|
Owner: | set to |
(I plan to work on that soon)
comment:30 by , 6 years ago
Owner: | removed |
---|
comment:31 by , 5 years ago
Component: | UI & Simulation → Simulation |
---|
Move tickets to Simulation
as UI & Simulation
got some sub components.
comment:32 by , 5 years ago
https://code.wildfiregames.com/D1838 Things not yet implemented:
- Speed-dependency
- Animation
Could this be used to passively capture units (e.g. goats)?
comment:33 by , 5 years ago
Milestone: | Backlog → Work In Progress |
---|---|
Patch: | → Phab:D1838 |
comment:34 by , 3 years ago
Owner: | set to |
---|
Fist simple and ugly patch for this ticket. The maurian chariot no tramples nearby enemy's with 1 HP per second. Work in progress...