mysterymagination / ryddelmyst

cutethulhu meets Castlevania on the battlefields of Final Fantasy Tactics!
GNU General Public License v3.0
2 stars 0 forks source link

Fix IBattleStatsBearer attribution bug in Clash API #96

Closed mysterymagination closed 9 months ago

mysterymagination commented 9 months ago
mysterymagination commented 9 months ago

ideally we'd completely remove any coupling between objects generating data and objects making use of that data to support weird stuff like armor and weapons and anatomy that isn't part of the relevant Actor or attacks that aren't part of the weapon at the time its data is needed to process an attack. That presupposes a narrow definition of weapon and armor, however, when all those words mean to Clash is damage tx and rx. Also it would be a major pain. I think going forward with solving the particular problems raised by this ticket for now and not getting mired in theoretical API optimizations should do the trick.

of course, anatomyunit is another matter that could benefit from a data packet thing to separate out structure from function, but... meh. Don't really need that now.

the AActor we pass in to the ApplyPointDamage event is a nother nother point of interest; nothing to be done about that short of making a new event that takes a unique string attribution rather than AActor*.

mysterymagination commented 9 months ago

~todo~: install updated stats into claw slash attack when the treant decides to use it. The projectile things will have the stats installed when the projectile is created.

mysterymagination commented 9 months ago

~todo~: add associated Actor transform to FBattleStatsData objects at population

mysterymagination commented 9 months ago

~todo~: Weapon::WielderData needs to be populated where relevant; that's the main bridge we use to communicate battle stats data to attacks etc. via IAttacker/IDefender::GetBattleStatsData() in cases where the IBattleStatsBearer is not also the Actor delivering the Attack. Mostly it's for the projectiles, but for consistency I guess we should make use of it everywhere; the clawcapsulecomponent can just query the Actor for the latest battle stats data, install it in the Claw weapon WielderData, and then return the Claw's WielderData.

mysterymagination commented 9 months ago

fixed in https://github.com/mysterymagination/ryddelmyst/commit/22c3190fa0d98ac8b019b8c90e9f7be450b6ee1d and a bit before in branch https://github.com/mysterymagination/ryddelmyst/tree/88-add-lasers-to-clockworkbeauty