PDA

View Full Version : Getting targets of an actor



Kelrugem
October 19th, 2019, 21:35
Hi :)

Is there a hopefully easy way to get all targets of someone's action? I've found in CoreRPG

TargetingManager.getFullTargets(rActor)
but this only gives the targets in the target line of the CT entry, so targets coming from drag&drop can not be reached by that (like dropping an attack roll onto a token or CT entry). Is there a way to check whether some action/actor has such a target saved at the moment? (like, there is a general attack roll without a target and this roll is then applied to the target coming from drag&drop; is there a way to check in the code of this general attack roll whether this roll will be applied to such a target afterwards? Like checking whether there is a waiting list of targets for this roll beside getFullTargets (and maybe ModifierStack.getTargeting() to check whether the CT targets will be used)?)

Thanks in advance :)

Best,

Kelrugem

EDIT: I do not need a list of all targets, I only need some handle which tells me if this action will be applied to some target :)

Moon Wizard
October 20th, 2019, 02:05
When an roll is dropped on a token, the ActionsManager.actionDrop(...) function is called with the target passed in as a parameter. Then, that targeting is modified per the specific targeting mechanics for that action type in ActionsManager.getTargeting(...). Then, the resulting source, target(s), and roll information is processed as usual.

Regards,
JPG

Kelrugem
October 20th, 2019, 02:17
ah, oki, thanks for these informations :) I take a look into that now :)