diff --git a/Karyu Densetsu/karyu.html b/Karyu Densetsu/karyu.html
index b470f59138..c90fcb987c 100644
--- a/Karyu Densetsu/karyu.html
+++ b/Karyu Densetsu/karyu.html
@@ -313,8 +313,8 @@
Defesa
- Defesa
+
Mod
@@ -512,9 +512,7 @@
});
});
- /*Sets de defense hidden attribute to the higher value between Reason and Instinct*/
- on("change:raz change:ins", function(eventInfo) {
-
+ function updateDefenseHiddenAttribute() {
getAttrs(["raz", "ins"], function(values) {
let higherValue = parseInt(values.raz)||0;
let instinct = parseInt(values.ins)||0;
@@ -528,6 +526,12 @@
});
});
+ }
+
+ /*Sets de defense hidden attribute to the higher value between Reason and Instinct*/
+ on("change:raz change:ins", function(eventInfo) {
+
+ updateDefenseHiddenAttribute();
});
/*config Roll Queries translations */
@@ -541,5 +545,10 @@
});
+ /*updates defense threshold when the sheet is opened. This was made to fix this value on old sheets.*/
+ on('sheet:opened',function(){
+
+ updateDefenseHiddenAttribute();
+ });
\ No newline at end of file