summaryrefslogtreecommitdiff
path: root/tgscripts/foundrymacros-thirteenth.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tgscripts/foundrymacros-thirteenth.txt')
-rw-r--r--tgscripts/foundrymacros-thirteenth.txt387
1 files changed, 387 insertions, 0 deletions
diff --git a/tgscripts/foundrymacros-thirteenth.txt b/tgscripts/foundrymacros-thirteenth.txt
new file mode 100644
index 0000000..840b00e
--- /dev/null
+++ b/tgscripts/foundrymacros-thirteenth.txt
@@ -0,0 +1,387 @@
+event = "onclick";
+itemId = "CQVSSTo5BURaOi7L";
+charName = "Hisui";
+item = game.actors.getName(charName).items.get(itemId);
+item.roll();
+
+----------------------------------------------------------------------------------------------------
+
+const his = game.actors.getName("Hisui");
+his.update({'system.resources.spendable.custom1.current' : 1});
+his.system.resources.spendable.custom1.current = 1;
+game.macros.getName('Stance-AC-Change').execute()
+
+*(1-@rsc.weapontracker)+(@rsc.weapontracker)*@wpn.m.dice
+
+----------------------------------------------------------------------------------------------------
+
+main()
+
+async function main() {
+const his2 = game.actors.getName("Hisui");
+console.log(his2.getRollData());
+const koh2 = game.actors.getName("Kohaku");
+console.log(koh2.getRollData());
+}
+
+
+----------------------------------------------------------------------------------------------------
+
+main()
+
+async function main(){
+
+const his = game.actors.getName("Hisui");
+var stance = his.data.data.resources.spendable.custom1.current;
+his.update({ 'system.attributes.ac.base': 11 + stance });
+}
+
+----------------------------------------------------------------------------------------------------
+
+The monk has failed to perform an attack from one of the three available stances on their turn, making their AC bonus reset to 0.
+
+const his = game.actors.getName("Hisui");
+his.update({'system.resources.spendable.custom1.current' : 0});
+his.system.resources.spendable.custom1.current = 0;
+game.macros.getName('Stance-AC-Change').execute()
+
+----------------------------------------------------------------------------------------------------
+
+let applyWeaponChanges = false;
+let applyFistChanges = false;
+const his = game.actors.getName("Hisui");
+
+let style = '<h2 style="font-family:mason-serif; background-image:linear-gradient(45deg, #25003c, rgba(220, 159, 241, 0.6509803922)); color:#fff; padding-left: 4px; text-shadow: 1px 1px 2px #000">'
+
+let message = style + 'Weapon Select</h2>\n<p style="font-family:warnock-pro;">Hisui is using ';
+
+const myDialogOptions = {
+ width: 535,
+ height: 115
+};
+
+new Dialog({
+ title : `Improvised Weapon Select`,
+ content : `<label>Weapon type: </label>
+ <select name="attackmod" id="attackmod">
+ <option value="2h">Two-Handed</option>
+ <option value="1h">One-handed</option>
+ </select>
+ <select name="range" id="range">
+ <option value="melee">Melee</option>
+ <option value="ranged">Ranged</option>
+ </select>
+ <label> Weapon damage: </label>
+ <select name="dice" id="dice">
+ <option value="d4">d4</option>
+ <option value="d6">d6</option>
+ <option value="d8">d8</option>
+ <option value="d10">d10</option>
+ <option value="d12">d12</option>
+ </select>
+ <input type="checkbox" id="thrown" name="thrown">
+ <label for="thrown">Thrown</label>`,
+ buttons : {
+ weapon : {
+ icon : "<i class='fas fa-check'></i>",
+ label : `Equip Weapon`,
+ callback : () => { applyWeaponChanges = true; applyFistChanges = false; }
+ },
+ fists : {
+ icon : "<i class='fas fa-skull-crossbones'></i>",
+ label : `Equip Hands`,
+ callback : () => { applyWeaponChanges = false; applyFistChanges = true; }
+ },
+ cancel : {
+ icon : "<i class='fas fa-times'></i>",
+ label : `Cancel`,
+ callback : () => { applyWeaponChanges = false; applyFistChanges = false; }
+ }
+ },
+ default : "weapon",
+ close : html => {
+ if (applyWeaponChanges || applyFistChanges) {
+ if(applyWeaponChanges) {
+ let die = ( html.find('[name="dice"]')[0].value || "d8" );
+ let hand = ( html.find('[name="attackmod"]')[0].value || "1h" );
+ let range = ( html.find('[name="range"]')[0].value || "melee" );
+ let thrown = ( html.find('[name="thrown"]')[0].checked );
+ let mod = ( hand == "2h" && range == "melee" ) ? (his.data.data.abilities.str.mod - his.data.data.abilities.dex.mod) : 0;
+
+ if ( range == "melee" ){
+ his.system.attributes.weapon.melee.dice = die;
+ his.update({'system.attributes.weapon.melee.dice' : die });
+ }
+ if ( range == "ranged" || thrown == true ){
+ his.system.attributes.weapon.ranged.dice = die;
+ his.update({'system.attributes.weapon.ranged.dice' : die });
+ }
+
+ his.system.attributes.attackMod.value = mod;
+
+ his.update({'system.attributes.weapon.melee.dualwield' : (hand == "1h" && range == "melee") ? 'true' : 'false' });
+
+ message += 'a ' + ( hand == "1h" ? '<strong>one-handed</strong> ' : '<strong>two-handed</strong> ') + ( range == "melee" ? '<strong>melee</strong> ' : '<strong>ranged</strong> ' ) + ( thrown == true ? '<strong>(thrown) </strong> ' : '' ) + 'weapon with a <strong>' + die + '</strong> damage die.</p>';
+
+ if ( range == "ranged" ) applyWeaponChanges = false
+
+ } else {
+ his.system.attributes.attackMod.value = 0;
+ his.update({'system.attributes.weapon.melee.dualwield' : 'true' });
+
+ message += 'her bare hands.</p>'
+ }
+
+ his.update({'system.resources.spendable.custom2.current' : (applyWeaponChanges == true) ? 1 : 0});
+
+ ChatMessage.create({
+ user: game.user._id,
+ speaker: ChatMessage.getSpeaker({token: actor}),
+ content: message
+ });
+
+
+ }
+ }
+ }, myDialogOptions).render(true);
+
+----------------------------------------------------------------------------------------------------
+
+let applyBoost = false;
+let applyUnboost = false;
+const his = game.actors.getName("Hisui");
+
+let style = '<h2 style="font-family:mason-serif; background-image:linear-gradient(45deg, #25003c, rgba(220, 159, 241, 0.6509803922)); color:#fff; padding-left: 4px; text-shadow: 1px 1px 2px #000">'
+
+let message = style + 'Blue-Eye Boost</h2>\n<p style="font-family:warnock-pro;">Hisui\'s Blue-Eye Boost has ';
+
+const myDialogOptions = {
+ width: 435,
+ height: 115
+};
+
+new Dialog({
+ title : `Blue-Eye Boost`,
+ content : `<label>Boost?</label>`,
+ buttons : {
+ boost : {
+ icon : "<i class='fas fa-check'></i>",
+ label : `Boost`,
+ callback : () => { applyBoost = true; applyUnboost = false; }
+ },
+ unboost : {
+ icon : "<i class='fas fa-skull-crossbones'></i>",
+ label : `Unboost`,
+ callback : () => { applyBoost = false; applyUnboost = true; }
+ },
+ cancel : {
+ icon : "<i class='fas fa-times'></i>",
+ label : `Cancel`,
+ callback : () => { applyBoost = false; applyUnboost = false; }
+ }
+ },
+ default : "boost",
+ close : html => {
+
+ rangeddie = his.system.attributes.weapon.ranged.dice;
+ jabdie = his.system.attributes.weapon.jab.dice;
+ punchdie = his.system.attributes.weapon.punch.dice;
+ kickdie = his.system.attributes.weapon.kick.dice;
+
+ rangedvalue = parseInt(rangeddie.slice(1));
+ jabvalue = parseInt(jabdie.slice(1));
+ punchvalue = parseInt(punchdie.slice(1));
+ kickvalue = parseInt(kickdie.slice(1));
+
+ if (applyBoost || applyUnboost) {
+ if(applyBoost) {
+
+ his.update({'system.resources.spendable.custom3.current' : rangedvalue});
+
+ rangedvalue += 2;
+ jabvalue += 2;
+ punchvalue += 2;
+ kickvalue += 2;
+
+ rangeddie = 'd' + rangedvalue;
+ jabdie = 'd' + jabvalue;
+ punchdie = 'd' + punchvalue;
+ kickdie = 'd' + kickvalue;
+
+ his.system.attributes.weapon.ranged.dice = rangeddie;
+ his.update({'system.attributes.weapon.ranged.dice' : rangeddie });
+
+ his.system.attributes.weapon.jab.dice = jabdie;
+ his.update({'system.attributes.weapon.jab.dice' : jabdie });
+
+ his.system.attributes.weapon.punch.dice = punchdie;
+ his.update({'system.attributes.weapon.punch.dice' : punchdie });
+
+ his.system.attributes.weapon.kick.dice = kickdie;
+ his.update({'system.attributes.weapon.kick.dice' : kickdie });
+
+ message += 'been activated.</p>';
+
+ } else {
+
+ rangedvalue = his.system.resources.spendable.custom3.current == 0 ? rangedvalue : his.system.resources.spendable.custom3.current;
+ jabvalue = 6;
+ punchvalue = 8;
+ kickvalue = 10;
+
+ his.update({'system.resources.spendable.custom3.current' : 0});
+
+ rangeddie = 'd' + rangedvalue;
+ jabdie = 'd' + jabvalue;
+ punchdie = 'd' + punchvalue;
+ kickdie = 'd' + kickvalue;
+
+ his.system.attributes.weapon.ranged.dice = rangeddie;
+ his.update({'system.attributes.weapon.ranged.dice' : rangeddie });
+
+ his.system.attributes.weapon.jab.dice = jabdie;
+ his.update({'system.attributes.weapon.jab.dice' : jabdie });
+
+ his.system.attributes.weapon.punch.dice = punchdie;
+ his.update({'system.attributes.weapon.punch.dice' : punchdie });
+
+ his.system.attributes.weapon.kick.dice = kickdie;
+ his.update({'system.attributes.weapon.kick.dice' : kickdie });
+
+ message += 'expired.</p>';
+ }
+
+ ChatMessage.create({
+ user: game.user._id,
+ speaker: ChatMessage.getSpeaker({token: actor}),
+ content: message
+ });
+
+ }
+ }
+ }, myDialogOptions).render(true);
+
+----------------------------------------------------------------------------------------------------
+
+Talent
+Flurry (7 Deadly Secrets)
+Monk
+Melee
+Once per round, when the escalation die is 3+.
+One enemy
+
+[[d20+@dex.mod+@std+@atk.m.bonus]] vs. AC
+
+[[@wpn.j.dice*(1-@rsc.weapontracker)+(@rsc.weapontracker)*@wpn.m.dice+@str.dmg+@atk.m.bonus]] damage.
+
+If you use Flurry in a battle, you can’t use any other Deadly Secrets talents that battle. 
+
+Ki Power: (A Thousand Palms): You must be engaged with 2 or more enemies to use this power. After making a Flurry attack, you can spend 1 point of ki to make another Flurry attack against a target you have not already attacked with Flurry this turn.
+
+----------------------------------------------------------------------------------------------------
+
+Opening
+Badger (Rabid Badger)
+Monk
+1
+Melee
+One enemy
+
+[[d20+@dex.mod+@std+@atk.m.bonus - 2]] vs. AC
+
+[[@wpn.j.dice*(1-@rsc.weapontracker)+(@rsc.weapontracker)*@wpn.m.dice+@str.dmg+(@lvl)d6+@atk.m.bonus]] damage.
+
+[[(@tier)d6]] damage.
+
+Reduce the attack penalty of all attacks in this form to -2.
+
+-------------------------
+
+Flow
+Badger Badger (Rabid Badger)
+Monk
+2
+Melee
+Two enemies
+
+[[d20+@dex.mod+@std+@atk.m.bonus - 2]] vs. AC
+
+[[@wpn.p.dice*(1-@rsc.weapontracker)+(@rsc.weapontracker)*@wpn.m.dice+@str.dmg+@atk.m.bonus]] damage.
+
+[[(@tier)d6]] damage.
+
+Reduce the attack penalty of all attacks in this form to -2.
+
+-------------------------
+
+Finishing
+Badger Badger Badger (Rabid Badger)
+Monk
+3
+Melee
+3x One enemy
+Make two follow-up attacks against the same target.
+
+[[d20+@dex.mod+@std+@atk.m.bonus - 2]] vs. AC
+
+[[@wpn.k.dice*(1-@rsc.weapontracker)+(@rsc.weapontracker)*@wpn.m.dice+@str.dmg+@atk.m.bonus]] damage.
+
+[[(@tier)d6]] damage.
+
+If follow-up #1 hits: [[@wpn.j.dice*(1-@rsc.weapontracker)+(@rsc.weapontracker)*@wpn.m.dice+@atk.m.bonus]] damage.
+
+If follow-up #2 hits: [[@wpn.j.dice*(1-@rsc.weapontracker)+(@rsc.weapontracker)*@wpn.m.dice+@atk.m.bonus]] damage.
+
+Reduce the attack penalty of all attacks in this form to -2.
+
+----------------------------------------------------------------------------------------------------
+
+Opening
+Embrace the Shadow (Shadow Fist)
+Monk
+1
+Melee
+One enemy
+
+[[d20+@dex.mod+@std+@atk.m.bonus]] vs. MD
+
+[[@wpn.j.dice*(1-@rsc.weapontracker)+(@rsc.weapontracker)*@wpn.m.dice+@str.dmg+@atk.m.bonus]] damage.
+
+[[@lvl]] damage. You can spend a ki point to gain the cycle bonus.
+
+Cycle bonus: Gain a bonus to disengage checks equal to your Wisdom modifier ([[@wis.mod]]).
+
+-------------------------
+
+Flow
+Shadow Curtain (Shadow Fist)
+Monk
+2
+Melee
+One enemy
+
+[[d20+@dex.mod+@std+@atk.m.bonus]] vs. MD
+
+[[@wpn.p.dice*(1-@rsc.weapontracker)+(@rsc.weapontracker)*@wpn.m.dice+@str.dmg+@atk.m.bonus]] damage, and if the next attack against you is a natural odd roll, change the target to this enemy.
+
+[[@lvl]] damage.
+
+-------------------------
+
+Finishing
+Shadow Dance (Shadow Fist)
+Monk
+3
+Melee
+One enemy
+
+[[d20+@dex.mod+@std+@atk.m.bonus]] vs. MD
+
+[[@wpn.k.dice*(1-@rsc.weapontracker)+(@rsc.weapontracker)*@wpn.m.dice+@str.dmg+@atk.m.bonus]] damage, and you teleport to a nearby location you can see.
+
+You can spend a ki point to reroll the attack, and add your Wisdom modifier ([[@wis.mod]]) as a bonus to the attack.
+
+----------------------------------------------------------------------------------------------------
+
+
+