File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -329,6 +329,28 @@ module.exports = class MafiaAction extends Action {
329329 }
330330 }
331331
332+ // for the secondary actions of actor to be on target
333+ redirectAllSecondaryActions ( actor , target , label ) {
334+ actor = actor || this . actor ;
335+ target = target || this . target ;
336+
337+ for ( let action of this . game . actions [ 0 ] ) {
338+ if ( label && ! action . hasLabel ( label ) ) {
339+ continue ;
340+ }
341+
342+ if (
343+ action . priority > this . priority &&
344+ ! action . hasLabel ( "uncontrollable" ) &&
345+ ! action . hasLabel ( "mafia" ) &&
346+ ! action . hasLabel ( "primary" ) &&
347+ action . actor == actor
348+ ) {
349+ action . setAllTargets ( target ) ;
350+ }
351+ }
352+ }
353+
332354 // for every action targeting originalTarget, make the action target newTarget
333355 redirectAllActionsOnTarget ( originalTarget , newTarget , label ) {
334356 originalTarget = originalTarget || this . target ;
You can’t perform that action at this time.
0 commit comments