Skip to content

Instantly share code, notes, and snippets.

@BaldarSilveraxe
Last active December 31, 2015 03:29
Show Gist options
  • Save BaldarSilveraxe/7927989 to your computer and use it in GitHub Desktop.
Save BaldarSilveraxe/7927989 to your computer and use it in GitHub Desktop.
Roll20API cssForRecordSheet
cssForRecordSheet = function(sheetId) {
for (var index in roll20API.currentAttribs) {
var key = roll20API.currentAttribs[index].name
var cur = roll20API.currentAttribs[index].cur
var max = roll20API.currentAttribs[index].max
var id = roll20API.currentAttribs[index].id
switch(key){
case "Player_Name": var Player_Name = cur; break;
case "Character_Name": var Character_Name = cur; break;
case "Race": var Race = cur; break;
case "Class_Group": var Class_Group = cur; Class_Group_id = id; break;
case "Sub_Class": var Sub_Class = cur; break;
case "Alignment": var Alignment = cur; break;
case "Level": var Level = cur; break;
case "Hit_Points": var Hit_Points = max; break;
case "Armor_Class": var Armor_Class = cur; break;
case "AC_Surprised": var AC_Surprised = cur; break;
case "AC_wo_Shield": var AC_wo_Shield = cur; break;
case "THAC0": var THAC0 = cur; THAC0_id = id; break;
case "Strength": var Strength = cur; break;
case "str_Exceptional": var str_Exceptional = cur; str_Exceptional_id = id; break;
case "str_Hit_Adjust": var str_Hit_Adjust = cur; str_Hit_Adjust_id = id; break;
case "str_Dam_Adjust": var str_Dam_Adjust = cur; str_Dam_Adjust_id = id; break;
case "str_weigth": var str_weigth = cur; str_weigth_id = id; break;
case "str_press": var str_press = cur; str_press_id = id; break;
case "str_Open_Norm": var str_Open_Norm = cur; str_Open_Norm_id = id; break;
case "str_Open_Barred": var str_Open_Barred = cur; str_Open_Barred_id = id; break;
case "str_Bend_Lift": var str_Bend_Lift = cur; str_Bend_Lift_id = id; break;
case "Dexterity": var Dexterity = cur; break;
case "dex_Reaction": var dex_Reaction = cur; dex_Reaction_id = id; break;
case "dex_Missile": var dex_Missile = cur; dex_Missile_id = id; break;
case "dex_Defensive": var dex_Defensive = cur; dex_Defensive_id = id; break;
case "Constitution": var Constitution = cur; break;
case "con_HP": var con_HP = cur; con_HP_id = id; break;
case "con_Shock": var con_Shock = cur; con_Shock_id = id; break;
case "con_Resurrection": var con_Resurrection = cur; con_Resurrection_id = id; break;
case "con_Poison": var con_Poison = cur; con_Poison_id = id; break;
case "con_Regenerate": var con_Regenerate = cur; con_Regenerate_id = id; break;
case "Intelligence": var Intelligence = cur; break;
case "int_Lang": var int_Lang = cur; int_Lang_id = id; break;
case "int_Level": var int_Level = cur; int_Level_id = id; break;
case "int_Chance": var int_Chance = cur; int_Chance_id = id; break;
case "int_Max": var int_Max = cur; int_Max_id = id; break;
case "int_Immunity": var int_Immunity = cur; int_Immunity_id = id; break;
case "Wisdom": var Wisdom = cur; break;
case "wis_Defense": var wis_Defense = cur; wis_Defense_id = id; break;
case "wis_Bonus": var wis_Bonus = cur; wis_Bonus_id = id; break;
case "wis_Failure": var wis_Failure = cur; wis_Failure_id = id; break;
case "wis_Immunity": var wis_Immunity = cur; wis_Immunity_id = id; break;
case "Charisma": var Charisma = cur; break;
case "chr_Maximum": var chr_Maximum = cur; chr_Maximum_id = id; break;
case "chr_Loyalty": var chr_Loyalty = cur; chr_Loyalty_id = id; break;
case "chr_Reaction": var chr_Reaction = cur; chr_Reaction_id = id; break;
case "Sav_vs_PPD": var Sav_vs_PPD = cur; Sav_vs_PPD_id = id; break;
case "Sav_vs_RSW": var Sav_vs_RSW = cur; Sav_vs_RSW_id = id; break;
case "Sav_vs_PP": var Sav_vs_PP = cur; Sav_vs_PP_id = id; break;
case "Sav_vs_BW": var Sav_vs_BW = cur; Sav_vs_BW_id = id; break;
case "Sav_vs_Spells": var Sav_vs_SP = cur; Sav_vs_SP_id = id; break;
case "Movement": var Movement = cur; break;
case "Pick_Pockets": var Pick_Pockets = cur; break;
case "Open_Locks": var Open_Locks = cur; break;
case "Find_Remove": var Find_Remove = cur; break;
case "Move_Silently": var Move_Silently = cur; break;
case "Hide_Shadows": var Hide_Shadows = cur; break;
case "Detect_Noise": var Detect_Noise = cur; break;
case "Climb_Wall": var Climb_Wall = cur; break;
case "Read_Language": var sp_Note = cur; break;
};
};
roll20API.strengthTable = [
{value: 1, excepl: 0, exceph: 0, hit: -5, dam: -4, weight: 1, press: 3, open: 1, barred: 0, bend: 0, },
{value: 2, excepl: 0, exceph: 0, hit: -3, dam: -2, weight: 1, press: 5, open: 1, barred: 0, bend: 0, },
{value: 3, excepl: 0, exceph: 0, hit: -3, dam: -1, weight: 5, press: 10, open: 2, barred: 0, bend: 0, },
{value: 4, excepl: 0, exceph: 0, hit: -2, dam: -1, weight: 10, press: 25, open: 3, barred: 0, bend: 0, },
{value: 5, excepl: 0, exceph: 0, hit: -2, dam: -1, weight: 10, press: 25, open: 3, barred: 0, bend: 0, },
{value: 6, excepl: 0, exceph: 0, hit: -1, dam: 0, weight: 20, press: 55, open: 4, barred: 0, bend: 0, },
{value: 7, excepl: 0, exceph: 0, hit: -1, dam: 0, weight: 20, press: 55, open: 4, barred: 0, bend: 0, },
{value: 8, excepl: 0, exceph: 0, hit: 0, dam: 0, weight: 35, press: 90, open: 5, barred: 0, bend: 1, },
{value: 9, excepl: 0, exceph: 0, hit: 0, dam: 0, weight: 35, press: 90, open: 5, barred: 0, bend: 1, },
{value: 10, excepl: 0, exceph: 0, hit: 0, dam: 0, weight: 40, press: 115, open: 6, barred: 0, bend: 2, },
{value: 11, excepl: 0, exceph: 0, hit: 0, dam: 0, weight: 40, press: 115, open: 6, barred: 0, bend: 2, },
{value: 12, excepl: 0, exceph: 0, hit: 0, dam: 0, weight: 45, press: 140, open: 7, barred: 0, bend: 4, },
{value: 13, excepl: 0, exceph: 0, hit: 0, dam: 0, weight: 45, press: 140, open: 7, barred: 0, bend: 4, },
{value: 14, excepl: 0, exceph: 0, hit: 0, dam: 0, weight: 55, press: 170, open: 8, barred: 0, bend: 7, },
{value: 15, excepl: 0, exceph: 0, hit: 0, dam: 0, weight: 55, press: 170, open: 8, barred: 0, bend: 7, },
{value: 16, excepl: 0, exceph: 0, hit: 0, dam: 1, weight: 70, press: 195, open: 9, barred: 0, bend: 10,},
{value: 17, excepl: 0, exceph: 0, hit: +1, dam: 1, weight: 85, press: 220, open: 10, barred: 0, bend: 13,},
{value: 18, excepl: 0, exceph: 0, hit: +1, dam: 2, weight: 110, press: 255, open: 11, barred: 0, bend: 16,},
{value: 18, excepl: 1, exceph: 50, hit: +1, dam: 3, weight: 135, press: 280, open: 12, barred: 0, bend: 20,},
{value: 18, excepl: 51, exceph: 75, hit: +2, dam: 3, weight: 160, press: 305, open: 13, barred: 0, bend: 25,},
{value: 18, excepl: 76, exceph: 90, hit: +2, dam: 4, weight: 185, press: 330, open: 14, barred: 0, bend: 30,},
{value: 18, excepl: 91, exceph: 99, hit: +2, dam: 5, weight: 235, press: 380, open: 15, barred: 3, bend: 35,},
{value: 18, excepl: 100, exceph: 100, hit: +3, dam: 6, weight: 335, press: 480, open: 16, barred: 6, bend: 40,},
{value: 19, excepl: 0, exceph: 0, hit: +3, dam: 7, weight: 485, press: 640, open: 16, barred: 8, bend: 50,},
{value: 20, excepl: 0, exceph: 0, hit: +3, dam: 8, weight: 535, press: 700, open: 17, barred: 10, bend: 60,},
{value: 21, excepl: 0, exceph: 0, hit: +4, dam: 9, weight: 635, press: 810, open: 17, barred: 12, bend: 70,},
{value: 22, excepl: 0, exceph: 0, hit: +4, dam: 10, weight: 785, press: 970, open: 18, barred: 14, bend: 80,},
{value: 23, excepl: 0, exceph: 0, hit: +5, dam: 11, weight: 935, press: 1130, open: 18, barred: 16, bend: 90,},
{value: 24, excepl: 0, exceph: 0, hit: +6, dam: 12, weight: 1235, press: 1440, open: 19, barred: 17, bend: 95,},
{value: 25, excepl: 0, exceph: 0, hit: +7, dam: 14, weight: 1535, press: 1750, open: 19, barred: 18, bend: 99,}
];
var STRexceph = parseInt(str_Exceptional);
var EXClow = 0;
var EXChigh = 0;
if(parseInt(STRexceph) >= 1 && parseInt(STRexceph) <= 50){EXClow = 1; EXChigh = 51;};
if(parseInt(STRexceph) >= 51 && parseInt(STRexceph) <= 75){EXClow = 51; EXChigh = 75;};
if(parseInt(STRexceph) >= 76 && parseInt(STRexceph) <= 90){EXClow = 76; EXChigh = 90;};
if(parseInt(STRexceph) >= 91 && parseInt(STRexceph) <= 99){EXClow = 91; EXChigh = 99;};
if(parseInt(STRexceph) == 100){EXClow = 100; EXChigh = 100;};
if(EXClow == 0){STRexceph = 0;};
var STRvalue = _.where(roll20API.strengthTable, {value: parseInt(Strength), excepl: parseInt(EXClow), exceph: parseInt(EXChigh) });
if(STRvalue.length == 0){STRvalue[0] = roll20API.strengthTable[0]};
Strength = STRvalue[0].value;
str_Exceptional = STRexceph;
str_Hit_Adjust = STRvalue[0].hit;
str_Dam_Adjust = STRvalue[0].dam;
str_weigth = STRvalue[0].weight;
str_press = STRvalue[0].press;
str_Open_Norm = STRvalue[0].open;
str_Open_Barred = STRvalue[0].barred;
str_Bend_Lift = STRvalue[0].bend;
findObjs({ _type: "attribute", _id: str_Exceptional_id})[0].set({current: str_Exceptional});
findObjs({ _type: "attribute", _id: str_Hit_Adjust_id})[0].set({current: str_Hit_Adjust});
findObjs({ _type: "attribute", _id: str_Dam_Adjust_id})[0].set({current: str_Dam_Adjust});
findObjs({ _type: "attribute", _id: str_weigth_id})[0].set({current: str_weigth});
findObjs({ _type: "attribute", _id: str_press_id})[0].set({current: str_press});
findObjs({ _type: "attribute", _id: str_Open_Norm_id})[0].set({current: str_Open_Norm});
findObjs({ _type: "attribute", _id: str_Open_Barred_id})[0].set({current: str_Open_Barred});
findObjs({ _type: "attribute", _id: str_Bend_Lift_id})[0].set({current: str_Bend_Lift});
roll20API.dexterityTable = [
{value: 1, reaction: -6, missile: -6, defensive: +5 },
{value: 2, reaction: -4, missile: -4, defensive: +5 },
{value: 3, reaction: -3, missile: -3, defensive: +4 },
{value: 4, reaction: -2, missile: -2, defensive: +3 },
{value: 5, reaction: -1, missile: -1, defensive: +2 },
{value: 6, reaction: 0, missile: 0, defensive: +1 },
{value: 7, reaction: 0, missile: 0, defensive: 0 },
{value: 8, reaction: 0, missile: 0, defensive: 0 },
{value: 9, reaction: 0, missile: 0, defensive: 0 },
{value: 10, reaction: 0, missile: 0, defensive: 0 },
{value: 11, reaction: 0, missile: 0, defensive: 0 },
{value: 12, reaction: 0, missile: 0, defensive: 0 },
{value: 13, reaction: 0, missile: 0, defensive: 0 },
{value: 14, reaction: 0, missile: 0, defensive: 0 },
{value: 15, reaction: 0, missile: 0, defensive: -1 },
{value: 16, reaction: +1, missile: +1, defensive: -2 },
{value: 17, reaction: +2, missile: +2, defensive: -3 },
{value: 18, reaction: +2, missile: +2, defensive: -4 },
{value: 19, reaction: +3, missile: +3, defensive: -4 },
{value: 20, reaction: +3, missile: +3, defensive: -4 },
{value: 21, reaction: +4, missile: +4, defensive: -5 },
{value: 22, reaction: +4, missile: +4, defensive: -5 },
{value: 23, reaction: +4, missile: +4, defensive: -5 },
{value: 24, reaction: +5, missile: +5, defensive: -6 },
{value: 25, reaction: +5, missile: +5, defensive: -6 }
];
var DEXvalue = _.where(roll20API.dexterityTable, {value: parseInt(Dexterity) });
if(DEXvalue.length == 0){DEXvalue[0] = roll20API.dexterityTable[0]};
dex_Reaction = DEXvalue[0].reaction;
dex_Missile = DEXvalue[0].missile;
dex_Defensive = DEXvalue[0].defensive;
findObjs({ _type: "attribute", _id: dex_Reaction_id})[0].set({current: dex_Reaction});
findObjs({ _type: "attribute", _id: dex_Missile_id})[0].set({current: dex_Missile});
findObjs({ _type: "attribute", _id: dex_Defensive_id})[0].set({current: dex_Defensive});
roll20API.constitutionTable = [
{value: 1, adjst: "-3", shock: 25, survi: 30, saves: -2, regen: "Nil" },
{value: 2, adjst: "-2", shock: 30, survi: 35, saves: -1, regen: "Nil" },
{value: 3, adjst: "-2", shock: 35, survi: 40, saves: 0, regen: "Nil" },
{value: 4, adjst: "-1", shock: 40, survi: 45, saves: 0, regen: "Nil" },
{value: 5, adjst: "-1", shock: 45, survi: 50, saves: 0, regen: "Nil" },
{value: 6, adjst: "-1", shock: 50, survi: 55, saves: 0, regen: "Nil" },
{value: 7, adjst: "0", shock: 55, survi: 60, saves: 0, regen: "Nil" },
{value: 8, adjst: "0", shock: 60, survi: 65, saves: 0, regen: "Nil" },
{value: 9, adjst: "0", shock: 65, survi: 70, saves: 0, regen: "Nil" },
{value: 10, adjst: "0", shock: 70, survi: 75, saves: 0, regen: "Nil" },
{value: 11, adjst: "0", shock: 75, survi: 80, saves: 0, regen: "Nil" },
{value: 12, adjst: "0", shock: 80, survi: 85, saves: 0, regen: "Nil" },
{value: 13, adjst: "0", shock: 85, survi: 90, saves: 0, regen: "Nil" },
{value: 14, adjst: "0", shock: 88, survi: 92, saves: 0, regen: "Nil" },
{value: 15, adjst: "+1", shock: 90, survi: 94, saves: 0, regen: "Nil" },
{value: 16, adjst: "+2", shock: 95, survi: 96, saves: 0, regen: "Nil" },
{value: 17, adjst: "+2 (+3)", shock: 97, survi: 98, saves: 0, regen: "Nil" },
{value: 18, adjst: "+2 (+4)", shock: 99, survi: 100, saves: 0, regen: "Nil" },
{value: 19, adjst: "+2 (+5)", shock: 99, survi: 100, saves: +1, regen: "Nil" },
{value: 20, adjst: "+2 (+5)", shock: 99, survi: 100, saves: +1, regen: "1/6 turns" },
{value: 21, adjst: "+2 (+6)", shock: 99, survi: 100, saves: +2, regen: "1/5 turns" },
{value: 22, adjst: "+2 (+6)", shock: 99, survi: 100, saves: +2, regen: "1/4 turns" },
{value: 23, adjst: "+2 (+6)", shock: 99, survi: 100, saves: +3, regen: "1/3 turns" },
{value: 24, adjst: "+2 (+7)", shock: 99, survi: 100, saves: +3, regen: "1/2 turns" },
{value: 25, adjst: "+2 (+7)", shock: 100, survi: 100, saves: +4, regen: "1/1 turn" }
];
var CONvalue = _.where(roll20API.constitutionTable, {value: parseInt(Constitution) });
if(CONvalue.length == 0){CONvalue[0] = roll20API.constitutionTable[0]};
con_HP = CONvalue[0].adjst;
con_Shock = CONvalue[0].shock;
con_Resurrection = CONvalue[0].survi;
con_Poison = CONvalue[0].saves
con_Regenerate = CONvalue[0].regen
findObjs({ _type: "attribute", _id: con_HP_id})[0].set({current: con_HP});
findObjs({ _type: "attribute", _id: con_Shock_id})[0].set({current: con_Shock});
findObjs({ _type: "attribute", _id: con_Resurrection_id})[0].set({current: con_Resurrection});
findObjs({ _type: "attribute", _id: con_Poison_id})[0].set({current: con_Poison});
findObjs({ _type: "attribute", _id: con_Regenerate_id})[0].set({current: con_Regenerate});
roll20API.intelligenceTable = [
{value: 1, langu: "0*", level: "--", learn: 0, Maxim: "--", Immun: "--"},
{value: 2, langu: "1", level: "--", learn: 0, Maxim: "--", Immun: "--"},
{value: 3, langu: "1", level: "--", learn: 0, Maxim: "--", Immun: "--"},
{value: 4, langu: "1", level: "--", learn: 0, Maxim: "--", Immun: "--"},
{value: 5, langu: "1", level: "--", learn: 0, Maxim: "--", Immun: "--"},
{value: 6, langu: "1", level: "--", learn: 0, Maxim: "--", Immun: "--"},
{value: 7, langu: "1", level: "--", learn: 0, Maxim: "--", Immun: "--"},
{value: 8, langu: "1", level: "--", learn: 0, Maxim: "--", Immun: "--"},
{value: 9, langu: "2", level: "4th", learn: 35, Maxim: "6", Immun: "--"},
{value: 10, langu: "2", level: "5th", learn: 40, Maxim: "7", Immun: "--"},
{value: 11, langu: "2", level: "5th", learn: 45, Maxim: "7", Immun: "--"},
{value: 12, langu: "3", level: "6th", learn: 50, Maxim: "7", Immun: "--"},
{value: 13, langu: "3", level: "6th", learn: 55, Maxim: "9", Immun: "--"},
{value: 14, langu: "4", level: "7th", learn: 60, Maxim: "9", Immun: "--"},
{value: 15, langu: "4", level: "7th", learn: 65, Maxim: "11", Immun: "--"},
{value: 16, langu: "5", level: "8th", learn: 70, Maxim: "11", Immun: "--"},
{value: 17, langu: "6", level: "8th", learn: 75, Maxim: "14", Immun: "--"},
{value: 18, langu: "7", level: "9th", learn: 85, Maxim: "18", Immun: "--"},
{value: 19, langu: "8", level: "9th", learn: 95, Maxim: "All", Immun: "1st-level"},
{value: 20, langu: "9", level: "9th", learn: 96, Maxim: "All", Immun: "2nd-level"},
{value: 21, langu: "10", level: "9th", learn: 97, Maxim: "All", Immun: "3rd-level"},
{value: 22, langu: "11", level: "9th", learn: 98, Maxim: "All", Immun: "4th-level"},
{value: 23, langu: "12", level: "9th", learn: 99, Maxim: "All", Immun: "5th-level"},
{value: 24, langu: "15", level: "9th", learn: 100, Maxim: "All", Immun: "6th-level"},
{value: 25, langu: "20", level: "9th", learn: 100, Maxim: "All", Immun: "7th-level"}
];
var INTvalue = _.where(roll20API.intelligenceTable, {value: parseInt(Intelligence) });
if(INTvalue.length == 0){INTvalue[0] = roll20API.intelligenceTable[0]};
int_Lang = INTvalue[0].langu
int_Level = INTvalue[0].level
int_Chance = INTvalue[0].learn
int_Max = INTvalue[0].Maxim
int_Immunity = INTvalue[0].Immun
findObjs({ _type: "attribute", _id: int_Lang_id})[0].set({current: int_Lang});
findObjs({ _type: "attribute", _id: int_Level_id})[0].set({current: int_Level});
findObjs({ _type: "attribute", _id: int_Chance_id})[0].set({current: int_Chance});
findObjs({ _type: "attribute", _id: int_Max_id})[0].set({current: int_Max});
findObjs({ _type: "attribute", _id: int_Immunity_id})[0].set({current: int_Immunity});
roll20API.wisdomTable = [
{value: 1, adjst: -6, spell: "--", failu: 80, immun: "--"},
{value: 2, adjst: -4, spell: "--", failu: 60, immun: "--"},
{value: 3, adjst: -3, spell: "--", failu: 50, immun: "--"},
{value: 4, adjst: -2, spell: "--", failu: 45, immun: "--"},
{value: 5, adjst: -1, spell: "--", failu: 40, immun: "--"},
{value: 6, adjst: -1, spell: "--", failu: 35, immun: "--"},
{value: 7, adjst: -1, spell: "--", failu: 30, immun: "--"},
{value: 8, adjst: 0, spell: "--", failu: 25, immun: "--"},
{value: 9, adjst: 0, spell: "0", failu: 20, immun: "--"},
{value: 10, adjst: 0, spell: "0", failu: 15, immun: "--"},
{value: 11, adjst: 0, spell: "0", failu: 10, immun: "--"},
{value: 12, adjst: 0, spell: "0", failu: 5, immun: "--"},
{value: 13, adjst: 0, spell: "1st", failu: 0, immun: "--"},
{value: 14, adjst: 0, spell: "2@1st", failu: 0, immun: "--"},
{value: 15, adjst: +1, spell: "2@1st, 2nd", failu: 0, immun: "--"},
{value: 16, adjst: +2, spell: "2@1st, 2@2nd", failu: 0, immun: "--"},
{value: 17, adjst: +3, spell: "2@1st, 2@2nd, 3rd", failu: 0, immun: "--"},
{value: 18, adjst: +4, spell: "2@1st, 2@2nd, 3rd, 4th", failu: 0, immun: "--"},
{value: 19, adjst: +4, spell: "3@1st, 2@2nd, 2@3rd, 4th", failu: 0, immun: "<a href=\"http://www.purpleworm.org/rules/PHB/DD01434.htm\">Link</a>"},
{value: 20, adjst: +4, spell: "3@1st, 3@2nd, 2@3rd, 2@4th", failu: 0, immun: "<a href=\"http://www.purpleworm.org/rules/PHB/DD01434.htm\">Link</a>"},
{value: 21, adjst: +4, spell: "3@1st, 3@2nd, 3@3rd, 2@4th, 5th", failu: 0, immun: "<a href=\"http://www.purpleworm.org/rules/PHB/DD01434.htm\">Link</a>"},
{value: 22, adjst: +4, spell: "3@1st, 3@2nd, 3@3rd, 3@4th, 2@5th", failu: 0, immun: "<a href=\"http://www.purpleworm.org/rules/PHB/DD01434.htm\">Link</a>"},
{value: 23, adjst: +4, spell: "4@1st, 3@2nd, 3@3rd, 3@4th, 2@5th, 6th", failu: 0, immun: "<a href=\"http://www.purpleworm.org/rules/PHB/DD01434.htm\">Link</a>"},
{value: 24, adjst: +4, spell: "4@1st, 3@2nd, 3@3rd, 3@4th, 3@5th, 2@6th", failu: 0, immun: "<a href=\"http://www.purpleworm.org/rules/PHB/DD01434.htm\">Link</a>"},
{value: 25, adjst: +4, spell: "4@1st, 3@2nd, 3@3rd, 3@4th, 3@5th, 3@6th, 7th", failu: 0, immun: "<a href=\"http://www.purpleworm.org/rules/PHB/DD01434.htm\">Link</a>"}
];
var WISvalue = _.where(roll20API.wisdomTable, {value: parseInt(Wisdom) });
if(WISvalue.length == 0){WISvalue[0] = roll20API.wisdomTable[0]};
wis_Defense = WISvalue[0].adjst
wis_Bonus = WISvalue[0].spell
wis_Failure = WISvalue[0].failu
wis_Immunity = WISvalue[0].immun
findObjs({ _type: "attribute", _id: wis_Defense_id})[0].set({current: wis_Defense});
findObjs({ _type: "attribute", _id: wis_Bonus_id})[0].set({current: wis_Bonus});
findObjs({ _type: "attribute", _id: wis_Failure_id})[0].set({current: wis_Failure});
findObjs({ _type: "attribute", _id: wis_Immunity_id})[0].set({current: wis_Immunity});
roll20API.charismaTable = [
{value: 1, Hench: 0, Basem: -8, Adjst: -7},
{value: 2, Hench: 1, Basem: -7, Adjst: -6},
{value: 3, Hench: 1, Basem: -6, Adjst: -5},
{value: 4, Hench: 1, Basem: -5, Adjst: -4},
{value: 5, Hench: 2, Basem: -4, Adjst: -3},
{value: 6, Hench: 2, Basem: -3, Adjst: -2},
{value: 7, Hench: 3, Basem: -2, Adjst: -1},
{value: 8, Hench: 3, Basem: -1, Adjst: 0},
{value: 9, Hench: 4, Basem: 0, Adjst: 0},
{value: 10, Hench: 4, Basem: 0, Adjst: 0},
{value: 11, Hench: 4, Basem: 0, Adjst: 0},
{value: 12, Hench: 5, Basem: 0, Adjst: 0},
{value: 13, Hench: 5, Basem: 0, Adjst: +1},
{value: 14, Hench: 6, Basem: +1, Adjst: +2},
{value: 15, Hench: 7, Basem: +3, Adjst: +3},
{value: 16, Hench: 8, Basem: +4, Adjst: +5},
{value: 17, Hench: 10, Basem: +6, Adjst: +6},
{value: 18, Hench: 15, Basem: +8, Adjst: +7},
{value: 19, Hench: 20, Basem: +10, Adjst: +8},
{value: 20, Hench: 25, Basem: +12, Adjst: +9},
{value: 21, Hench: 30, Basem: +14, Adjst: +10},
{value: 22, Hench: 35, Basem: +16, Adjst: +11},
{value: 23, Hench: 40, Basem: +18, Adjst: +12},
{value: 24, Hench: 45, Basem: +20, Adjst: +13},
{value: 25, Hench: 50, Basem: +20, Adjst: +14}
];
var CHRvalue = _.where(roll20API.charismaTable, {value: parseInt(Charisma) });
if(CHRvalue.length == 0){CHRvalue[0] = roll20API.charismaTable[0]};
chr_Maximum = CHRvalue[0].Hench
chr_Loyalty = CHRvalue[0].Basem
chr_Reaction = CHRvalue[0].Adjst
findObjs({ _type: "attribute", _id: chr_Maximum_id})[0].set({current: chr_Maximum});
findObjs({ _type: "attribute", _id: chr_Loyalty_id})[0].set({current: chr_Loyalty});
findObjs({ _type: "attribute", _id: chr_Reaction_id})[0].set({current: chr_Reaction});
roll20API.thacoTable = [
{level: 1, Priest: 20, Rogue: 20, Warrior: 20, Wizard: 20},
{level: 2, Priest: 20, Rogue: 20, Warrior: 19, Wizard: 20},
{level: 3, Priest: 20, Rogue: 19, Warrior: 18, Wizard: 20},
{level: 4, Priest: 18, Rogue: 19, Warrior: 17, Wizard: 19},
{level: 5, Priest: 18, Rogue: 18, Warrior: 16, Wizard: 19},
{level: 6, Priest: 18, Rogue: 18, Warrior: 15, Wizard: 19},
{level: 7, Priest: 16, Rogue: 17, Warrior: 14, Wizard: 18},
{level: 8, Priest: 16, Rogue: 17, Warrior: 13, Wizard: 18},
{level: 9, Priest: 16, Rogue: 16, Warrior: 12, Wizard: 18},
{level: 10, Priest: 14, Rogue: 16, Warrior: 11, Wizard: 17},
{level: 11, Priest: 14, Rogue: 15, Warrior: 10, Wizard: 17},
{level: 12, Priest: 14, Rogue: 15, Warrior: 9, Wizard: 17},
{level: 13, Priest: 12, Rogue: 14, Warrior: 8, Wizard: 16},
{level: 14, Priest: 12, Rogue: 14, Warrior: 7, Wizard: 16},
{level: 15, Priest: 12, Rogue: 13, Warrior: 6, Wizard: 16},
{level: 16, Priest: 10, Rogue: 13, Warrior: 5, Wizard: 15},
{level: 17, Priest: 10, Rogue: 12, Warrior: 4, Wizard: 15},
{level: 18, Priest: 10, Rogue: 12, Warrior: 3, Wizard: 15},
{level: 19, Priest: 8, Rogue: 11, Warrior: 2, Wizard: 14},
{level: 20, Priest: 8, Rogue: 11, Warrior: 1, Wizard: 14}
];
givenLevel = parseInt(Level);
if(isNaN(givenLevel)){givenLevel = 1};
if(givenLevel <= 0){givenLevel = 1};
if(givenLevel >= 21){givenLevel = 20};
var THCOrow = _.where(roll20API.thacoTable, {level: parseInt(givenLevel) });
var classGroupGiven = Class_Group
classGroupGiven = classGroupGiven.trimLeft()
classGroupGiven = classGroupGiven.trimRight()
classGroupGiven = classGroupGiven.toLowerCase();
var THCOvalue = 1;
classGroupFound = false;
if(classGroupGiven == "priest"){classGroupFound = true; THAC0 = THCOrow[0].Priest;};
if(classGroupGiven == "rogue"){classGroupFound = true; THAC0 = THCOrow[0].Rogue;};
if(classGroupGiven == "warrior"){classGroupFound = true; THAC0 = THCOrow[0].Warrior;};
if(classGroupGiven == "wizard"){classGroupFound = true; THAC0 = THCOrow[0].Wizard;};
if(classGroupFound == false){Class_Group = "Wizard"; THAC0 = THCOrow[0].Wizard;};
findObjs({ _type: "attribute", _id: THAC0_id})[0].set({current: THAC0});
if(classGroupFound == false){
findObjs({ _type: "attribute", _id: Class_Group_id})[0].set({current: Class_Group});
};
roll20API.savingTable = [
{level: 1, classg: "priest", ppd: 10, rsw: 14, poly: 13, breath: 16, spell: 15},
{level: 2, classg: "priest", ppd: 10, rsw: 14, poly: 13, breath: 16, spell: 15},
{level: 3, classg: "priest", ppd: 10, rsw: 14, poly: 13, breath: 16, spell: 15},
{level: 4, classg: "priest", ppd: 9, rsw: 13, poly: 12, breath: 15, spell: 14},
{level: 5, classg: "priest", ppd: 9, rsw: 13, poly: 12, breath: 15, spell: 14},
{level: 6, classg: "priest", ppd: 9, rsw: 13, poly: 12, breath: 15, spell: 14},
{level: 7, classg: "priest", ppd: 7, rsw: 11, poly: 10, breath: 13, spell: 12},
{level: 8, classg: "priest", ppd: 7, rsw: 11, poly: 10, breath: 13, spell: 12},
{level: 9, classg: "priest", ppd: 7, rsw: 11, poly: 10, breath: 13, spell: 12},
{level: 10, classg: "priest", ppd: 6, rsw: 10, poly: 9, breath: 12, spell: 11},
{level: 11, classg: "priest", ppd: 6, rsw: 10, poly: 9, breath: 12, spell: 11},
{level: 12, classg: "priest", ppd: 6, rsw: 10, poly: 9, breath: 12, spell: 11},
{level: 13, classg: "priest", ppd: 5, rsw: 9, poly: 8, breath: 11, spell: 10},
{level: 14, classg: "priest", ppd: 5, rsw: 9, poly: 8, breath: 11, spell: 10},
{level: 15, classg: "priest", ppd: 5, rsw: 9, poly: 8, breath: 11, spell: 10},
{level: 16, classg: "priest", ppd: 4, rsw: 8, poly: 7, breath: 10, spell: 9 },
{level: 17, classg: "priest", ppd: 4, rsw: 8, poly: 7, breath: 10, spell: 9 },
{level: 18, classg: "priest", ppd: 4, rsw: 8, poly: 7, breath: 10, spell: 9 },
{level: 19, classg: "priest", ppd: 4, rsw: 8, poly: 7, breath: 10, spell: 9 },
{level: 20, classg: "priest", ppd: 2, rsw: 6, poly: 5, breath: 8, spell: 7 },
{level: 1, classg: "rogue", ppd: 13, rsw: 14, poly: 12, breath: 16, spell: 15},
{level: 2, classg: "rogue", ppd: 13, rsw: 14, poly: 12, breath: 16, spell: 15},
{level: 3, classg: "rogue", ppd: 13, rsw: 14, poly: 12, breath: 16, spell: 15},
{level: 4, classg: "rogue", ppd: 13, rsw: 14, poly: 12, breath: 16, spell: 15},
{level: 5, classg: "rogue", ppd: 12, rsw: 12, poly: 11, breath: 15, spell: 13},
{level: 6, classg: "rogue", ppd: 12, rsw: 12, poly: 11, breath: 15, spell: 13},
{level: 7, classg: "rogue", ppd: 12, rsw: 12, poly: 11, breath: 15, spell: 13},
{level: 8, classg: "rogue", ppd: 12, rsw: 12, poly: 11, breath: 15, spell: 13},
{level: 9, classg: "rogue", ppd: 11, rsw: 10, poly: 10, breath: 14, spell: 11},
{level: 10, classg: "rogue", ppd: 11, rsw: 10, poly: 10, breath: 14, spell: 11},
{level: 11, classg: "rogue", ppd: 11, rsw: 10, poly: 10, breath: 14, spell: 11},
{level: 12, classg: "rogue", ppd: 11, rsw: 10, poly: 10, breath: 14, spell: 11},
{level: 13, classg: "rogue", ppd: 10, rsw: 8, poly: 9, breath: 13, spell: 9 },
{level: 14, classg: "rogue", ppd: 10, rsw: 8, poly: 9, breath: 13, spell: 9 },
{level: 15, classg: "rogue", ppd: 10, rsw: 8, poly: 9, breath: 13, spell: 9 },
{level: 16, classg: "rogue", ppd: 10, rsw: 8, poly: 9, breath: 13, spell: 9 },
{level: 17, classg: "rogue", ppd: 9, rsw: 6, poly: 8, breath: 12, spell: 7 },
{level: 18, classg: "rogue", ppd: 9, rsw: 6, poly: 8, breath: 12, spell: 7 },
{level: 19, classg: "rogue", ppd: 9, rsw: 6, poly: 8, breath: 12, spell: 7 },
{level: 20, classg: "rogue", ppd: 9, rsw: 6, poly: 8, breath: 12, spell: 7 },
{level: 21, classg: "rogue", ppd: 8, rsw: 7, poly: 4, breath: 11, spell: 5 },
{level: 1, classg: "warrior", ppd: 14, rsw: 16, poly: 15, breath: 17, spell: 17},
{level: 2, classg: "warrior", ppd: 14, rsw: 16, poly: 15, breath: 17, spell: 17},
{level: 3, classg: "warrior", ppd: 13, rsw: 15, poly: 14, breath: 16, spell: 16},
{level: 4, classg: "warrior", ppd: 13, rsw: 15, poly: 14, breath: 16, spell: 16},
{level: 5, classg: "warrior", ppd: 11, rsw: 13, poly: 12, breath: 13, spell: 14},
{level: 6, classg: "warrior", ppd: 11, rsw: 13, poly: 12, breath: 13, spell: 14},
{level: 7, classg: "warrior", ppd: 10, rsw: 12, poly: 11, breath: 12, spell: 13},
{level: 8, classg: "warrior", ppd: 10, rsw: 12, poly: 11, breath: 12, spell: 13},
{level: 9, classg: "warrior", ppd: 8, rsw: 10, poly: 9, breath: 9, spell: 11},
{level: 10, classg: "warrior", ppd: 8, rsw: 10, poly: 9, breath: 9, spell: 11},
{level: 11, classg: "warrior", ppd: 7, rsw: 9, poly: 8, breath: 8, spell: 10},
{level: 12, classg: "warrior", ppd: 7, rsw: 9, poly: 8, breath: 8, spell: 10},
{level: 13, classg: "warrior", ppd: 5, rsw: 7, poly: 6, breath: 5, spell: 8 },
{level: 14, classg: "warrior", ppd: 5, rsw: 7, poly: 6, breath: 5, spell: 8 },
{level: 15, classg: "warrior", ppd: 4, rsw: 6, poly: 5, breath: 4, spell: 7 },
{level: 16, classg: "warrior", ppd: 4, rsw: 6, poly: 5, breath: 4, spell: 7 },
{level: 17, classg: "warrior", ppd: 3, rsw: 5, poly: 4, breath: 4, spell: 6 },
{level: 1, classg: "wizard", ppd: 14, rsw: 11, poly: 13, breath: 15, spell: 12},
{level: 2, classg: "wizard", ppd: 14, rsw: 11, poly: 13, breath: 15, spell: 12},
{level: 3, classg: "wizard", ppd: 14, rsw: 11, poly: 13, breath: 15, spell: 12},
{level: 4, classg: "wizard", ppd: 14, rsw: 11, poly: 13, breath: 15, spell: 12},
{level: 5, classg: "wizard", ppd: 14, rsw: 11, poly: 13, breath: 15, spell: 12},
{level: 6, classg: "wizard", ppd: 13, rsw: 9, poly: 11, breath: 13, spell: 10},
{level: 7, classg: "wizard", ppd: 13, rsw: 9, poly: 11, breath: 13, spell: 10},
{level: 8, classg: "wizard", ppd: 13, rsw: 9, poly: 11, breath: 13, spell: 10},
{level: 9, classg: "wizard", ppd: 13, rsw: 9, poly: 11, breath: 13, spell: 10},
{level: 10, classg: "wizard", ppd: 13, rsw: 9, poly: 11, breath: 13, spell: 10},
{level: 11, classg: "wizard", ppd: 11, rsw: 7, poly: 9, breath: 11, spell: 8 },
{level: 12, classg: "wizard", ppd: 11, rsw: 7, poly: 9, breath: 11, spell: 8 },
{level: 13, classg: "wizard", ppd: 11, rsw: 7, poly: 9, breath: 11, spell: 8 },
{level: 14, classg: "wizard", ppd: 11, rsw: 7, poly: 9, breath: 11, spell: 8 },
{level: 15, classg: "wizard", ppd: 11, rsw: 7, poly: 9, breath: 11, spell: 8 },
{level: 16, classg: "wizard", ppd: 10, rsw: 5, poly: 7, breath: 9, spell: 6 }
];
givenLevel = parseInt(Level);
if(isNaN(givenLevel)){givenLevel = 1};
if(givenLevel <= 0){givenLevel = 1};
if(givenLevel >= 22){givenLevel = 21};
var classGroupGiven = Class_Group
classGroupGiven = classGroupGiven.trimLeft()
classGroupGiven = classGroupGiven.trimRight()
classGroupGiven = classGroupGiven.toLowerCase();
classGroupFound = false;
if(classGroupGiven == "priest"){
if(givenLevel >20){givenLevel = 20;};
classGroupFound = true;
};
if(classGroupGiven == "rogue"){
if(givenLevel >21){givenLevel = 21;};
classGroupFound = true;
};
if(classGroupGiven == "warrior"){
if(givenLevel >17){givenLevel = 17;};
classGroupFound = true;
};
if(classGroupGiven == "wizard"){
if(givenLevel >16){givenLevel = 16;};
classGroupFound = true;
};
if(classGroupFound == false){classGroupGiven == "wizard"; givenLevel = 1;};
var SAVing = _.where(roll20API.savingTable, {level: givenLevel, classg: classGroupGiven });
if(SAVing.length == 0){SAVing[0] = roll20API.savingTable[0]};
Sav_vs_PPD = SAVing[0].ppd;
Sav_vs_RSW = SAVing[0].rsw;
Sav_vs_PP = SAVing[0].poly;
Sav_vs_BW = SAVing[0].breath;
Sav_vs_SP = SAVing[0].spell;
findObjs({ _type: "attribute", _id: Sav_vs_PPD_id})[0].set({current: Sav_vs_PPD});
findObjs({ _type: "attribute", _id: Sav_vs_RSW_id})[0].set({current: Sav_vs_RSW});
findObjs({ _type: "attribute", _id: Sav_vs_PP_id })[0].set({current: Sav_vs_PP});
findObjs({ _type: "attribute", _id: Sav_vs_BW_id })[0].set({current: Sav_vs_BW});
findObjs({ _type: "attribute", _id: Sav_vs_SP_id })[0].set({current: Sav_vs_SP});
if(classGroupFound == false){
findObjs({ _type: "attribute", _id: Class_Group_id})[0].set({current: classGroupGiven});
};
//In line style guide for the sheet
roll20API.RStableStyle = "style=\"border-collapse: collapse; border-spacing: 0;\""
roll20API.RStdStyleTop = "style=\"background-color: #26ADE4; color: #FFF; font-weight: bold;\""
roll20API.RStdStyleLeft = "style=\"background-color: #D2E4FC; font-weight: bold;\""
//Bio table so it won't wrap around portrait general information
roll20API.abilityGeneral = "<table style=\"width:300px;\"><tr><td>" + sheetId + "<hr>"
roll20API.abilityGeneral += "<b>Player Name:</b> " + Player_Name + "<br>"
roll20API.abilityGeneral += "<b>Character Name: </b>" + Character_Name + "<br>"
roll20API.abilityGeneral += "<br>"
roll20API.abilityGeneral += "<b>Class: </b>" + Race + "<br>"
roll20API.abilityGeneral += "<b>Race: </b>" + Class_Group + "<br>"
roll20API.abilityGeneral += "<b>Movement: </b>" + Movement + "<br>"
roll20API.abilityGeneral += "<b>Alignment: </b>" + Alignment + "<br>"
roll20API.abilityGeneral += "<b>Level: </b>" + Level + "<br>"
roll20API.abilityGeneral += "<br>"
roll20API.abilityGeneral += "<b>HP: </b>" + Hit_Points + "<br>"
roll20API.abilityGeneral += "<b>HP: </b>" + Hit_Points + "<br>"
roll20API.abilityGeneral += "<b>AC: </b>" + Armor_Class + "<br>"
roll20API.abilityGeneral += "<b>AC Surprised: </b>" + AC_Surprised + "<br>"
roll20API.abilityGeneral += "<b>THAC0: </b>" + THAC0 + "<br></td></tr></table><hr>"
//Stats
roll20API.abilityTable = "<h4>Abilities</h4><table " + roll20API.RStableStyle + ">"
roll20API.abilityTable += "<tr>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + "></td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Value</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Except.</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Hit</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Dam</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Wgt</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Press</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Open</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Bend</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Bend Barred</td>"
roll20API.abilityTable += "</tr>"
roll20API.abilityTable += "<tr>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleLeft + ">Strength</td>"
roll20API.abilityTable += "<td>" + Strength + "</td>"
roll20API.abilityTable += "<td>" + str_Exceptional + "</td>"
roll20API.abilityTable += "<td>" + str_Hit_Adjust + "</td>"
roll20API.abilityTable += "<td>" + str_Dam_Adjust + "</td>"
roll20API.abilityTable += "<td>" + str_weigth + "</td>"
roll20API.abilityTable += "<td>" + str_press + "</td>"
roll20API.abilityTable += "<td>" + str_Open_Norm + "</td>"
roll20API.abilityTable += "<td>" + str_Open_Barred + "</td>"
roll20API.abilityTable += "<td>" + str_Bend_Lift + "</td>"
roll20API.abilityTable += "</tr>"
roll20API.abilityTable += "<tr>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + "></td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Value</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + " colspan=\"2\">Reaction</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + " colspan=\"2\">Missile</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + " colspan=\"2\">Defensive</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + " colspan=\"2\">     </td>"
roll20API.abilityTable += "</tr>"
roll20API.abilityTable += "<tr>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleLeft + ">Dexterity</td>"
roll20API.abilityTable += "<td>" + Dexterity + "</td>"
roll20API.abilityTable += "<td colspan=\"2\">" + dex_Reaction + "</td>"
roll20API.abilityTable += "<td colspan=\"2\">" + dex_Missile + "</td>"
roll20API.abilityTable += "<td colspan=\"2\">" + dex_Defensive + "</td>"
roll20API.abilityTable += "<td colspan=\"2\">     </td>"
roll20API.abilityTable += "</tr>"
roll20API.abilityTable += "<tr>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + "></td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Value</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">HP Adj.</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Shock</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + " colspan=\"2\">Resurrection</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Poison</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + " colspan=\"3\">Regenerate</td>"
roll20API.abilityTable += "</tr>"
roll20API.abilityTable += "<tr>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleLeft + ">Constitution</td>"
roll20API.abilityTable += "<td>" + Constitution + "</td>"
roll20API.abilityTable += "<td>" + con_HP + "</td>"
roll20API.abilityTable += "<td>" + con_Shock + "</td>"
roll20API.abilityTable += "<td colspan=\"2\">" + con_Resurrection + "</td>"
roll20API.abilityTable += "<td>" + con_Poison + "</td>"
roll20API.abilityTable += "<td colspan=\"3\">" + con_Regenerate + "</td>"
roll20API.abilityTable += "</tr>"
roll20API.abilityTable += "<tr>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + "></td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Value</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Lang</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Level</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Chance</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Max</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + " colspan=\"4\">Immunity</td>"
roll20API.abilityTable += "</tr>"
roll20API.abilityTable += "<tr>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleLeft + ">Intelligence</td>"
roll20API.abilityTable += "<td>" + Intelligence + "</td>"
roll20API.abilityTable += "<td>" + int_Lang + "</td>"
roll20API.abilityTable += "<td>" + int_Level + "</td>"
roll20API.abilityTable += "<td>" + int_Chance + "</td>"
roll20API.abilityTable += "<td>" + int_Max + "</td>"
roll20API.abilityTable += "<td colspan=\"4\">" + int_Immunity + "</td>"
roll20API.abilityTable += "</tr>"
roll20API.abilityTable += "<tr>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + "></td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Value</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Defense</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + " colspan=\"5\">Bonus</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Failure</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Immunity</td>"
roll20API.abilityTable += "</tr>"
roll20API.abilityTable += "<tr>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleLeft + ">Wisdom</td>"
roll20API.abilityTable += "<td>" + Wisdom + "</td>"
roll20API.abilityTable += "<td>" + wis_Defense + "</td>"
roll20API.abilityTable += "<td colspan=\"5\">" + wis_Bonus + "</td>"
roll20API.abilityTable += "<td>" + wis_Failure + "</td>"
roll20API.abilityTable += "<td>" + wis_Immunity + "</td>"
roll20API.abilityTable += "</tr>"
roll20API.abilityTable += "<tr>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + "></td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Value</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Maximum</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + ">Loyalty</td>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleTop + " colspan=\"6\">Reaction</td>"
roll20API.abilityTable += "</tr>"
roll20API.abilityTable += "<tr>"
roll20API.abilityTable += "<td " + roll20API.RStdStyleLeft + ">Charisma</td>"
roll20API.abilityTable += "<td>" + Charisma + "</td>"
roll20API.abilityTable += "<td>" + chr_Maximum + "</td>"
roll20API.abilityTable += "<td>" + chr_Loyalty + "</td>"
roll20API.abilityTable += "<td colspan=\"6\">" + chr_Reaction + "</td>"
roll20API.abilityTable += "</tr>"
roll20API.abilityTable += "</table><hr>"
//Saving Throws
roll20API.Saving = "<h4>Saving Throws</h4><table " + roll20API.RStableStyle + ">"
roll20API.Saving += "<tr>"
roll20API.Saving += "<td " + roll20API.RStdStyleTop + "> </td>"
roll20API.Saving += "<td " + roll20API.RStdStyleTop + ">Target</td>"
roll20API.Saving += "</tr>"
roll20API.Saving += "<tr>"
roll20API.Saving += "<td " + roll20API.RStdStyleLeft + ">Paralyzation, Poison, or Death Magic</td>"
roll20API.Saving += "<td>" + Sav_vs_PPD + "</td>"
roll20API.Saving += "</tr>"
roll20API.Saving += "<tr>"
roll20API.Saving += "<td " + roll20API.RStdStyleLeft + ">Rod, Staff, or Wand</td>"
roll20API.Saving += "<td>" + Sav_vs_RSW + "</td>"
roll20API.Saving += "</tr>"
roll20API.Saving += "<tr>"
roll20API.Saving += "<td " + roll20API.RStdStyleLeft + ">Petrification or Polymorph</td>"
roll20API.Saving += "<td>" + Sav_vs_PP + "</td>"
roll20API.Saving += "</tr>"
roll20API.Saving += "<tr>"
roll20API.Saving += "<td " + roll20API.RStdStyleLeft + ">Breath Weapon</td>"
roll20API.Saving += "<td>" + Sav_vs_BW + "</td>"
roll20API.Saving += "</tr>"
roll20API.Saving += "<tr>"
roll20API.Saving += "<td " + roll20API.RStdStyleLeft + ">Spell</td>"
roll20API.Saving += "<td>" + Sav_vs_SP + "</td>"
roll20API.Saving += "</tr>"
roll20API.Saving += "</table>"
roll20API.bioText = roll20API.abilityGeneral
roll20API.bioText += roll20API.abilityTable
roll20API.bioText += roll20API.Saving
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment