@@ -2558,7 +2558,8 @@ function all(iterable) {
2558
2558
if (!all.__argnames__) Object.defineProperties(all, {
2559
2559
__argnames__ : {value: ["iterable"]}
2560
2560
});
2561
- var define_str_func, ρσ_unpack, ρσ_orig_split, ρσ_orig_replace;
2561
+ var decimal_sep, define_str_func, ρσ_unpack, ρσ_orig_split, ρσ_orig_replace;
2562
+ decimal_sep = 1.1.toLocaleString()[1];
2562
2563
function ρσ_repr_js_builtin(x, as_array) {
2563
2564
var ans, b, keys, key;
2564
2565
ans = [];
@@ -2935,7 +2936,7 @@ define_str_func("format", function () {
2935
2936
value = value.toExponential(prec - 1);
2936
2937
}
2937
2938
value = value.replace(/0+$/g, "");
2938
- if (value[value.length-1] === "." ) {
2939
+ if (value[value.length-1] === decimal_sep ) {
2939
2940
value = value.slice(0, -1);
2940
2941
}
2941
2942
if (ftype === "G") {
@@ -3751,7 +3752,9 @@ var str = ρσ_str, repr = ρσ_repr;;
3751
3752
s.jsset.add("aside");
3752
3753
s.jsset.add("audio");
3753
3754
s.jsset.add("b");
3755
+ s.jsset.add("base");
3754
3756
s.jsset.add("big");
3757
+ s.jsset.add("body");
3755
3758
s.jsset.add("blockquote");
3756
3759
s.jsset.add("br");
3757
3760
s.jsset.add("button");
@@ -3790,6 +3793,7 @@ var str = ρσ_str, repr = ρσ_repr;;
3790
3793
s.jsset.add("h5");
3791
3794
s.jsset.add("h6");
3792
3795
s.jsset.add("hr");
3796
+ s.jsset.add("head");
3793
3797
s.jsset.add("i");
3794
3798
s.jsset.add("iframe");
3795
3799
s.jsset.add("img");
@@ -4735,9 +4739,6 @@ var str = ρσ_str, repr = ρσ_repr;;
4735
4739
pos = close + 1;
4736
4740
continue;
4737
4741
}
4738
- if (extension === "<") {
4739
- throw new SyntaxError("Look behind assertions are not supported in JavaScript");
4740
- }
4741
4742
if (extension === "(") {
4742
4743
throw new SyntaxError("Group existence assertions are not supported in JavaScript");
4743
4744
}
@@ -10668,7 +10669,7 @@ return this.__repr__();
10668
10669
if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, "stat_block")){
10669
10670
stat_block = ρσ_kwargs_obj.stat_block;
10670
10671
}
10671
- var add_dice, inject_descriptions, base, quick_settings, link, avatar, attributes, label, value, cb , attr, abilities, prefix, makeCB, abbr, score, modifier, roll_initiative, initiative, ability, tidbits, data, saves, parts, mod, save, skills, name, skill, mon_skill, text, last, a, first, tidbit;
10672
+ var add_dice, inject_descriptions, base, quick_settings, link, avatar, avatarImg, cb, attributes, label, value, attr, abilities, prefix, makeCB, abbr, score, modifier, roll_initiative, initiative, ability, tidbits, data, saves, parts, mod, save, skills, name, skill, mon_skill, text, last, a, first, tidbit;
10672
10673
add_dice = self.getGlobalSetting("handle-stat-blocks", true);
10673
10674
inject_descriptions = self.getGlobalSetting("subst-dndbeyond-stat-blocks", true);
10674
10675
base = self._base;
@@ -10701,6 +10702,13 @@ return this.__repr__();
10701
10702
avatar = $(".details-aside .image a");
10702
10703
if (avatar.length > 0) {
10703
10704
self._avatar = avatar[0].href;
10705
+ avatarImg = $(".details-aside .image");
10706
+ if (avatarImg) {
10707
+ cb = function () {
10708
+ self.displayAvatar();
10709
+ };
10710
+ ρσ_interpolate_kwargs.call(this, addRollButton, [self, cb, avatarImg].concat([ρσ_desugar_kwargs({small: true, image: true, text: "Display in VTT"})]));
10711
+ }
10704
10712
}
10705
10713
attributes = stat_block.find(base + "__attributes " + base + "__attribute");
10706
10714
var ρσ_Iter10 = ρσ_Iterable(attributes);
@@ -10884,6 +10892,14 @@ return this.__repr__();
10884
10892
__handles_kwarg_interpolation__ : {value: true},
10885
10893
__argnames__ : {value: ["stat_block"]}
10886
10894
});
10895
+ Monster.prototype.displayAvatar = function displayAvatar() {
10896
+ var self = this;
10897
+ sendRoll(self, "avatar", self.avatar, (function(){
10898
+ var ρσ_d = {};
10899
+ ρσ_d["name"] = "Avatar";
10900
+ return ρσ_d;
10901
+ }).call(this));
10902
+ };
10887
10903
Monster.prototype.rollHitPoints = function rollHitPoints() {
10888
10904
var self = this;
10889
10905
sendRoll(self, "custom", self._hp_formula, (function(){
0 commit comments