Initial commit: Fresh start with current state
This commit is contained in:
16
src/macro_setConditionalFromBuff.js
Normal file
16
src/macro_setConditionalFromBuff.js
Normal file
@@ -0,0 +1,16 @@
|
||||
var a = actor;
|
||||
var it = actor.items;
|
||||
var at = it.find(i => i.name === "Rapier +1" && i.type === "attack");
|
||||
var u = at.actions.find(a => a.name === "Attack");
|
||||
var c = u.conditionals;
|
||||
console.log(u);
|
||||
console.log(c.values().next().value);
|
||||
|
||||
console.log("1" + scope.name)
|
||||
conditional = c.find(e => e.data.name === scope.name);
|
||||
|
||||
var active = scope.status;
|
||||
|
||||
//ca.update writess to .data directly so no need for data.default but it should be only defualt
|
||||
var up = { "default" : active};
|
||||
await conditional.update(up);
|
||||
Reference in New Issue
Block a user